generated-configure.sh revision 2081:278dbe271a52
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
655STLPORT_LIB
656LIBZIP_CAN_USE_MMAP
657LIBDL
658LIBM
659USE_EXTERNAL_LCMS
660LCMS_LIBS
661LCMS_CFLAGS
662USE_EXTERNAL_LIBZ
663USE_EXTERNAL_LIBPNG
664PNG_LIBS
665PNG_CFLAGS
666USE_EXTERNAL_LIBGIF
667USE_EXTERNAL_LIBJPEG
668LLVM_LIBS
669LLVM_LDFLAGS
670LLVM_CFLAGS
671LLVM_CONFIG
672LIBFFI_LIBS
673LIBFFI_CFLAGS
674ALSA_LIBS
675ALSA_CFLAGS
676FREETYPE_BUNDLE_LIB_PATH
677FREETYPE_LIBS
678FREETYPE_CFLAGS
679CUPS_CFLAGS
680X_EXTRA_LIBS
681X_LIBS
682X_PRE_LIBS
683X_CFLAGS
684XMKMF
685MSVCP_DLL
686MSVCR_DLL
687LIBCXX
688STATIC_CXX_SETTING
689FIXPATH_DETACH_FLAG
690FIXPATH
691VALID_JVM_FEATURES
692JVM_FEATURES_custom
693JVM_FEATURES_zeroshark
694JVM_FEATURES_zero
695JVM_FEATURES_minimal
696JVM_FEATURES_core
697JVM_FEATURES_client
698JVM_FEATURES_server
699INCLUDE_DTRACE
700GCOV_ENABLED
701STRIP_POLICY
702DEBUG_BINARIES
703ZIP_EXTERNAL_DEBUG_SYMBOLS
704COPY_DEBUG_SYMBOLS
705COMPILE_WITH_DEBUG_SYMBOLS
706CFLAGS_WARNINGS_ARE_ERRORS
707BUILD_CC_DISABLE_WARNING_PREFIX
708DISABLE_WARNING_PREFIX
709HOTSPOT_SET_WARNINGS_AS_ERRORS
710WARNINGS_AS_ERRORS
711COMPILER_SUPPORTS_TARGET_BITS_FLAG
712ZERO_ARCHFLAG
713LDFLAGS_TESTEXE
714LDFLAGS_TESTLIB
715CXXFLAGS_TESTEXE
716CXXFLAGS_TESTLIB
717CFLAGS_TESTEXE
718CFLAGS_TESTLIB
719OPENJDK_BUILD_JVM_LIBS
720OPENJDK_BUILD_JVM_ASFLAGS
721OPENJDK_BUILD_JVM_LDFLAGS
722OPENJDK_BUILD_JVM_CFLAGS
723OPENJDK_BUILD_LDFLAGS_HASH_STYLE
724OPENJDK_BUILD_LDFLAGS_CXX_JDK
725OPENJDK_BUILD_JDKEXE_LIBS
726OPENJDK_BUILD_JDKLIB_LIBS
727OPENJDK_BUILD_LDFLAGS_JDKEXE
728OPENJDK_BUILD_LDFLAGS_JDKLIB
729OPENJDK_BUILD_CXXFLAGS_JDKEXE
730OPENJDK_BUILD_CXXFLAGS_JDKLIB
731OPENJDK_BUILD_CFLAGS_JDKEXE
732OPENJDK_BUILD_CFLAGS_JDKLIB
733OPENJDK_BUILD_CXXSTD_CXXFLAG
734JVM_LIBS
735JVM_ASFLAGS
736JVM_LDFLAGS
737JVM_CFLAGS
738LDFLAGS_HASH_STYLE
739LDFLAGS_CXX_JDK
740JDKEXE_LIBS
741JDKLIB_LIBS
742LDFLAGS_JDKEXE
743LDFLAGS_JDKLIB
744CXXFLAGS_JDKEXE
745CXXFLAGS_JDKLIB
746CFLAGS_JDKEXE
747CFLAGS_JDKLIB
748MACOSX_VERSION_MIN
749NO_LIFETIME_DSE_CFLAG
750NO_NULL_POINTER_CHECK_CFLAG
751CXXSTD_CXXFLAG
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JT_HOME
790JTREGEXE
791HOTSPOT_TOOLCHAIN_TYPE
792USING_BROKEN_SUSE_LD
793PACKAGE_PATH
794USE_CLANG
795HOTSPOT_LD
796HOTSPOT_CXX
797HOTSPOT_RC
798HOTSPOT_MT
799BUILD_AS
800BUILD_LDCXX
801BUILD_LD
802BUILD_STRIP
803BUILD_OBJCOPY
804BUILD_AR
805BUILD_NM
806BUILD_CXX
807BUILD_CC
808BUILD_SYSROOT_LDFLAGS
809BUILD_SYSROOT_CFLAGS
810ac_ct_OBJDUMP
811OBJDUMP
812ac_ct_OBJCOPY
813OBJCOPY
814ac_ct_NM
815ac_ct_STRIP
816GNM
817NM
818STRIP
819MSBUILD
820DUMPBIN
821RC
822MT
823LIPO
824ac_ct_AR
825AR
826AS
827LDCXX
828LD
829CXXCPP
830CPP
831CXX_VERSION_NUMBER
832CC_VERSION_NUMBER
833ac_ct_CXX
834CXXFLAGS
835CXX
836TOOLCHAIN_PATH_CXX
837POTENTIAL_CXX
838OBJEXT
839EXEEXT
840ac_ct_CC
841CPPFLAGS
842LDFLAGS
843CFLAGS
844CC
845TOOLCHAIN_PATH_CC
846POTENTIAL_CC
847TOOLCHAIN_VERSION
848VS_LIB
849VS_INCLUDE
850VS_PATH
851CYGWIN_LINK
852SYSROOT_LDFLAGS
853SYSROOT_CFLAGS
854EXTRA_LDFLAGS
855EXTRA_CXXFLAGS
856EXTRA_CFLAGS
857LEGACY_EXTRA_LDFLAGS
858LEGACY_EXTRA_CXXFLAGS
859LEGACY_EXTRA_CFLAGS
860EXE_SUFFIX
861OBJ_SUFFIX
862STATIC_LIBRARY
863SHARED_LIBRARY
864STATIC_LIBRARY_SUFFIX
865SHARED_LIBRARY_SUFFIX
866LIBRARY_PREFIX
867TOOLCHAIN_TYPE
868STATIC_BUILD
869IMPORT_MODULES_MAKE
870IMPORT_MODULES_SRC
871IMPORT_MODULES_CONF
872IMPORT_MODULES_LIBS
873IMPORT_MODULES_CMDS
874IMPORT_MODULES_CLASSES
875BUILD_HOTSPOT
876HOTSPOT_DIST
877BUILD_OUTPUT
878JDK_TOPDIR
879NASHORN_TOPDIR
880HOTSPOT_TOPDIR
881JAXWS_TOPDIR
882JAXP_TOPDIR
883CORBA_TOPDIR
884LANGTOOLS_TOPDIR
885EXTERNAL_BUILDJDK
886BUILD_JDK
887CREATE_BUILDJDK
888JLINK
889JMOD
890BOOT_JDK_BITS
891JAVAC_FLAGS
892BOOT_JDK_MODULAR
893BOOT_JDK_SOURCETARGET
894JARSIGNER
895JAR
896JAVAH
897JAVAC
898JAVA
899BOOT_JDK
900JAVA_CHECK
901JAVAC_CHECK
902VERSION_IS_GA
903VERSION_SHORT
904VERSION_STRING
905VERSION_NUMBER_FOUR_POSITIONS
906VERSION_NUMBER
907VERSION_OPT
908VERSION_BUILD
909VERSION_PRE
910VERSION_PATCH
911VERSION_SECURITY
912VERSION_MINOR
913VERSION_MAJOR
914MACOSX_BUNDLE_ID_BASE
915MACOSX_BUNDLE_NAME_BASE
916HOTSPOT_VM_DISTRO
917COMPANY_NAME
918JDK_RC_PLATFORM_NAME
919PRODUCT_SUFFIX
920PRODUCT_NAME
921LAUNCHER_NAME
922JLINK_KEEP_PACKAGED_MODULES
923COPYRIGHT_YEAR
924COMPRESS_JARS
925INCLUDE_SA
926UNLIMITED_CRYPTO
927CACERTS_FILE
928BUILD_HEADLESS
929SUPPORT_HEADFUL
930SUPPORT_HEADLESS
931DEFAULT_MAKE_TARGET
932OS_VERSION_MICRO
933OS_VERSION_MINOR
934OS_VERSION_MAJOR
935PKG_CONFIG
936BASH_ARGS
937SETFILE
938CODESIGN
939XATTR
940DSYMUTIL
941IS_GNU_TIME
942PATCH
943DTRACE
944TIME
945STAT
946HG
947READELF
948OTOOL
949LDD
950ZIP
951UNZIP
952FIND_DELETE
953OUTPUT_SYNC
954OUTPUT_SYNC_SUPPORTED
955CHECK_TOOLSDIR_MAKE
956CHECK_TOOLSDIR_GMAKE
957CHECK_MAKE
958CHECK_GMAKE
959MAKE
960PKGHANDLER
961CONFIGURESUPPORT_OUTPUTDIR
962OUTPUT_ROOT
963CONF_NAME
964SPEC
965SDKROOT
966XCODEBUILD
967VALID_JVM_VARIANTS
968JVM_VARIANTS
969DEBUG_LEVEL
970HOTSPOT_DEBUG_LEVEL
971JDK_VARIANT
972SET_OPENJDK
973USERNAME
974CANONICAL_TOPDIR
975ORIGINAL_TOPDIR
976TOPDIR
977PATH_SEP
978ZERO_ARCHDEF
979HOTSPOT_BUILD_CPU_DEFINE
980HOTSPOT_BUILD_CPU_ARCH
981HOTSPOT_BUILD_CPU
982HOTSPOT_BUILD_OS_TYPE
983HOTSPOT_BUILD_OS
984OPENJDK_BUILD_OS_EXPORT_DIR
985OPENJDK_BUILD_CPU_JLI_CFLAGS
986OPENJDK_BUILD_CPU_OSARCH
987OPENJDK_BUILD_CPU_ISADIR
988OPENJDK_BUILD_CPU_LIBDIR
989OPENJDK_BUILD_CPU_LEGACY_LIB
990OPENJDK_BUILD_CPU_LEGACY
991HOTSPOT_TARGET_CPU_DEFINE
992HOTSPOT_TARGET_CPU_ARCH
993HOTSPOT_TARGET_CPU
994HOTSPOT_TARGET_OS_TYPE
995HOTSPOT_TARGET_OS
996DEFINE_CROSS_COMPILE_ARCH
997LP64
998OPENJDK_TARGET_OS_EXPORT_DIR
999OPENJDK_TARGET_CPU_JLI_CFLAGS
1000OPENJDK_TARGET_CPU_OSARCH
1001OPENJDK_TARGET_CPU_ISADIR
1002OPENJDK_TARGET_CPU_LIBDIR
1003OPENJDK_TARGET_CPU_LEGACY_LIB
1004OPENJDK_TARGET_CPU_LEGACY
1005REQUIRED_OS_VERSION
1006REQUIRED_OS_NAME
1007COMPILE_TYPE
1008OPENJDK_TARGET_CPU_ENDIAN
1009OPENJDK_TARGET_CPU_BITS
1010OPENJDK_TARGET_CPU_ARCH
1011OPENJDK_TARGET_CPU
1012OPENJDK_TARGET_OS_ENV
1013OPENJDK_TARGET_OS_TYPE
1014OPENJDK_TARGET_OS
1015OPENJDK_BUILD_CPU_ENDIAN
1016OPENJDK_BUILD_CPU_BITS
1017OPENJDK_BUILD_CPU_ARCH
1018OPENJDK_BUILD_CPU
1019OPENJDK_BUILD_OS_ENV
1020OPENJDK_BUILD_OS_TYPE
1021OPENJDK_BUILD_OS
1022OPENJDK_BUILD_AUTOCONF_NAME
1023OPENJDK_TARGET_AUTOCONF_NAME
1024target_os
1025target_vendor
1026target_cpu
1027target
1028host_os
1029host_vendor
1030host_cpu
1031host
1032build_os
1033build_vendor
1034build_cpu
1035build
1036NICE
1037CPIO
1038DF
1039READLINK
1040CYGPATH
1041SED
1042FGREP
1043EGREP
1044GREP
1045AWK
1046XARGS
1047WHICH
1048WC
1049UNIQ
1050UNAME
1051TR
1052TOUCH
1053TEE
1054TAR
1055TAIL
1056SORT
1057SH
1058RMDIR
1059RM
1060PRINTF
1061NAWK
1062MV
1063MKTEMP
1064MKDIR
1065LS
1066LN
1067HEAD
1068FIND
1069FILE
1070EXPR
1071ECHO
1072DIRNAME
1073DIFF
1074DATE
1075CUT
1076CP
1077COMM
1078CMP
1079CHMOD
1080CAT
1081BASH
1082BASENAME
1083DATE_WHEN_CONFIGURED
1084ORIGINAL_PATH
1085CONFIGURE_COMMAND_LINE
1086target_alias
1087host_alias
1088build_alias
1089LIBS
1090ECHO_T
1091ECHO_N
1092ECHO_C
1093DEFS
1094mandir
1095localedir
1096libdir
1097psdir
1098pdfdir
1099dvidir
1100htmldir
1101infodir
1102docdir
1103oldincludedir
1104includedir
1105localstatedir
1106sharedstatedir
1107sysconfdir
1108datadir
1109datarootdir
1110libexecdir
1111sbindir
1112bindir
1113program_transform_name
1114prefix
1115exec_prefix
1116PACKAGE_URL
1117PACKAGE_BUGREPORT
1118PACKAGE_STRING
1119PACKAGE_VERSION
1120PACKAGE_TARNAME
1121PACKAGE_NAME
1122PATH_SEPARATOR
1123SHELL'
1124ac_subst_files=''
1125ac_user_opts='
1126enable_option_checking
1127with_target_bits
1128enable_openjdk_only
1129with_custom_make_dir
1130with_jdk_variant
1131enable_debug
1132with_debug_level
1133with_jvm_variants
1134with_devkit
1135with_sys_root
1136with_sysroot
1137with_tools_dir
1138with_toolchain_path
1139with_extra_path
1140with_sdk_name
1141with_conf_name
1142with_output_sync
1143with_default_make_target
1144enable_headful
1145with_cacerts_file
1146enable_unlimited_crypto
1147with_copyright_year
1148enable_keep_packaged_modules
1149with_milestone
1150with_update_version
1151with_user_release_suffix
1152with_build_number
1153with_version_string
1154with_version_pre
1155with_version_opt
1156with_version_build
1157with_version_major
1158with_version_minor
1159with_version_security
1160with_version_patch
1161with_boot_jdk
1162with_build_jdk
1163with_add_source_root
1164with_override_source_root
1165with_adds_and_overrides
1166with_override_langtools
1167with_override_corba
1168with_override_jaxp
1169with_override_jaxws
1170with_override_hotspot
1171with_override_nashorn
1172with_override_jdk
1173with_import_hotspot
1174with_import_modules
1175enable_static_build
1176with_toolchain_type
1177with_extra_cflags
1178with_extra_cxxflags
1179with_extra_ldflags
1180with_toolchain_version
1181with_build_devkit
1182with_jtreg
1183enable_warnings_as_errors
1184with_native_debug_symbols
1185enable_debug_symbols
1186enable_zip_debug_info
1187enable_native_coverage
1188enable_dtrace
1189with_jvm_features
1190with_jvm_interpreter
1191with_stdc__lib
1192with_msvcr_dll
1193with_msvcp_dll
1194with_x
1195with_cups
1196with_cups_include
1197with_freetype
1198with_freetype_include
1199with_freetype_lib
1200with_freetype_src
1201enable_freetype_bundling
1202with_alsa
1203with_alsa_include
1204with_alsa_lib
1205with_libffi
1206with_libffi_include
1207with_libffi_lib
1208with_libjpeg
1209with_giflib
1210with_libpng
1211with_zlib
1212with_lcms
1213with_dxsdk
1214with_dxsdk_lib
1215with_dxsdk_include
1216enable_jtreg_failure_handler
1217with_num_cores
1218with_memory_size
1219with_jobs
1220with_test_jobs
1221with_boot_jdk_jvmargs
1222with_sjavac_server_java
1223enable_sjavac
1224enable_javac_server
1225enable_icecc
1226enable_precompiled_headers
1227enable_ccache
1228with_ccache_dir
1229'
1230      ac_precious_vars='build_alias
1231host_alias
1232target_alias
1233BASENAME
1234BASH
1235CAT
1236CHMOD
1237CMP
1238COMM
1239CP
1240CUT
1241DATE
1242DIFF
1243DIRNAME
1244ECHO
1245EXPR
1246FILE
1247FIND
1248HEAD
1249LN
1250LS
1251MKDIR
1252MKTEMP
1253MV
1254NAWK
1255PRINTF
1256RM
1257RMDIR
1258SH
1259SORT
1260TAIL
1261TAR
1262TEE
1263TOUCH
1264TR
1265UNAME
1266UNIQ
1267WC
1268WHICH
1269XARGS
1270AWK
1271GREP
1272EGREP
1273FGREP
1274SED
1275CYGPATH
1276READLINK
1277DF
1278CPIO
1279NICE
1280MAKE
1281UNZIP
1282ZIP
1283LDD
1284OTOOL
1285READELF
1286HG
1287STAT
1288TIME
1289DTRACE
1290PATCH
1291DSYMUTIL
1292XATTR
1293CODESIGN
1294SETFILE
1295PKG_CONFIG
1296JAVA
1297JAVAC
1298JAVAH
1299JAR
1300JARSIGNER
1301CC
1302CFLAGS
1303LDFLAGS
1304LIBS
1305CPPFLAGS
1306CXX
1307CXXFLAGS
1308CCC
1309CPP
1310CXXCPP
1311AS
1312AR
1313LIPO
1314STRIP
1315NM
1316GNM
1317OBJCOPY
1318OBJDUMP
1319BUILD_CC
1320BUILD_CXX
1321BUILD_NM
1322BUILD_AR
1323BUILD_OBJCOPY
1324BUILD_STRIP
1325JTREGEXE
1326XMKMF
1327FREETYPE_CFLAGS
1328FREETYPE_LIBS
1329ALSA_CFLAGS
1330ALSA_LIBS
1331LIBFFI_CFLAGS
1332LIBFFI_LIBS
1333PNG_CFLAGS
1334PNG_LIBS
1335LCMS_CFLAGS
1336LCMS_LIBS
1337ICECC_CMD
1338ICECC_CREATE_ENV
1339ICECC_WRAPPER
1340CCACHE'
1341
1342
1343# Initialize some variables set by options.
1344ac_init_help=
1345ac_init_version=false
1346ac_unrecognized_opts=
1347ac_unrecognized_sep=
1348# The variables have the same names as the options, with
1349# dashes changed to underlines.
1350cache_file=/dev/null
1351exec_prefix=NONE
1352no_create=
1353no_recursion=
1354prefix=NONE
1355program_prefix=NONE
1356program_suffix=NONE
1357program_transform_name=s,x,x,
1358silent=
1359site=
1360srcdir=
1361verbose=
1362x_includes=NONE
1363x_libraries=NONE
1364
1365# Installation directory options.
1366# These are left unexpanded so users can "make install exec_prefix=/foo"
1367# and all the variables that are supposed to be based on exec_prefix
1368# by default will actually change.
1369# Use braces instead of parens because sh, perl, etc. also accept them.
1370# (The list follows the same order as the GNU Coding Standards.)
1371bindir='${exec_prefix}/bin'
1372sbindir='${exec_prefix}/sbin'
1373libexecdir='${exec_prefix}/libexec'
1374datarootdir='${prefix}/share'
1375datadir='${datarootdir}'
1376sysconfdir='${prefix}/etc'
1377sharedstatedir='${prefix}/com'
1378localstatedir='${prefix}/var'
1379includedir='${prefix}/include'
1380oldincludedir='/usr/include'
1381docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1382infodir='${datarootdir}/info'
1383htmldir='${docdir}'
1384dvidir='${docdir}'
1385pdfdir='${docdir}'
1386psdir='${docdir}'
1387libdir='${exec_prefix}/lib'
1388localedir='${datarootdir}/locale'
1389mandir='${datarootdir}/man'
1390
1391ac_prev=
1392ac_dashdash=
1393for ac_option
1394do
1395  # If the previous option needs an argument, assign it.
1396  if test -n "$ac_prev"; then
1397    eval $ac_prev=\$ac_option
1398    ac_prev=
1399    continue
1400  fi
1401
1402  case $ac_option in
1403  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1404  *=)   ac_optarg= ;;
1405  *)    ac_optarg=yes ;;
1406  esac
1407
1408  # Accept the important Cygnus configure options, so we can diagnose typos.
1409
1410  case $ac_dashdash$ac_option in
1411  --)
1412    ac_dashdash=yes ;;
1413
1414  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1415    ac_prev=bindir ;;
1416  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1417    bindir=$ac_optarg ;;
1418
1419  -build | --build | --buil | --bui | --bu)
1420    ac_prev=build_alias ;;
1421  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1422    build_alias=$ac_optarg ;;
1423
1424  -cache-file | --cache-file | --cache-fil | --cache-fi \
1425  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1426    ac_prev=cache_file ;;
1427  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1428  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1429    cache_file=$ac_optarg ;;
1430
1431  --config-cache | -C)
1432    cache_file=config.cache ;;
1433
1434  -datadir | --datadir | --datadi | --datad)
1435    ac_prev=datadir ;;
1436  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1437    datadir=$ac_optarg ;;
1438
1439  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1440  | --dataroo | --dataro | --datar)
1441    ac_prev=datarootdir ;;
1442  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1443  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1444    datarootdir=$ac_optarg ;;
1445
1446  -disable-* | --disable-*)
1447    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1448    # Reject names that are not valid shell variable names.
1449    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1450      as_fn_error $? "invalid feature name: $ac_useropt"
1451    ac_useropt_orig=$ac_useropt
1452    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1453    case $ac_user_opts in
1454      *"
1455"enable_$ac_useropt"
1456"*) ;;
1457      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1458	 ac_unrecognized_sep=', ';;
1459    esac
1460    eval enable_$ac_useropt=no ;;
1461
1462  -docdir | --docdir | --docdi | --doc | --do)
1463    ac_prev=docdir ;;
1464  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1465    docdir=$ac_optarg ;;
1466
1467  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1468    ac_prev=dvidir ;;
1469  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1470    dvidir=$ac_optarg ;;
1471
1472  -enable-* | --enable-*)
1473    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1474    # Reject names that are not valid shell variable names.
1475    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1476      as_fn_error $? "invalid feature name: $ac_useropt"
1477    ac_useropt_orig=$ac_useropt
1478    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1479    case $ac_user_opts in
1480      *"
1481"enable_$ac_useropt"
1482"*) ;;
1483      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1484	 ac_unrecognized_sep=', ';;
1485    esac
1486    eval enable_$ac_useropt=\$ac_optarg ;;
1487
1488  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1489  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1490  | --exec | --exe | --ex)
1491    ac_prev=exec_prefix ;;
1492  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1493  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1494  | --exec=* | --exe=* | --ex=*)
1495    exec_prefix=$ac_optarg ;;
1496
1497  -gas | --gas | --ga | --g)
1498    # Obsolete; use --with-gas.
1499    with_gas=yes ;;
1500
1501  -help | --help | --hel | --he | -h)
1502    ac_init_help=long ;;
1503  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1504    ac_init_help=recursive ;;
1505  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1506    ac_init_help=short ;;
1507
1508  -host | --host | --hos | --ho)
1509    ac_prev=host_alias ;;
1510  -host=* | --host=* | --hos=* | --ho=*)
1511    host_alias=$ac_optarg ;;
1512
1513  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1514    ac_prev=htmldir ;;
1515  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1516  | --ht=*)
1517    htmldir=$ac_optarg ;;
1518
1519  -includedir | --includedir | --includedi | --included | --include \
1520  | --includ | --inclu | --incl | --inc)
1521    ac_prev=includedir ;;
1522  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1523  | --includ=* | --inclu=* | --incl=* | --inc=*)
1524    includedir=$ac_optarg ;;
1525
1526  -infodir | --infodir | --infodi | --infod | --info | --inf)
1527    ac_prev=infodir ;;
1528  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1529    infodir=$ac_optarg ;;
1530
1531  -libdir | --libdir | --libdi | --libd)
1532    ac_prev=libdir ;;
1533  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1534    libdir=$ac_optarg ;;
1535
1536  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1537  | --libexe | --libex | --libe)
1538    ac_prev=libexecdir ;;
1539  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1540  | --libexe=* | --libex=* | --libe=*)
1541    libexecdir=$ac_optarg ;;
1542
1543  -localedir | --localedir | --localedi | --localed | --locale)
1544    ac_prev=localedir ;;
1545  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1546    localedir=$ac_optarg ;;
1547
1548  -localstatedir | --localstatedir | --localstatedi | --localstated \
1549  | --localstate | --localstat | --localsta | --localst | --locals)
1550    ac_prev=localstatedir ;;
1551  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1552  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1553    localstatedir=$ac_optarg ;;
1554
1555  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1556    ac_prev=mandir ;;
1557  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1558    mandir=$ac_optarg ;;
1559
1560  -nfp | --nfp | --nf)
1561    # Obsolete; use --without-fp.
1562    with_fp=no ;;
1563
1564  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1565  | --no-cr | --no-c | -n)
1566    no_create=yes ;;
1567
1568  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1569  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1570    no_recursion=yes ;;
1571
1572  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1573  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1574  | --oldin | --oldi | --old | --ol | --o)
1575    ac_prev=oldincludedir ;;
1576  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1577  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1578  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1579    oldincludedir=$ac_optarg ;;
1580
1581  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1582    ac_prev=prefix ;;
1583  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1584    prefix=$ac_optarg ;;
1585
1586  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1587  | --program-pre | --program-pr | --program-p)
1588    ac_prev=program_prefix ;;
1589  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1590  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1591    program_prefix=$ac_optarg ;;
1592
1593  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1594  | --program-suf | --program-su | --program-s)
1595    ac_prev=program_suffix ;;
1596  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1597  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1598    program_suffix=$ac_optarg ;;
1599
1600  -program-transform-name | --program-transform-name \
1601  | --program-transform-nam | --program-transform-na \
1602  | --program-transform-n | --program-transform- \
1603  | --program-transform | --program-transfor \
1604  | --program-transfo | --program-transf \
1605  | --program-trans | --program-tran \
1606  | --progr-tra | --program-tr | --program-t)
1607    ac_prev=program_transform_name ;;
1608  -program-transform-name=* | --program-transform-name=* \
1609  | --program-transform-nam=* | --program-transform-na=* \
1610  | --program-transform-n=* | --program-transform-=* \
1611  | --program-transform=* | --program-transfor=* \
1612  | --program-transfo=* | --program-transf=* \
1613  | --program-trans=* | --program-tran=* \
1614  | --progr-tra=* | --program-tr=* | --program-t=*)
1615    program_transform_name=$ac_optarg ;;
1616
1617  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1618    ac_prev=pdfdir ;;
1619  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1620    pdfdir=$ac_optarg ;;
1621
1622  -psdir | --psdir | --psdi | --psd | --ps)
1623    ac_prev=psdir ;;
1624  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1625    psdir=$ac_optarg ;;
1626
1627  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1628  | -silent | --silent | --silen | --sile | --sil)
1629    silent=yes ;;
1630
1631  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1632    ac_prev=sbindir ;;
1633  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1634  | --sbi=* | --sb=*)
1635    sbindir=$ac_optarg ;;
1636
1637  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1638  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1639  | --sharedst | --shareds | --shared | --share | --shar \
1640  | --sha | --sh)
1641    ac_prev=sharedstatedir ;;
1642  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1643  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1644  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1645  | --sha=* | --sh=*)
1646    sharedstatedir=$ac_optarg ;;
1647
1648  -site | --site | --sit)
1649    ac_prev=site ;;
1650  -site=* | --site=* | --sit=*)
1651    site=$ac_optarg ;;
1652
1653  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1654    ac_prev=srcdir ;;
1655  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1656    srcdir=$ac_optarg ;;
1657
1658  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1659  | --syscon | --sysco | --sysc | --sys | --sy)
1660    ac_prev=sysconfdir ;;
1661  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1662  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1663    sysconfdir=$ac_optarg ;;
1664
1665  -target | --target | --targe | --targ | --tar | --ta | --t)
1666    ac_prev=target_alias ;;
1667  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1668    target_alias=$ac_optarg ;;
1669
1670  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1671    verbose=yes ;;
1672
1673  -version | --version | --versio | --versi | --vers | -V)
1674    ac_init_version=: ;;
1675
1676  -with-* | --with-*)
1677    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1678    # Reject names that are not valid shell variable names.
1679    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1680      as_fn_error $? "invalid package name: $ac_useropt"
1681    ac_useropt_orig=$ac_useropt
1682    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1683    case $ac_user_opts in
1684      *"
1685"with_$ac_useropt"
1686"*) ;;
1687      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1688	 ac_unrecognized_sep=', ';;
1689    esac
1690    eval with_$ac_useropt=\$ac_optarg ;;
1691
1692  -without-* | --without-*)
1693    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
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--without-$ac_useropt_orig"
1704	 ac_unrecognized_sep=', ';;
1705    esac
1706    eval with_$ac_useropt=no ;;
1707
1708  --x)
1709    # Obsolete; use --with-x.
1710    with_x=yes ;;
1711
1712  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1713  | --x-incl | --x-inc | --x-in | --x-i)
1714    ac_prev=x_includes ;;
1715  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1716  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1717    x_includes=$ac_optarg ;;
1718
1719  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1720  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1721    ac_prev=x_libraries ;;
1722  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1723  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1724    x_libraries=$ac_optarg ;;
1725
1726  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1727Try \`$0 --help' for more information"
1728    ;;
1729
1730  *=*)
1731    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1732    # Reject names that are not valid shell variable names.
1733    case $ac_envvar in #(
1734      '' | [0-9]* | *[!_$as_cr_alnum]* )
1735      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1736    esac
1737    eval $ac_envvar=\$ac_optarg
1738    export $ac_envvar ;;
1739
1740  *)
1741    # FIXME: should be removed in autoconf 3.0.
1742    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1743    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1744      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1745    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1746    ;;
1747
1748  esac
1749done
1750
1751if test -n "$ac_prev"; then
1752  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1753  as_fn_error $? "missing argument to $ac_option"
1754fi
1755
1756if test -n "$ac_unrecognized_opts"; then
1757  case $enable_option_checking in
1758    no) ;;
1759    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1760    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1761  esac
1762fi
1763
1764# Check all directory arguments for consistency.
1765for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1766		datadir sysconfdir sharedstatedir localstatedir includedir \
1767		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1768		libdir localedir mandir
1769do
1770  eval ac_val=\$$ac_var
1771  # Remove trailing slashes.
1772  case $ac_val in
1773    */ )
1774      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1775      eval $ac_var=\$ac_val;;
1776  esac
1777  # Be sure to have absolute directory names.
1778  case $ac_val in
1779    [\\/$]* | ?:[\\/]* )  continue;;
1780    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1781  esac
1782  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1783done
1784
1785# There might be people who depend on the old broken behavior: `$host'
1786# used to hold the argument of --host etc.
1787# FIXME: To remove some day.
1788build=$build_alias
1789host=$host_alias
1790target=$target_alias
1791
1792# FIXME: To remove some day.
1793if test "x$host_alias" != x; then
1794  if test "x$build_alias" = x; then
1795    cross_compiling=maybe
1796  elif test "x$build_alias" != "x$host_alias"; then
1797    cross_compiling=yes
1798  fi
1799fi
1800
1801ac_tool_prefix=
1802test -n "$host_alias" && ac_tool_prefix=$host_alias-
1803
1804test "$silent" = yes && exec 6>/dev/null
1805
1806
1807ac_pwd=`pwd` && test -n "$ac_pwd" &&
1808ac_ls_di=`ls -di .` &&
1809ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1810  as_fn_error $? "working directory cannot be determined"
1811test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1812  as_fn_error $? "pwd does not report name of working directory"
1813
1814
1815# Find the source files, if location was not specified.
1816if test -z "$srcdir"; then
1817  ac_srcdir_defaulted=yes
1818  # Try the directory containing this script, then the parent directory.
1819  ac_confdir=`$as_dirname -- "$as_myself" ||
1820$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1821	 X"$as_myself" : 'X\(//\)[^/]' \| \
1822	 X"$as_myself" : 'X\(//\)$' \| \
1823	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1824$as_echo X"$as_myself" |
1825    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1826	    s//\1/
1827	    q
1828	  }
1829	  /^X\(\/\/\)[^/].*/{
1830	    s//\1/
1831	    q
1832	  }
1833	  /^X\(\/\/\)$/{
1834	    s//\1/
1835	    q
1836	  }
1837	  /^X\(\/\).*/{
1838	    s//\1/
1839	    q
1840	  }
1841	  s/.*/./; q'`
1842  srcdir=$ac_confdir
1843  if test ! -r "$srcdir/$ac_unique_file"; then
1844    srcdir=..
1845  fi
1846else
1847  ac_srcdir_defaulted=no
1848fi
1849if test ! -r "$srcdir/$ac_unique_file"; then
1850  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1851  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1852fi
1853ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1854ac_abs_confdir=`(
1855	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1856	pwd)`
1857# When building in place, set srcdir=.
1858if test "$ac_abs_confdir" = "$ac_pwd"; then
1859  srcdir=.
1860fi
1861# Remove unnecessary trailing slashes from srcdir.
1862# Double slashes in file names in object file debugging info
1863# mess up M-x gdb in Emacs.
1864case $srcdir in
1865*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1866esac
1867for ac_var in $ac_precious_vars; do
1868  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1869  eval ac_env_${ac_var}_value=\$${ac_var}
1870  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1871  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1872done
1873
1874#
1875# Report the --help message.
1876#
1877if test "$ac_init_help" = "long"; then
1878  # Omit some internal or obsolete options to make the list less imposing.
1879  # This message is too long to be a string in the A/UX 3.1 sh.
1880  cat <<_ACEOF
1881\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1882
1883Usage: $0 [OPTION]... [VAR=VALUE]...
1884
1885To assign environment variables (e.g., CC, CFLAGS...), specify them as
1886VAR=VALUE.  See below for descriptions of some of the useful variables.
1887
1888Defaults for the options are specified in brackets.
1889
1890Configuration:
1891  -h, --help              display this help and exit
1892      --help=short        display options specific to this package
1893      --help=recursive    display the short help of all the included packages
1894  -V, --version           display version information and exit
1895  -q, --quiet, --silent   do not print \`checking ...' messages
1896      --cache-file=FILE   cache test results in FILE [disabled]
1897  -C, --config-cache      alias for \`--cache-file=config.cache'
1898  -n, --no-create         do not create output files
1899      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1900
1901Installation directories:
1902  --prefix=PREFIX         install architecture-independent files in PREFIX
1903                          [$ac_default_prefix]
1904  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1905                          [PREFIX]
1906
1907By default, \`make install' will install all the files in
1908\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1909an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1910for instance \`--prefix=\$HOME'.
1911
1912For better control, use the options below.
1913
1914Fine tuning of the installation directories:
1915  --bindir=DIR            user executables [EPREFIX/bin]
1916  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1917  --libexecdir=DIR        program executables [EPREFIX/libexec]
1918  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1919  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1920  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1921  --libdir=DIR            object code libraries [EPREFIX/lib]
1922  --includedir=DIR        C header files [PREFIX/include]
1923  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1924  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1925  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1926  --infodir=DIR           info documentation [DATAROOTDIR/info]
1927  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1928  --mandir=DIR            man documentation [DATAROOTDIR/man]
1929  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1930  --htmldir=DIR           html documentation [DOCDIR]
1931  --dvidir=DIR            dvi documentation [DOCDIR]
1932  --pdfdir=DIR            pdf documentation [DOCDIR]
1933  --psdir=DIR             ps documentation [DOCDIR]
1934_ACEOF
1935
1936  cat <<\_ACEOF
1937
1938X features:
1939  --x-includes=DIR    X include files are in DIR
1940  --x-libraries=DIR   X library files are in DIR
1941
1942System types:
1943  --build=BUILD     configure for building on BUILD [guessed]
1944  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1945  --target=TARGET   configure for building compilers for TARGET [HOST]
1946_ACEOF
1947fi
1948
1949if test -n "$ac_init_help"; then
1950  case $ac_init_help in
1951     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1952   esac
1953  cat <<\_ACEOF
1954
1955Optional Features:
1956  --disable-option-checking  ignore unrecognized --enable/--with options
1957  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1958  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1959  --enable-openjdk-only   suppress building custom source even if present
1960                          [disabled]
1961  --enable-debug          set the debug level to fastdebug (shorthand for
1962                          --with-debug-level=fastdebug) [disabled]
1963  --disable-headful       disable building headful support (graphical UI
1964                          support) [enabled]
1965  --enable-unlimited-crypto
1966                          Enable unlimited crypto policy [disabled]
1967  --disable-keep-packaged-modules
1968                          Do not keep packaged modules in jdk image [enable]
1969  --enable-static-build   enable static library build [disabled]
1970  --disable-warnings-as-errors
1971                          do not consider native warnings to be an error
1972                          [enabled]
1973  --enable-debug-symbols  Deprecated. Option is kept for backwards
1974                          compatibility and is ignored
1975  --enable-zip-debug-info Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --enable-native-coverage
1978                          enable native compilation with code coverage
1979                          data[disabled]
1980  --enable-dtrace[=yes/no/auto]
1981                          enable dtrace. Default is auto, where dtrace is
1982                          enabled if all dependencies are present.
1983  --disable-freetype-bundling
1984                          disable bundling of the freetype library with the
1985                          build result [enabled on Windows or when using
1986                          --with-freetype, disabled otherwise]
1987  --enable-jtreg-failure-handler
1988                          forces build of the jtreg failure handler to be
1989                          enabled, missing dependencies become fatal errors.
1990                          Default is auto, where the failure handler is built
1991                          if all dependencies are present and otherwise just
1992                          disabled.
1993  --enable-sjavac         use sjavac to do fast incremental compiles
1994                          [disabled]
1995  --disable-javac-server  disable javac server [enabled]
1996  --enable-icecc          enable distribted compilation of native code using
1997                          icecc/icecream [disabled]
1998  --disable-precompiled-headers
1999                          disable using precompiled headers when compiling C++
2000                          [enabled]
2001  --enable-ccache         enable using ccache to speed up recompilations
2002                          [disabled]
2003
2004Optional Packages:
2005  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2006  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2007  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2008                          support it), e.g. --with-target-bits=32 [guessed]
2009  --with-custom-make-dir  Deprecated. Option is kept for backwards
2010                          compatibility and is ignored
2011  --with-jdk-variant      JDK variant to build (normal) [normal]
2012  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2013                          optimized) [release]
2014  --with-jvm-variants     JVM variants (separated by commas) to build
2015                          (server,client,minimal,core,zero,zeroshark,custom)
2016                          [server]
2017  --with-devkit           use this devkit for compilers, tools and resources
2018  --with-sys-root         alias for --with-sysroot for backwards compatability
2019  --with-sysroot          use this directory as sysroot
2020  --with-tools-dir        alias for --with-toolchain-path for backwards
2021                          compatibility
2022  --with-toolchain-path   prepend these directories when searching for
2023                          toolchain binaries (compilers etc)
2024  --with-extra-path       prepend these directories to the default path
2025  --with-sdk-name         use the platform SDK of the given name. [macosx]
2026  --with-conf-name        use this as the name of the configuration [generated
2027                          from important configuration options]
2028  --with-output-sync      set make output sync type if supported by make.
2029                          [recurse]
2030  --with-default-make-target
2031                          set the default make target [exploded-image]
2032  --with-cacerts-file     specify alternative cacerts file
2033  --with-copyright-year   Set copyright year value for build [current year]
2034  --with-milestone        Deprecated. Option is kept for backwards
2035                          compatibility and is ignored
2036  --with-update-version   Deprecated. Option is kept for backwards
2037                          compatibility and is ignored
2038  --with-user-release-suffix
2039                          Deprecated. Option is kept for backwards
2040                          compatibility and is ignored
2041  --with-build-number     Deprecated. Option is kept for backwards
2042                          compatibility and is ignored
2043  --with-version-string   Set version string [calculated]
2044  --with-version-pre      Set the base part of the version 'PRE' field
2045                          (pre-release identifier) ['internal']
2046  --with-version-opt      Set version 'OPT' field (build metadata)
2047                          [<timestamp>.<user>.<dirname>]
2048  --with-version-build    Set version 'BUILD' field (build number) [not
2049                          specified]
2050  --with-version-major    Set version 'MAJOR' field (first number) [current
2051                          source value]
2052  --with-version-minor    Set version 'MINOR' field (second number) [current
2053                          source value]
2054  --with-version-security Set version 'SECURITY' field (third number) [current
2055                          source value]
2056  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2057                          specified]
2058  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2059  --with-build-jdk        path to JDK of same version as is being built[the
2060                          newly built JDK]
2061  --with-add-source-root  Deprecated. Option is kept for backwards
2062                          compatibility and is ignored
2063  --with-override-source-root
2064                          Deprecated. Option is kept for backwards
2065                          compatibility and is ignored
2066  --with-adds-and-overrides
2067                          Deprecated. Option is kept for backwards
2068                          compatibility and is ignored
2069  --with-override-langtools
2070                          Deprecated. Option is kept for backwards
2071                          compatibility and is ignored
2072  --with-override-corba   Deprecated. Option is kept for backwards
2073                          compatibility and is ignored
2074  --with-override-jaxp    Deprecated. Option is kept for backwards
2075                          compatibility and is ignored
2076  --with-override-jaxws   Deprecated. Option is kept for backwards
2077                          compatibility and is ignored
2078  --with-override-hotspot Deprecated. Option is kept for backwards
2079                          compatibility and is ignored
2080  --with-override-nashorn Deprecated. Option is kept for backwards
2081                          compatibility and is ignored
2082  --with-override-jdk     Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-import-hotspot   import hotspot binaries from this jdk image or
2085                          hotspot build dist dir instead of building from
2086                          source
2087  --with-import-modules   import a set of prebuilt modules either as a zip
2088                          file or an exploded directory
2089  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2090                          to show possible values [platform dependent]
2091  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2092  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2093  --with-extra-ldflags    extra flags to be used when linking jdk
2094  --with-toolchain-version
2095                          the version of the toolchain to look for, use
2096                          '--help' to show possible values [platform
2097                          dependent]
2098  --with-build-devkit     Devkit to use for the build platform toolchain
2099  --with-jtreg            Regression Test Harness [probed]
2100  --with-native-debug-symbols
2101                          set the native debug symbol configuration (none,
2102                          internal, external, zipped) [varying]
2103  --with-jvm-features     additional JVM features to enable (separated by
2104                          comma), use '--help' to show possible values [none]
2105  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-stdc++lib=<static>,<dynamic>,<default>
2108                          force linking of the C++ runtime on Linux to either
2109                          static or dynamic, default is static with dynamic as
2110                          fallback
2111  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2112                          (Windows only) [probed]
2113  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2114                          (Windows only) [probed]
2115  --with-x                use the X Window System
2116  --with-cups             specify prefix directory for the cups package
2117                          (expecting the headers under PATH/include)
2118  --with-cups-include     specify directory for the cups include files
2119  --with-freetype         specify prefix directory for the freetype package
2120                          (expecting the libraries under PATH/lib and the
2121                          headers under PATH/include)
2122  --with-freetype-include specify directory for the freetype include files
2123  --with-freetype-lib     specify directory for the freetype library
2124  --with-freetype-src     specify directory with freetype sources to
2125                          automatically build the library (experimental,
2126                          Windows-only)
2127  --with-alsa             specify prefix directory for the alsa package
2128                          (expecting the libraries under PATH/lib and the
2129                          headers under PATH/include)
2130  --with-alsa-include     specify directory for the alsa include files
2131  --with-alsa-lib         specify directory for the alsa library
2132  --with-libffi           specify prefix directory for the libffi package
2133                          (expecting the libraries under PATH/lib and the
2134                          headers under PATH/include)
2135  --with-libffi-include   specify directory for the libffi include files
2136  --with-libffi-lib       specify directory for the libffi library
2137  --with-libjpeg          use libjpeg from build system or OpenJDK source
2138                          (system, bundled) [bundled]
2139  --with-giflib           use giflib from build system or OpenJDK source
2140                          (system, bundled) [bundled]
2141  --with-libpng           use libpng from build system or OpenJDK source
2142                          (system, bundled) [bundled]
2143  --with-zlib             use zlib from build system or OpenJDK source
2144                          (system, bundled) [bundled]
2145  --with-lcms             use lcms2 from build system or OpenJDK source
2146                          (system, bundled) [bundled]
2147  --with-dxsdk            Deprecated. Option is kept for backwards
2148                          compatibility and is ignored
2149  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2150                          compatibility and is ignored
2151  --with-dxsdk-include    Deprecated. Option is kept for backwards
2152                          compatibility and is ignored
2153  --with-num-cores        number of cores in the build system, e.g.
2154                          --with-num-cores=8 [probed]
2155  --with-memory-size      memory (in MB) available in the build system, e.g.
2156                          --with-memory-size=1024 [probed]
2157  --with-jobs             number of parallel jobs to let make run [calculated
2158                          based on cores and memory]
2159  --with-test-jobs        number of parallel tests jobs to run [based on build
2160                          jobs]
2161  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2162                          invocations of boot JDK, overriding the default
2163                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2164                          -enableassertions"
2165  --with-sjavac-server-java
2166                          use this java binary for running the sjavac
2167                          background server [Boot JDK java]
2168  --with-ccache-dir       where to store ccache files [~/.ccache]
2169
2170Some influential environment variables:
2171  BASENAME    Override default value for BASENAME
2172  BASH        Override default value for BASH
2173  CAT         Override default value for CAT
2174  CHMOD       Override default value for CHMOD
2175  CMP         Override default value for CMP
2176  COMM        Override default value for COMM
2177  CP          Override default value for CP
2178  CUT         Override default value for CUT
2179  DATE        Override default value for DATE
2180  DIFF        Override default value for DIFF
2181  DIRNAME     Override default value for DIRNAME
2182  ECHO        Override default value for ECHO
2183  EXPR        Override default value for EXPR
2184  FILE        Override default value for FILE
2185  FIND        Override default value for FIND
2186  HEAD        Override default value for HEAD
2187  LN          Override default value for LN
2188  LS          Override default value for LS
2189  MKDIR       Override default value for MKDIR
2190  MKTEMP      Override default value for MKTEMP
2191  MV          Override default value for MV
2192  NAWK        Override default value for NAWK
2193  PRINTF      Override default value for PRINTF
2194  RM          Override default value for RM
2195  RMDIR       Override default value for RMDIR
2196  SH          Override default value for SH
2197  SORT        Override default value for SORT
2198  TAIL        Override default value for TAIL
2199  TAR         Override default value for TAR
2200  TEE         Override default value for TEE
2201  TOUCH       Override default value for TOUCH
2202  TR          Override default value for TR
2203  UNAME       Override default value for UNAME
2204  UNIQ        Override default value for UNIQ
2205  WC          Override default value for WC
2206  WHICH       Override default value for WHICH
2207  XARGS       Override default value for XARGS
2208  AWK         Override default value for AWK
2209  GREP        Override default value for GREP
2210  EGREP       Override default value for EGREP
2211  FGREP       Override default value for FGREP
2212  SED         Override default value for SED
2213  CYGPATH     Override default value for CYGPATH
2214  READLINK    Override default value for READLINK
2215  DF          Override default value for DF
2216  CPIO        Override default value for CPIO
2217  NICE        Override default value for NICE
2218  MAKE        Override default value for MAKE
2219  UNZIP       Override default value for UNZIP
2220  ZIP         Override default value for ZIP
2221  LDD         Override default value for LDD
2222  OTOOL       Override default value for OTOOL
2223  READELF     Override default value for READELF
2224  HG          Override default value for HG
2225  STAT        Override default value for STAT
2226  TIME        Override default value for TIME
2227  DTRACE      Override default value for DTRACE
2228  PATCH       Override default value for PATCH
2229  DSYMUTIL    Override default value for DSYMUTIL
2230  XATTR       Override default value for XATTR
2231  CODESIGN    Override default value for CODESIGN
2232  SETFILE     Override default value for SETFILE
2233  PKG_CONFIG  path to pkg-config utility
2234  JAVA        Override default value for JAVA
2235  JAVAC       Override default value for JAVAC
2236  JAVAH       Override default value for JAVAH
2237  JAR         Override default value for JAR
2238  JARSIGNER   Override default value for JARSIGNER
2239  CC          C compiler command
2240  CFLAGS      C compiler flags
2241  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2242              nonstandard directory <lib dir>
2243  LIBS        libraries to pass to the linker, e.g. -l<library>
2244  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2245              you have headers in a nonstandard directory <include dir>
2246  CXX         C++ compiler command
2247  CXXFLAGS    C++ compiler flags
2248  CPP         C preprocessor
2249  CXXCPP      C++ preprocessor
2250  AS          Override default value for AS
2251  AR          Override default value for AR
2252  LIPO        Override default value for LIPO
2253  STRIP       Override default value for STRIP
2254  NM          Override default value for NM
2255  GNM         Override default value for GNM
2256  OBJCOPY     Override default value for OBJCOPY
2257  OBJDUMP     Override default value for OBJDUMP
2258  BUILD_CC    Override default value for BUILD_CC
2259  BUILD_CXX   Override default value for BUILD_CXX
2260  BUILD_NM    Override default value for BUILD_NM
2261  BUILD_AR    Override default value for BUILD_AR
2262  BUILD_OBJCOPY
2263              Override default value for BUILD_OBJCOPY
2264  BUILD_STRIP Override default value for BUILD_STRIP
2265  JTREGEXE    Override default value for JTREGEXE
2266  XMKMF       Path to xmkmf, Makefile generator for X Window System
2267  FREETYPE_CFLAGS
2268              C compiler flags for FREETYPE, overriding pkg-config
2269  FREETYPE_LIBS
2270              linker flags for FREETYPE, overriding pkg-config
2271  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2272  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2273  LIBFFI_CFLAGS
2274              C compiler flags for LIBFFI, overriding pkg-config
2275  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2276  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2277  PNG_LIBS    linker flags for PNG, overriding pkg-config
2278  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2279  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2280  ICECC_CMD   Override default value for ICECC_CMD
2281  ICECC_CREATE_ENV
2282              Override default value for ICECC_CREATE_ENV
2283  ICECC_WRAPPER
2284              Override default value for ICECC_WRAPPER
2285  CCACHE      Override default value for CCACHE
2286
2287Use these variables to override the choices made by `configure' or to help
2288it to find libraries and programs with nonstandard names/locations.
2289
2290Report bugs to <build-dev@openjdk.java.net>.
2291OpenJDK home page: <http://openjdk.java.net>.
2292_ACEOF
2293ac_status=$?
2294fi
2295
2296if test "$ac_init_help" = "recursive"; then
2297  # If there are subdirs, report their specific --help.
2298  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2299    test -d "$ac_dir" ||
2300      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2301      continue
2302    ac_builddir=.
2303
2304case "$ac_dir" in
2305.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2306*)
2307  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2308  # A ".." for each directory in $ac_dir_suffix.
2309  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2310  case $ac_top_builddir_sub in
2311  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2312  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2313  esac ;;
2314esac
2315ac_abs_top_builddir=$ac_pwd
2316ac_abs_builddir=$ac_pwd$ac_dir_suffix
2317# for backward compatibility:
2318ac_top_builddir=$ac_top_build_prefix
2319
2320case $srcdir in
2321  .)  # We are building in place.
2322    ac_srcdir=.
2323    ac_top_srcdir=$ac_top_builddir_sub
2324    ac_abs_top_srcdir=$ac_pwd ;;
2325  [\\/]* | ?:[\\/]* )  # Absolute name.
2326    ac_srcdir=$srcdir$ac_dir_suffix;
2327    ac_top_srcdir=$srcdir
2328    ac_abs_top_srcdir=$srcdir ;;
2329  *) # Relative name.
2330    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2331    ac_top_srcdir=$ac_top_build_prefix$srcdir
2332    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2333esac
2334ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2335
2336    cd "$ac_dir" || { ac_status=$?; continue; }
2337    # Check for guested configure.
2338    if test -f "$ac_srcdir/configure.gnu"; then
2339      echo &&
2340      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2341    elif test -f "$ac_srcdir/configure"; then
2342      echo &&
2343      $SHELL "$ac_srcdir/configure" --help=recursive
2344    else
2345      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2346    fi || ac_status=$?
2347    cd "$ac_pwd" || { ac_status=$?; break; }
2348  done
2349fi
2350
2351test -n "$ac_init_help" && exit $ac_status
2352if $ac_init_version; then
2353  cat <<\_ACEOF
2354OpenJDK configure jdk9
2355generated by GNU Autoconf 2.69
2356
2357Copyright (C) 2012 Free Software Foundation, Inc.
2358This configure script is free software; the Free Software Foundation
2359gives unlimited permission to copy, distribute and modify it.
2360_ACEOF
2361  exit
2362fi
2363
2364## ------------------------ ##
2365## Autoconf initialization. ##
2366## ------------------------ ##
2367
2368# ac_fn_c_try_compile LINENO
2369# --------------------------
2370# Try to compile conftest.$ac_ext, and return whether this succeeded.
2371ac_fn_c_try_compile ()
2372{
2373  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2374  rm -f conftest.$ac_objext
2375  if { { ac_try="$ac_compile"
2376case "(($ac_try" in
2377  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2378  *) ac_try_echo=$ac_try;;
2379esac
2380eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2381$as_echo "$ac_try_echo"; } >&5
2382  (eval "$ac_compile") 2>conftest.err
2383  ac_status=$?
2384  if test -s conftest.err; then
2385    grep -v '^ *+' conftest.err >conftest.er1
2386    cat conftest.er1 >&5
2387    mv -f conftest.er1 conftest.err
2388  fi
2389  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2390  test $ac_status = 0; } && {
2391	 test -z "$ac_c_werror_flag" ||
2392	 test ! -s conftest.err
2393       } && test -s conftest.$ac_objext; then :
2394  ac_retval=0
2395else
2396  $as_echo "$as_me: failed program was:" >&5
2397sed 's/^/| /' conftest.$ac_ext >&5
2398
2399	ac_retval=1
2400fi
2401  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2402  as_fn_set_status $ac_retval
2403
2404} # ac_fn_c_try_compile
2405
2406# ac_fn_cxx_try_compile LINENO
2407# ----------------------------
2408# Try to compile conftest.$ac_ext, and return whether this succeeded.
2409ac_fn_cxx_try_compile ()
2410{
2411  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412  rm -f conftest.$ac_objext
2413  if { { ac_try="$ac_compile"
2414case "(($ac_try" in
2415  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2416  *) ac_try_echo=$ac_try;;
2417esac
2418eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2419$as_echo "$ac_try_echo"; } >&5
2420  (eval "$ac_compile") 2>conftest.err
2421  ac_status=$?
2422  if test -s conftest.err; then
2423    grep -v '^ *+' conftest.err >conftest.er1
2424    cat conftest.er1 >&5
2425    mv -f conftest.er1 conftest.err
2426  fi
2427  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2428  test $ac_status = 0; } && {
2429	 test -z "$ac_cxx_werror_flag" ||
2430	 test ! -s conftest.err
2431       } && test -s conftest.$ac_objext; then :
2432  ac_retval=0
2433else
2434  $as_echo "$as_me: failed program was:" >&5
2435sed 's/^/| /' conftest.$ac_ext >&5
2436
2437	ac_retval=1
2438fi
2439  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2440  as_fn_set_status $ac_retval
2441
2442} # ac_fn_cxx_try_compile
2443
2444# ac_fn_c_try_cpp LINENO
2445# ----------------------
2446# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2447ac_fn_c_try_cpp ()
2448{
2449  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2450  if { { ac_try="$ac_cpp conftest.$ac_ext"
2451case "(($ac_try" in
2452  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2453  *) ac_try_echo=$ac_try;;
2454esac
2455eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2456$as_echo "$ac_try_echo"; } >&5
2457  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2458  ac_status=$?
2459  if test -s conftest.err; then
2460    grep -v '^ *+' conftest.err >conftest.er1
2461    cat conftest.er1 >&5
2462    mv -f conftest.er1 conftest.err
2463  fi
2464  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2465  test $ac_status = 0; } > conftest.i && {
2466	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2467	 test ! -s conftest.err
2468       }; then :
2469  ac_retval=0
2470else
2471  $as_echo "$as_me: failed program was:" >&5
2472sed 's/^/| /' conftest.$ac_ext >&5
2473
2474    ac_retval=1
2475fi
2476  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2477  as_fn_set_status $ac_retval
2478
2479} # ac_fn_c_try_cpp
2480
2481# ac_fn_cxx_try_cpp LINENO
2482# ------------------------
2483# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2484ac_fn_cxx_try_cpp ()
2485{
2486  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2487  if { { ac_try="$ac_cpp conftest.$ac_ext"
2488case "(($ac_try" in
2489  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2490  *) ac_try_echo=$ac_try;;
2491esac
2492eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2493$as_echo "$ac_try_echo"; } >&5
2494  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2495  ac_status=$?
2496  if test -s conftest.err; then
2497    grep -v '^ *+' conftest.err >conftest.er1
2498    cat conftest.er1 >&5
2499    mv -f conftest.er1 conftest.err
2500  fi
2501  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2502  test $ac_status = 0; } > conftest.i && {
2503	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2504	 test ! -s conftest.err
2505       }; then :
2506  ac_retval=0
2507else
2508  $as_echo "$as_me: failed program was:" >&5
2509sed 's/^/| /' conftest.$ac_ext >&5
2510
2511    ac_retval=1
2512fi
2513  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2514  as_fn_set_status $ac_retval
2515
2516} # ac_fn_cxx_try_cpp
2517
2518# ac_fn_c_try_link LINENO
2519# -----------------------
2520# Try to link conftest.$ac_ext, and return whether this succeeded.
2521ac_fn_c_try_link ()
2522{
2523  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2524  rm -f conftest.$ac_objext conftest$ac_exeext
2525  if { { ac_try="$ac_link"
2526case "(($ac_try" in
2527  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2528  *) ac_try_echo=$ac_try;;
2529esac
2530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2531$as_echo "$ac_try_echo"; } >&5
2532  (eval "$ac_link") 2>conftest.err
2533  ac_status=$?
2534  if test -s conftest.err; then
2535    grep -v '^ *+' conftest.err >conftest.er1
2536    cat conftest.er1 >&5
2537    mv -f conftest.er1 conftest.err
2538  fi
2539  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2540  test $ac_status = 0; } && {
2541	 test -z "$ac_c_werror_flag" ||
2542	 test ! -s conftest.err
2543       } && test -s conftest$ac_exeext && {
2544	 test "$cross_compiling" = yes ||
2545	 test -x conftest$ac_exeext
2546       }; then :
2547  ac_retval=0
2548else
2549  $as_echo "$as_me: failed program was:" >&5
2550sed 's/^/| /' conftest.$ac_ext >&5
2551
2552	ac_retval=1
2553fi
2554  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2555  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2556  # interfere with the next link command; also delete a directory that is
2557  # left behind by Apple's compiler.  We do this before executing the actions.
2558  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2559  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2560  as_fn_set_status $ac_retval
2561
2562} # ac_fn_c_try_link
2563
2564# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2565# ---------------------------------------------------------
2566# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2567# the include files in INCLUDES and setting the cache variable VAR
2568# accordingly.
2569ac_fn_cxx_check_header_mongrel ()
2570{
2571  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2572  if eval \${$3+:} false; then :
2573  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2574$as_echo_n "checking for $2... " >&6; }
2575if eval \${$3+:} false; then :
2576  $as_echo_n "(cached) " >&6
2577fi
2578eval ac_res=\$$3
2579	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2580$as_echo "$ac_res" >&6; }
2581else
2582  # Is the header compilable?
2583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2584$as_echo_n "checking $2 usability... " >&6; }
2585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2586/* end confdefs.h.  */
2587$4
2588#include <$2>
2589_ACEOF
2590if ac_fn_cxx_try_compile "$LINENO"; then :
2591  ac_header_compiler=yes
2592else
2593  ac_header_compiler=no
2594fi
2595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2597$as_echo "$ac_header_compiler" >&6; }
2598
2599# Is the header present?
2600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2601$as_echo_n "checking $2 presence... " >&6; }
2602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2603/* end confdefs.h.  */
2604#include <$2>
2605_ACEOF
2606if ac_fn_cxx_try_cpp "$LINENO"; then :
2607  ac_header_preproc=yes
2608else
2609  ac_header_preproc=no
2610fi
2611rm -f conftest.err conftest.i conftest.$ac_ext
2612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2613$as_echo "$ac_header_preproc" >&6; }
2614
2615# So?  What about this header?
2616case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2617  yes:no: )
2618    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2619$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2620    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2621$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2622    ;;
2623  no:yes:* )
2624    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2625$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2626    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2627$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2628    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2629$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2630    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2631$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2632    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2633$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2634( $as_echo "## ----------------------------------------- ##
2635## Report this to build-dev@openjdk.java.net ##
2636## ----------------------------------------- ##"
2637     ) | sed "s/^/$as_me: WARNING:     /" >&2
2638    ;;
2639esac
2640  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2641$as_echo_n "checking for $2... " >&6; }
2642if eval \${$3+:} false; then :
2643  $as_echo_n "(cached) " >&6
2644else
2645  eval "$3=\$ac_header_compiler"
2646fi
2647eval ac_res=\$$3
2648	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2649$as_echo "$ac_res" >&6; }
2650fi
2651  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2652
2653} # ac_fn_cxx_check_header_mongrel
2654
2655# ac_fn_cxx_try_run LINENO
2656# ------------------------
2657# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2658# that executables *can* be run.
2659ac_fn_cxx_try_run ()
2660{
2661  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2662  if { { ac_try="$ac_link"
2663case "(($ac_try" in
2664  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2665  *) ac_try_echo=$ac_try;;
2666esac
2667eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2668$as_echo "$ac_try_echo"; } >&5
2669  (eval "$ac_link") 2>&5
2670  ac_status=$?
2671  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2672  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2673  { { case "(($ac_try" in
2674  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2675  *) ac_try_echo=$ac_try;;
2676esac
2677eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2678$as_echo "$ac_try_echo"; } >&5
2679  (eval "$ac_try") 2>&5
2680  ac_status=$?
2681  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2682  test $ac_status = 0; }; }; then :
2683  ac_retval=0
2684else
2685  $as_echo "$as_me: program exited with status $ac_status" >&5
2686       $as_echo "$as_me: failed program was:" >&5
2687sed 's/^/| /' conftest.$ac_ext >&5
2688
2689       ac_retval=$ac_status
2690fi
2691  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2692  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2693  as_fn_set_status $ac_retval
2694
2695} # ac_fn_cxx_try_run
2696
2697# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2698# ---------------------------------------------------------
2699# Tests whether HEADER exists and can be compiled using the include files in
2700# INCLUDES, setting the cache variable VAR accordingly.
2701ac_fn_cxx_check_header_compile ()
2702{
2703  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2704  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2705$as_echo_n "checking for $2... " >&6; }
2706if eval \${$3+:} false; then :
2707  $as_echo_n "(cached) " >&6
2708else
2709  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2710/* end confdefs.h.  */
2711$4
2712#include <$2>
2713_ACEOF
2714if ac_fn_cxx_try_compile "$LINENO"; then :
2715  eval "$3=yes"
2716else
2717  eval "$3=no"
2718fi
2719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2720fi
2721eval ac_res=\$$3
2722	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2723$as_echo "$ac_res" >&6; }
2724  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2725
2726} # ac_fn_cxx_check_header_compile
2727
2728# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2729# ----------------------------------------------
2730# Tries to find the compile-time value of EXPR in a program that includes
2731# INCLUDES, setting VAR accordingly. Returns whether the value could be
2732# computed
2733ac_fn_cxx_compute_int ()
2734{
2735  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2736  if test "$cross_compiling" = yes; then
2737    # Depending upon the size, compute the lo and hi bounds.
2738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2739/* end confdefs.h.  */
2740$4
2741int
2742main ()
2743{
2744static int test_array [1 - 2 * !(($2) >= 0)];
2745test_array [0] = 0;
2746return test_array [0];
2747
2748  ;
2749  return 0;
2750}
2751_ACEOF
2752if ac_fn_cxx_try_compile "$LINENO"; then :
2753  ac_lo=0 ac_mid=0
2754  while :; do
2755    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2756/* end confdefs.h.  */
2757$4
2758int
2759main ()
2760{
2761static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2762test_array [0] = 0;
2763return test_array [0];
2764
2765  ;
2766  return 0;
2767}
2768_ACEOF
2769if ac_fn_cxx_try_compile "$LINENO"; then :
2770  ac_hi=$ac_mid; break
2771else
2772  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2773			if test $ac_lo -le $ac_mid; then
2774			  ac_lo= ac_hi=
2775			  break
2776			fi
2777			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2778fi
2779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2780  done
2781else
2782  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2783/* end confdefs.h.  */
2784$4
2785int
2786main ()
2787{
2788static int test_array [1 - 2 * !(($2) < 0)];
2789test_array [0] = 0;
2790return test_array [0];
2791
2792  ;
2793  return 0;
2794}
2795_ACEOF
2796if ac_fn_cxx_try_compile "$LINENO"; then :
2797  ac_hi=-1 ac_mid=-1
2798  while :; do
2799    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800/* end confdefs.h.  */
2801$4
2802int
2803main ()
2804{
2805static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2806test_array [0] = 0;
2807return test_array [0];
2808
2809  ;
2810  return 0;
2811}
2812_ACEOF
2813if ac_fn_cxx_try_compile "$LINENO"; then :
2814  ac_lo=$ac_mid; break
2815else
2816  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2817			if test $ac_mid -le $ac_hi; then
2818			  ac_lo= ac_hi=
2819			  break
2820			fi
2821			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2822fi
2823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2824  done
2825else
2826  ac_lo= ac_hi=
2827fi
2828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2829fi
2830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2831# Binary search between lo and hi bounds.
2832while test "x$ac_lo" != "x$ac_hi"; do
2833  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2834  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2835/* end confdefs.h.  */
2836$4
2837int
2838main ()
2839{
2840static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2841test_array [0] = 0;
2842return test_array [0];
2843
2844  ;
2845  return 0;
2846}
2847_ACEOF
2848if ac_fn_cxx_try_compile "$LINENO"; then :
2849  ac_hi=$ac_mid
2850else
2851  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2852fi
2853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2854done
2855case $ac_lo in #((
2856?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2857'') ac_retval=1 ;;
2858esac
2859  else
2860    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2861/* end confdefs.h.  */
2862$4
2863static long int longval () { return $2; }
2864static unsigned long int ulongval () { return $2; }
2865#include <stdio.h>
2866#include <stdlib.h>
2867int
2868main ()
2869{
2870
2871  FILE *f = fopen ("conftest.val", "w");
2872  if (! f)
2873    return 1;
2874  if (($2) < 0)
2875    {
2876      long int i = longval ();
2877      if (i != ($2))
2878	return 1;
2879      fprintf (f, "%ld", i);
2880    }
2881  else
2882    {
2883      unsigned long int i = ulongval ();
2884      if (i != ($2))
2885	return 1;
2886      fprintf (f, "%lu", i);
2887    }
2888  /* Do not output a trailing newline, as this causes \r\n confusion
2889     on some platforms.  */
2890  return ferror (f) || fclose (f) != 0;
2891
2892  ;
2893  return 0;
2894}
2895_ACEOF
2896if ac_fn_cxx_try_run "$LINENO"; then :
2897  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2898else
2899  ac_retval=1
2900fi
2901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2902  conftest.$ac_objext conftest.beam conftest.$ac_ext
2903rm -f conftest.val
2904
2905  fi
2906  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2907  as_fn_set_status $ac_retval
2908
2909} # ac_fn_cxx_compute_int
2910
2911# ac_fn_cxx_try_link LINENO
2912# -------------------------
2913# Try to link conftest.$ac_ext, and return whether this succeeded.
2914ac_fn_cxx_try_link ()
2915{
2916  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2917  rm -f conftest.$ac_objext conftest$ac_exeext
2918  if { { ac_try="$ac_link"
2919case "(($ac_try" in
2920  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2921  *) ac_try_echo=$ac_try;;
2922esac
2923eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2924$as_echo "$ac_try_echo"; } >&5
2925  (eval "$ac_link") 2>conftest.err
2926  ac_status=$?
2927  if test -s conftest.err; then
2928    grep -v '^ *+' conftest.err >conftest.er1
2929    cat conftest.er1 >&5
2930    mv -f conftest.er1 conftest.err
2931  fi
2932  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2933  test $ac_status = 0; } && {
2934	 test -z "$ac_cxx_werror_flag" ||
2935	 test ! -s conftest.err
2936       } && test -s conftest$ac_exeext && {
2937	 test "$cross_compiling" = yes ||
2938	 test -x conftest$ac_exeext
2939       }; then :
2940  ac_retval=0
2941else
2942  $as_echo "$as_me: failed program was:" >&5
2943sed 's/^/| /' conftest.$ac_ext >&5
2944
2945	ac_retval=1
2946fi
2947  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2948  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2949  # interfere with the next link command; also delete a directory that is
2950  # left behind by Apple's compiler.  We do this before executing the actions.
2951  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2952  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2953  as_fn_set_status $ac_retval
2954
2955} # ac_fn_cxx_try_link
2956
2957# ac_fn_cxx_check_func LINENO FUNC VAR
2958# ------------------------------------
2959# Tests whether FUNC exists, setting the cache variable VAR accordingly
2960ac_fn_cxx_check_func ()
2961{
2962  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2964$as_echo_n "checking for $2... " >&6; }
2965if eval \${$3+:} false; then :
2966  $as_echo_n "(cached) " >&6
2967else
2968  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2969/* end confdefs.h.  */
2970/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2971   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2972#define $2 innocuous_$2
2973
2974/* System header to define __stub macros and hopefully few prototypes,
2975    which can conflict with char $2 (); below.
2976    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2977    <limits.h> exists even on freestanding compilers.  */
2978
2979#ifdef __STDC__
2980# include <limits.h>
2981#else
2982# include <assert.h>
2983#endif
2984
2985#undef $2
2986
2987/* Override any GCC internal prototype to avoid an error.
2988   Use char because int might match the return type of a GCC
2989   builtin and then its argument prototype would still apply.  */
2990#ifdef __cplusplus
2991extern "C"
2992#endif
2993char $2 ();
2994/* The GNU C library defines this for functions which it implements
2995    to always fail with ENOSYS.  Some functions are actually named
2996    something starting with __ and the normal name is an alias.  */
2997#if defined __stub_$2 || defined __stub___$2
2998choke me
2999#endif
3000
3001int
3002main ()
3003{
3004return $2 ();
3005  ;
3006  return 0;
3007}
3008_ACEOF
3009if ac_fn_cxx_try_link "$LINENO"; then :
3010  eval "$3=yes"
3011else
3012  eval "$3=no"
3013fi
3014rm -f core conftest.err conftest.$ac_objext \
3015    conftest$ac_exeext conftest.$ac_ext
3016fi
3017eval ac_res=\$$3
3018	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3019$as_echo "$ac_res" >&6; }
3020  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3021
3022} # ac_fn_cxx_check_func
3023
3024# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3025# -------------------------------------------------------
3026# Tests whether HEADER exists and can be compiled using the include files in
3027# INCLUDES, setting the cache variable VAR accordingly.
3028ac_fn_c_check_header_compile ()
3029{
3030  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3032$as_echo_n "checking for $2... " >&6; }
3033if eval \${$3+:} false; then :
3034  $as_echo_n "(cached) " >&6
3035else
3036  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3037/* end confdefs.h.  */
3038$4
3039#include <$2>
3040_ACEOF
3041if ac_fn_c_try_compile "$LINENO"; then :
3042  eval "$3=yes"
3043else
3044  eval "$3=no"
3045fi
3046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3047fi
3048eval ac_res=\$$3
3049	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3050$as_echo "$ac_res" >&6; }
3051  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3052
3053} # ac_fn_c_check_header_compile
3054cat >config.log <<_ACEOF
3055This file contains any messages produced by compilers while
3056running configure, to aid debugging if configure makes a mistake.
3057
3058It was created by OpenJDK $as_me jdk9, which was
3059generated by GNU Autoconf 2.69.  Invocation command line was
3060
3061  $ $0 $@
3062
3063_ACEOF
3064exec 5>>config.log
3065{
3066cat <<_ASUNAME
3067## --------- ##
3068## Platform. ##
3069## --------- ##
3070
3071hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3072uname -m = `(uname -m) 2>/dev/null || echo unknown`
3073uname -r = `(uname -r) 2>/dev/null || echo unknown`
3074uname -s = `(uname -s) 2>/dev/null || echo unknown`
3075uname -v = `(uname -v) 2>/dev/null || echo unknown`
3076
3077/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3078/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3079
3080/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3081/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3082/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3083/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3084/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3085/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3086/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3087
3088_ASUNAME
3089
3090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3091for as_dir in $PATH
3092do
3093  IFS=$as_save_IFS
3094  test -z "$as_dir" && as_dir=.
3095    $as_echo "PATH: $as_dir"
3096  done
3097IFS=$as_save_IFS
3098
3099} >&5
3100
3101cat >&5 <<_ACEOF
3102
3103
3104## ----------- ##
3105## Core tests. ##
3106## ----------- ##
3107
3108_ACEOF
3109
3110
3111# Keep a trace of the command line.
3112# Strip out --no-create and --no-recursion so they do not pile up.
3113# Strip out --silent because we don't want to record it for future runs.
3114# Also quote any args containing shell meta-characters.
3115# Make two passes to allow for proper duplicate-argument suppression.
3116ac_configure_args=
3117ac_configure_args0=
3118ac_configure_args1=
3119ac_must_keep_next=false
3120for ac_pass in 1 2
3121do
3122  for ac_arg
3123  do
3124    case $ac_arg in
3125    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3126    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3127    | -silent | --silent | --silen | --sile | --sil)
3128      continue ;;
3129    *\'*)
3130      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3131    esac
3132    case $ac_pass in
3133    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3134    2)
3135      as_fn_append ac_configure_args1 " '$ac_arg'"
3136      if test $ac_must_keep_next = true; then
3137	ac_must_keep_next=false # Got value, back to normal.
3138      else
3139	case $ac_arg in
3140	  *=* | --config-cache | -C | -disable-* | --disable-* \
3141	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3142	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3143	  | -with-* | --with-* | -without-* | --without-* | --x)
3144	    case "$ac_configure_args0 " in
3145	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3146	    esac
3147	    ;;
3148	  -* ) ac_must_keep_next=true ;;
3149	esac
3150      fi
3151      as_fn_append ac_configure_args " '$ac_arg'"
3152      ;;
3153    esac
3154  done
3155done
3156{ ac_configure_args0=; unset ac_configure_args0;}
3157{ ac_configure_args1=; unset ac_configure_args1;}
3158
3159# When interrupted or exit'd, cleanup temporary files, and complete
3160# config.log.  We remove comments because anyway the quotes in there
3161# would cause problems or look ugly.
3162# WARNING: Use '\'' to represent an apostrophe within the trap.
3163# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3164trap 'exit_status=$?
3165  # Save into config.log some information that might help in debugging.
3166  {
3167    echo
3168
3169    $as_echo "## ---------------- ##
3170## Cache variables. ##
3171## ---------------- ##"
3172    echo
3173    # The following way of writing the cache mishandles newlines in values,
3174(
3175  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3176    eval ac_val=\$$ac_var
3177    case $ac_val in #(
3178    *${as_nl}*)
3179      case $ac_var in #(
3180      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3181$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3182      esac
3183      case $ac_var in #(
3184      _ | IFS | as_nl) ;; #(
3185      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3186      *) { eval $ac_var=; unset $ac_var;} ;;
3187      esac ;;
3188    esac
3189  done
3190  (set) 2>&1 |
3191    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3192    *${as_nl}ac_space=\ *)
3193      sed -n \
3194	"s/'\''/'\''\\\\'\'''\''/g;
3195	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3196      ;; #(
3197    *)
3198      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3199      ;;
3200    esac |
3201    sort
3202)
3203    echo
3204
3205    $as_echo "## ----------------- ##
3206## Output variables. ##
3207## ----------------- ##"
3208    echo
3209    for ac_var in $ac_subst_vars
3210    do
3211      eval ac_val=\$$ac_var
3212      case $ac_val in
3213      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3214      esac
3215      $as_echo "$ac_var='\''$ac_val'\''"
3216    done | sort
3217    echo
3218
3219    if test -n "$ac_subst_files"; then
3220      $as_echo "## ------------------- ##
3221## File substitutions. ##
3222## ------------------- ##"
3223      echo
3224      for ac_var in $ac_subst_files
3225      do
3226	eval ac_val=\$$ac_var
3227	case $ac_val in
3228	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3229	esac
3230	$as_echo "$ac_var='\''$ac_val'\''"
3231      done | sort
3232      echo
3233    fi
3234
3235    if test -s confdefs.h; then
3236      $as_echo "## ----------- ##
3237## confdefs.h. ##
3238## ----------- ##"
3239      echo
3240      cat confdefs.h
3241      echo
3242    fi
3243    test "$ac_signal" != 0 &&
3244      $as_echo "$as_me: caught signal $ac_signal"
3245    $as_echo "$as_me: exit $exit_status"
3246  } >&5
3247  rm -f core *.core core.conftest.* &&
3248    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3249    exit $exit_status
3250' 0
3251for ac_signal in 1 2 13 15; do
3252  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3253done
3254ac_signal=0
3255
3256# confdefs.h avoids OS command line length limits that DEFS can exceed.
3257rm -f -r conftest* confdefs.h
3258
3259$as_echo "/* confdefs.h */" > confdefs.h
3260
3261# Predefined preprocessor variables.
3262
3263cat >>confdefs.h <<_ACEOF
3264#define PACKAGE_NAME "$PACKAGE_NAME"
3265_ACEOF
3266
3267cat >>confdefs.h <<_ACEOF
3268#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3269_ACEOF
3270
3271cat >>confdefs.h <<_ACEOF
3272#define PACKAGE_VERSION "$PACKAGE_VERSION"
3273_ACEOF
3274
3275cat >>confdefs.h <<_ACEOF
3276#define PACKAGE_STRING "$PACKAGE_STRING"
3277_ACEOF
3278
3279cat >>confdefs.h <<_ACEOF
3280#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3281_ACEOF
3282
3283cat >>confdefs.h <<_ACEOF
3284#define PACKAGE_URL "$PACKAGE_URL"
3285_ACEOF
3286
3287
3288# Let the site file select an alternate cache file if it wants to.
3289# Prefer an explicitly selected file to automatically selected ones.
3290ac_site_file1=NONE
3291ac_site_file2=NONE
3292if test -n "$CONFIG_SITE"; then
3293  # We do not want a PATH search for config.site.
3294  case $CONFIG_SITE in #((
3295    -*)  ac_site_file1=./$CONFIG_SITE;;
3296    */*) ac_site_file1=$CONFIG_SITE;;
3297    *)   ac_site_file1=./$CONFIG_SITE;;
3298  esac
3299elif test "x$prefix" != xNONE; then
3300  ac_site_file1=$prefix/share/config.site
3301  ac_site_file2=$prefix/etc/config.site
3302else
3303  ac_site_file1=$ac_default_prefix/share/config.site
3304  ac_site_file2=$ac_default_prefix/etc/config.site
3305fi
3306for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3307do
3308  test "x$ac_site_file" = xNONE && continue
3309  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3310    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3311$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3312    sed 's/^/| /' "$ac_site_file" >&5
3313    . "$ac_site_file" \
3314      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3316as_fn_error $? "failed to load site script $ac_site_file
3317See \`config.log' for more details" "$LINENO" 5; }
3318  fi
3319done
3320
3321if test -r "$cache_file"; then
3322  # Some versions of bash will fail to source /dev/null (special files
3323  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3324  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3325    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3326$as_echo "$as_me: loading cache $cache_file" >&6;}
3327    case $cache_file in
3328      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3329      *)                      . "./$cache_file";;
3330    esac
3331  fi
3332else
3333  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3334$as_echo "$as_me: creating cache $cache_file" >&6;}
3335  >$cache_file
3336fi
3337
3338# Check that the precious variables saved in the cache have kept the same
3339# value.
3340ac_cache_corrupted=false
3341for ac_var in $ac_precious_vars; do
3342  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3343  eval ac_new_set=\$ac_env_${ac_var}_set
3344  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3345  eval ac_new_val=\$ac_env_${ac_var}_value
3346  case $ac_old_set,$ac_new_set in
3347    set,)
3348      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3349$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3350      ac_cache_corrupted=: ;;
3351    ,set)
3352      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3353$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3354      ac_cache_corrupted=: ;;
3355    ,);;
3356    *)
3357      if test "x$ac_old_val" != "x$ac_new_val"; then
3358	# differences in whitespace do not lead to failure.
3359	ac_old_val_w=`echo x $ac_old_val`
3360	ac_new_val_w=`echo x $ac_new_val`
3361	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3362	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3363$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3364	  ac_cache_corrupted=:
3365	else
3366	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3367$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3368	  eval $ac_var=\$ac_old_val
3369	fi
3370	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3371$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3372	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3373$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3374      fi;;
3375  esac
3376  # Pass precious variables to config.status.
3377  if test "$ac_new_set" = set; then
3378    case $ac_new_val in
3379    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3380    *) ac_arg=$ac_var=$ac_new_val ;;
3381    esac
3382    case " $ac_configure_args " in
3383      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3384      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3385    esac
3386  fi
3387done
3388if $ac_cache_corrupted; then
3389  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3390$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3391  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3392$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3393  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3394fi
3395## -------------------- ##
3396## Main body of script. ##
3397## -------------------- ##
3398
3399ac_ext=c
3400ac_cpp='$CPP $CPPFLAGS'
3401ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3402ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3403ac_compiler_gnu=$ac_cv_c_compiler_gnu
3404
3405
3406
3407ac_aux_dir=
3408for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3409  if test -f "$ac_dir/install-sh"; then
3410    ac_aux_dir=$ac_dir
3411    ac_install_sh="$ac_aux_dir/install-sh -c"
3412    break
3413  elif test -f "$ac_dir/install.sh"; then
3414    ac_aux_dir=$ac_dir
3415    ac_install_sh="$ac_aux_dir/install.sh -c"
3416    break
3417  elif test -f "$ac_dir/shtool"; then
3418    ac_aux_dir=$ac_dir
3419    ac_install_sh="$ac_aux_dir/shtool install -c"
3420    break
3421  fi
3422done
3423if test -z "$ac_aux_dir"; then
3424  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
3425fi
3426
3427# These three variables are undocumented and unsupported,
3428# and are intended to be withdrawn in a future Autoconf release.
3429# They can cause serious problems if a builder's source tree is in a directory
3430# whose full name contains unusual characters.
3431ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3432ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3433ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3434
3435
3436# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3437
3438#
3439# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3440# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3441#
3442# This code is free software; you can redistribute it and/or modify it
3443# under the terms of the GNU General Public License version 2 only, as
3444# published by the Free Software Foundation.  Oracle designates this
3445# particular file as subject to the "Classpath" exception as provided
3446# by Oracle in the LICENSE file that accompanied this code.
3447#
3448# This code is distributed in the hope that it will be useful, but WITHOUT
3449# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3450# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3451# version 2 for more details (a copy is included in the LICENSE file that
3452# accompanied this code).
3453#
3454# You should have received a copy of the GNU General Public License version
3455# 2 along with this work; if not, write to the Free Software Foundation,
3456# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3457#
3458# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3459# or visit www.oracle.com if you need additional information or have any
3460# questions.
3461#
3462
3463#
3464# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3465#
3466# This program is free software; you can redistribute it and/or modify
3467# it under the terms of the GNU General Public License as published by
3468# the Free Software Foundation; either version 2 of the License, or
3469# (at your option) any later version.
3470#
3471# This program is distributed in the hope that it will be useful, but
3472# WITHOUT ANY WARRANTY; without even the implied warranty of
3473# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3474# General Public License for more details.
3475#
3476# You should have received a copy of the GNU General Public License
3477# along with this program; if not, write to the Free Software
3478# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3479#
3480# As a special exception to the GNU General Public License, if you
3481# distribute this file as part of a program that contains a
3482# configuration script generated by Autoconf, you may include it under
3483# the same distribution terms that you use for the rest of that program.
3484
3485# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3486# ----------------------------------
3487# PKG_PROG_PKG_CONFIG
3488
3489# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3490#
3491# Check to see whether a particular set of modules exists.  Similar
3492# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3493#
3494#
3495# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3496# this or PKG_CHECK_MODULES is called, or make sure to call
3497# PKG_CHECK_EXISTS manually
3498# --------------------------------------------------------------
3499
3500
3501
3502# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3503# ---------------------------------------------
3504# _PKG_CONFIG
3505
3506# _PKG_SHORT_ERRORS_SUPPORTED
3507# -----------------------------
3508# _PKG_SHORT_ERRORS_SUPPORTED
3509
3510
3511# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3512# [ACTION-IF-NOT-FOUND])
3513#
3514#
3515# Note that if there is a possibility the first call to
3516# PKG_CHECK_MODULES might not happen, you should be sure to include an
3517# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3518#
3519#
3520# --------------------------------------------------------------
3521# PKG_CHECK_MODULES
3522
3523
3524# Include these first...
3525#
3526# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3527# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3528#
3529# This code is free software; you can redistribute it and/or modify it
3530# under the terms of the GNU General Public License version 2 only, as
3531# published by the Free Software Foundation.  Oracle designates this
3532# particular file as subject to the "Classpath" exception as provided
3533# by Oracle in the LICENSE file that accompanied this code.
3534#
3535# This code is distributed in the hope that it will be useful, but WITHOUT
3536# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3537# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3538# version 2 for more details (a copy is included in the LICENSE file that
3539# accompanied this code).
3540#
3541# You should have received a copy of the GNU General Public License version
3542# 2 along with this work; if not, write to the Free Software Foundation,
3543# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3544#
3545# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3546# or visit www.oracle.com if you need additional information or have any
3547# questions.
3548#
3549
3550# Create a function/macro that takes a series of named arguments. The call is
3551# similar to AC_DEFUN, but the setup of the function looks like this:
3552# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3553# ... do something
3554#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3555# ])
3556# A star (*) in front of a named argument means that it is required and it's
3557# presence will be verified. To pass e.g. the first value as a normal indexed
3558# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3559# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3560# "ARG_FOO".
3561#
3562# The generated function can be called like this:
3563# MYFUNC(FOO: [foo-val],
3564#     BAR: [
3565#         $ECHO hello world
3566#     ])
3567# Note that the argument value must start on the same line as the argument name.
3568#
3569# Argument 1: Name of the function to define
3570# Argument 2: List of legal named arguments, with a * prefix for required arguments
3571# Argument 3: Argument array to treat as named, typically $@
3572# Argument 4: The main function body
3573
3574
3575# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3576# If so, then append $1 to $2 \
3577# Also set JVM_ARG_OK to true/false depending on outcome.
3578
3579
3580# Appends a string to a path variable, only adding the : when needed.
3581
3582
3583# Prepends a string to a path variable, only adding the : when needed.
3584
3585
3586# This will make sure the given variable points to a full and proper
3587# path. This means:
3588# 1) There will be no spaces in the path. On unix platforms,
3589#    spaces in the path will result in an error. On Windows,
3590#    the path will be rewritten using short-style to be space-free.
3591# 2) The path will be absolute, and it will be in unix-style (on
3592#     cygwin).
3593# $1: The name of the variable to fix
3594
3595
3596# This will make sure the given variable points to a executable
3597# with a full and proper path. This means:
3598# 1) There will be no spaces in the path. On unix platforms,
3599#    spaces in the path will result in an error. On Windows,
3600#    the path will be rewritten using short-style to be space-free.
3601# 2) The path will be absolute, and it will be in unix-style (on
3602#     cygwin).
3603# Any arguments given to the executable is preserved.
3604# If the input variable does not have a directory specification, then
3605# it need to be in the PATH.
3606# $1: The name of the variable to fix
3607
3608
3609
3610
3611# Register a --with argument but mark it as deprecated
3612# $1: The name of the with argument to deprecate, not including --with-
3613
3614
3615# Register a --enable argument but mark it as deprecated
3616# $1: The name of the with argument to deprecate, not including --enable-
3617# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3618# $3: Messages to user.
3619
3620
3621
3622
3623# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3624# $1: variable to check
3625
3626
3627# Check that there are no unprocessed overridden variables left.
3628# If so, they are an incorrect argument and we will exit with an error.
3629
3630
3631# Setup a tool for the given variable. If correctly specified by the user,
3632# use that value, otherwise search for the tool using the supplied code snippet.
3633# $1: variable to set
3634# $2: code snippet to call to look for the tool
3635# $3: code snippet to call if variable was used to find tool
3636
3637
3638# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3639# $1: variable to set
3640# $2: executable name (or list of names) to look for
3641
3642
3643# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3644# $1: variable to set
3645# $2: executable name (or list of names) to look for
3646
3647
3648# Like BASIC_PATH_PROGS but fails if no tool was found.
3649# $1: variable to set
3650# $2: executable name (or list of names) to look for
3651
3652
3653# Like BASIC_SETUP_TOOL but fails if no tool was found.
3654# $1: variable to set
3655# $2: autoconf macro to call to look for the special tool
3656
3657
3658# Setup the most fundamental tools that relies on not much else to set up,
3659# but is used by much of the early bootstrap code.
3660
3661
3662# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3663
3664
3665# Evaluates platform specific overrides for devkit variables.
3666# $1: Name of variable
3667
3668
3669
3670
3671
3672
3673#%%% Simple tools %%%
3674
3675# Check if we have found a usable version of make
3676# $1: the path to a potential make binary (or empty)
3677# $2: the description on how we found this
3678
3679
3680
3681
3682# Goes looking for a usable version of GNU make.
3683
3684
3685
3686
3687
3688
3689# Check if build directory is on local disk. If not possible to determine,
3690# we prefer to claim it's local.
3691# Argument 1: directory to test
3692# Argument 2: what to do if it is on local disk
3693# Argument 3: what to do otherwise (remote disk or failure)
3694
3695
3696# Check that source files have basic read permissions set. This might
3697# not be the case in cygwin in certain conditions.
3698
3699
3700
3701
3702# Check for support for specific options in bash
3703
3704
3705################################################################################
3706#
3707# Default make target
3708#
3709
3710
3711# Code to run after AC_OUTPUT
3712
3713
3714#
3715# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3716# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3717#
3718# This code is free software; you can redistribute it and/or modify it
3719# under the terms of the GNU General Public License version 2 only, as
3720# published by the Free Software Foundation.  Oracle designates this
3721# particular file as subject to the "Classpath" exception as provided
3722# by Oracle in the LICENSE file that accompanied this code.
3723#
3724# This code is distributed in the hope that it will be useful, but WITHOUT
3725# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3726# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3727# version 2 for more details (a copy is included in the LICENSE file that
3728# accompanied this code).
3729#
3730# You should have received a copy of the GNU General Public License version
3731# 2 along with this work; if not, write to the Free Software Foundation,
3732# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3733#
3734# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3735# or visit www.oracle.com if you need additional information or have any
3736# questions.
3737#
3738
3739
3740
3741
3742
3743# Helper function which possibly converts a path using DOS-style short mode.
3744# If so, the updated path is stored in $new_path.
3745# $1: The path to check
3746
3747
3748# Helper function which possibly converts a path using DOS-style short mode.
3749# If so, the updated path is stored in $new_path.
3750# $1: The path to check
3751
3752
3753# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3754# and could probably be heavily simplified. However, all changes in this
3755# area tend to need lot of testing in different scenarios, and in lack of
3756# proper unit testing, cleaning this up has not been deemed worth the effort
3757# at the moment.
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3768
3769
3770
3771
3772# ... then the rest
3773#
3774# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3775# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3776#
3777# This code is free software; you can redistribute it and/or modify it
3778# under the terms of the GNU General Public License version 2 only, as
3779# published by the Free Software Foundation.  Oracle designates this
3780# particular file as subject to the "Classpath" exception as provided
3781# by Oracle in the LICENSE file that accompanied this code.
3782#
3783# This code is distributed in the hope that it will be useful, but WITHOUT
3784# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3785# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3786# version 2 for more details (a copy is included in the LICENSE file that
3787# accompanied this code).
3788#
3789# You should have received a copy of the GNU General Public License version
3790# 2 along with this work; if not, write to the Free Software Foundation,
3791# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3792#
3793# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3794# or visit www.oracle.com if you need additional information or have any
3795# questions.
3796#
3797
3798########################################################################
3799# This file handles detection of the Boot JDK. The Boot JDK detection
3800# process has been developed as a response to solve a complex real-world
3801# problem. Initially, it was simple, but it has grown as platform after
3802# platform, idiosyncracy after idiosyncracy has been supported.
3803#
3804# The basic idea is this:
3805# 1) You need an acceptable *) JDK to use as a Boot JDK
3806# 2) There are several ways to locate a JDK, that are mostly platform
3807#    dependent **)
3808# 3) You can have multiple JDKs installed
3809# 4) If possible, configure should try to dig out an acceptable JDK
3810#    automatically, without having to resort to command-line options
3811#
3812# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3813#     javac) and not a JRE, etc.
3814#
3815# **) On Windows we typically use a well-known path.
3816#     On MacOSX we typically use the tool java_home.
3817#     On Linux we typically find javac in the $PATH, and then follow a
3818#     chain of symlinks that often ends up in a real JDK.
3819#
3820# This leads to the code where we check in different ways to locate a
3821# JDK, and if one is found, check if it is acceptable. If not, we print
3822# our reasons for rejecting it (useful when debugging non-working
3823# configure situations) and continue checking the next one.
3824########################################################################
3825
3826# Execute the check given as argument, and verify the result
3827# If the Boot JDK was previously found, do nothing
3828# $1 A command line (typically autoconf macro) to execute
3829
3830
3831# Test: Is bootjdk explicitely set by command line arguments?
3832
3833
3834# Test: Is $JAVA_HOME set?
3835
3836
3837# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3838
3839
3840# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3841# $1: Argument to the java_home binary (optional)
3842
3843
3844# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3845
3846
3847# Look for a jdk in the given path. If there are multiple, try to select the newest.
3848# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3849# $1 = Path to directory containing jdk installations.
3850# $2 = String to append to the found JDK directory to get the proper JDK home
3851
3852
3853# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3854# environmental variable as base for where to look.
3855# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3856
3857
3858# Test: Is there a JDK installed in default, well-known locations?
3859
3860
3861# Check that a command-line tool in the Boot JDK is correct
3862# $1 = name of variable to assign
3863# $2 = name of binary
3864
3865
3866###############################################################################
3867#
3868# We need a Boot JDK to bootstrap the build.
3869#
3870
3871
3872
3873
3874
3875# BUILD_JDK: the location of the latest JDK that can run
3876#   on the host system and supports the target class file version
3877#   generated in this JDK build.  This variable should only be
3878#   used after the launchers are built.
3879#
3880
3881# Execute the check given as argument, and verify the result.
3882# If the JDK was previously found, do nothing.
3883# $1 A command line (typically autoconf macro) to execute
3884
3885
3886# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3887# is different than the host system doing the build (e.g. cross-compilation),
3888# a special BUILD_JDK is built as part of the build process.  An external
3889# prebuilt BUILD_JDK can also be supplied.
3890
3891
3892#
3893# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3894# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3895#
3896# This code is free software; you can redistribute it and/or modify it
3897# under the terms of the GNU General Public License version 2 only, as
3898# published by the Free Software Foundation.  Oracle designates this
3899# particular file as subject to the "Classpath" exception as provided
3900# by Oracle in the LICENSE file that accompanied this code.
3901#
3902# This code is distributed in the hope that it will be useful, but WITHOUT
3903# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3904# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3905# version 2 for more details (a copy is included in the LICENSE file that
3906# accompanied this code).
3907#
3908# You should have received a copy of the GNU General Public License version
3909# 2 along with this work; if not, write to the Free Software Foundation,
3910# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3911#
3912# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3913# or visit www.oracle.com if you need additional information or have any
3914# questions.
3915#
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933################################################################################
3934#
3935# Runs icecc-create-env once and prints the error if it fails
3936#
3937# $1: arguments to icecc-create-env
3938# $2: log file
3939#
3940
3941
3942################################################################################
3943#
3944# Optionally enable distributed compilation of native code using icecc/icecream
3945#
3946
3947
3948
3949
3950
3951
3952
3953#
3954# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3955# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3956#
3957# This code is free software; you can redistribute it and/or modify it
3958# under the terms of the GNU General Public License version 2 only, as
3959# published by the Free Software Foundation.  Oracle designates this
3960# particular file as subject to the "Classpath" exception as provided
3961# by Oracle in the LICENSE file that accompanied this code.
3962#
3963# This code is distributed in the hope that it will be useful, but WITHOUT
3964# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3965# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3966# version 2 for more details (a copy is included in the LICENSE file that
3967# accompanied this code).
3968#
3969# You should have received a copy of the GNU General Public License version
3970# 2 along with this work; if not, write to the Free Software Foundation,
3971# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3972#
3973# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3974# or visit www.oracle.com if you need additional information or have any
3975# questions.
3976#
3977
3978# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3979# corresponding configure arguments instead
3980
3981
3982# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3983# that configure can use them while detecting compilers.
3984# TOOLCHAIN_TYPE is available here.
3985# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3986
3987
3988
3989
3990
3991
3992# Documentation on common flags used for solstudio in HIGHEST.
3993#
3994# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3995#          done with care, there are some assumptions below that need to
3996#          be understood about the use of pointers, and IEEE behavior.
3997#
3998# -fns: Use non-standard floating point mode (not IEEE 754)
3999# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4000# -fsingle: Use single precision floating point with 'float'
4001# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4002#   (Source with excessing pointer casting and data access with mixed
4003#    pointer types are not recommended)
4004# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4005#   (If you expect perfect errno behavior, do not use this)
4006# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4007# -xrestrict: Pointer parameters to functions do not overlap
4008#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4009#    If you pass in multiple pointers to the same data, do not use this)
4010# -xlibmil: Inline some library routines
4011#   (If you expect perfect errno behavior, do not use this)
4012# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4013#   (If you expect perfect errno behavior, do not use this)
4014#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4015
4016    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4017    # Bug?
4018    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4019    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4020    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4021    #fi
4022
4023
4024
4025
4026
4027
4028################################################################################
4029# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4030#      conditionals against.
4031# $2 - Optional prefix for each variable defined.
4032
4033
4034# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4035#                                  IF_FALSE: [RUN-IF-FALSE])
4036# ------------------------------------------------------------
4037# Check that the C compiler supports an argument
4038
4039
4040
4041
4042# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4043#                                    IF_FALSE: [RUN-IF-FALSE])
4044# ------------------------------------------------------------
4045# Check that the C++ compiler supports an argument
4046
4047
4048
4049
4050# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4051#                                IF_FALSE: [RUN-IF-FALSE])
4052# ------------------------------------------------------------
4053# Check that the C and C++ compilers support an argument
4054
4055
4056
4057
4058# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4059#                                   IF_FALSE: [RUN-IF-FALSE])
4060# ------------------------------------------------------------
4061# Check that the linker support an argument
4062
4063
4064
4065
4066
4067
4068
4069
4070#
4071# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4072# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4073#
4074# This code is free software; you can redistribute it and/or modify it
4075# under the terms of the GNU General Public License version 2 only, as
4076# published by the Free Software Foundation.  Oracle designates this
4077# particular file as subject to the "Classpath" exception as provided
4078# by Oracle in the LICENSE file that accompanied this code.
4079#
4080# This code is distributed in the hope that it will be useful, but WITHOUT
4081# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4082# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4083# version 2 for more details (a copy is included in the LICENSE file that
4084# accompanied this code).
4085#
4086# You should have received a copy of the GNU General Public License version
4087# 2 along with this work; if not, write to the Free Software Foundation,
4088# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4089#
4090# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4091# or visit www.oracle.com if you need additional information or have any
4092# questions.
4093#
4094
4095
4096
4097
4098
4099cygwin_help() {
4100  case $1 in
4101    unzip)
4102      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4103      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4104      ;;
4105    zip)
4106      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4107      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4108      ;;
4109    make)
4110      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4111      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4112      ;;
4113    freetype)
4114      HELP_MSG="
4115The freetype library can now be build during the configure process.
4116Download the freetype sources and unpack them into an arbitrary directory:
4117
4118wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4119tar -xzf freetype-2.5.3.tar.gz
4120
4121Then run configure with '--with-freetype-src=<freetype_src>'. This will
4122automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4123builds or into '<freetype_src>/lib32' for 32-bit builds.
4124Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4125and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4126
4127Alternatively you can unpack the sources like this to use the default directory:
4128
4129tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4130      ;;
4131  esac
4132}
4133
4134msys_help() {
4135  PKGHANDLER_COMMAND=""
4136}
4137
4138apt_help() {
4139  case $1 in
4140    reduced)
4141      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4142    devkit)
4143      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4144    openjdk)
4145      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4146    alsa)
4147      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4148    cups)
4149      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4150    freetype)
4151      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4152    ffi)
4153      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4154    x11)
4155      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4156    ccache)
4157      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4158    dtrace)
4159      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4160  esac
4161}
4162
4163yum_help() {
4164  case $1 in
4165    devkit)
4166      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4167    openjdk)
4168      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4169    alsa)
4170      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4171    cups)
4172      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4173    freetype)
4174      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4175    x11)
4176      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4177    ccache)
4178      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4179  esac
4180}
4181
4182port_help() {
4183  PKGHANDLER_COMMAND=""
4184}
4185
4186pkgutil_help() {
4187  PKGHANDLER_COMMAND=""
4188}
4189
4190pkgadd_help() {
4191  PKGHANDLER_COMMAND=""
4192}
4193
4194# This function will check if we're called from the "configure" wrapper while
4195# printing --help. If so, we will print out additional information that can
4196# only be extracted within the autoconf script, and then exit. This must be
4197# called at the very beginning in configure.ac.
4198
4199
4200
4201
4202
4203
4204#
4205# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4206# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4207#
4208# This code is free software; you can redistribute it and/or modify it
4209# under the terms of the GNU General Public License version 2 only, as
4210# published by the Free Software Foundation.  Oracle designates this
4211# particular file as subject to the "Classpath" exception as provided
4212# by Oracle in the LICENSE file that accompanied this code.
4213#
4214# This code is distributed in the hope that it will be useful, but WITHOUT
4215# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4216# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4217# version 2 for more details (a copy is included in the LICENSE file that
4218# accompanied this code).
4219#
4220# You should have received a copy of the GNU General Public License version
4221# 2 along with this work; if not, write to the Free Software Foundation,
4222# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4223#
4224# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4225# or visit www.oracle.com if you need additional information or have any
4226# questions.
4227#
4228
4229# All valid JVM features, regardless of platform
4230VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4231    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4232
4233# All valid JVM variants
4234VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4235
4236###############################################################################
4237# Check if the specified JVM variant should be built. To be used in shell if
4238# constructs, like this:
4239# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4240#
4241# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4242
4243# Definition kept in one line to allow inlining in if statements.
4244# Additional [] needed to keep m4 from mangling shell constructs.
4245
4246
4247###############################################################################
4248# Check if the specified JVM features are explicitly enabled. To be used in
4249# shell if constructs, like this:
4250# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4251#
4252# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4253
4254# Definition kept in one line to allow inlining in if statements.
4255# Additional [] needed to keep m4 from mangling shell constructs.
4256
4257
4258###############################################################################
4259# Check which variants of the JVM that we want to build. Available variants are:
4260#   server: normal interpreter, and a tiered C1/C2 compiler
4261#   client: normal interpreter, and C1 (no C2 compiler)
4262#   minimal: reduced form of client with optional features stripped out
4263#   core: normal interpreter only, no compiler
4264#   zero: C++ based interpreter only, no compiler
4265#   zeroshark: C++ based interpreter, and a llvm-based compiler
4266#   custom: baseline JVM with no default features
4267#
4268
4269
4270###############################################################################
4271# Check if dtrace should be enabled and has all prerequisites present.
4272#
4273
4274
4275###############################################################################
4276# Set up all JVM features for each JVM variant.
4277#
4278
4279
4280###############################################################################
4281# Validate JVM features once all setup is complete, including custom setup.
4282#
4283
4284
4285#
4286# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4287# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4288#
4289# This code is free software; you can redistribute it and/or modify it
4290# under the terms of the GNU General Public License version 2 only, as
4291# published by the Free Software Foundation.  Oracle designates this
4292# particular file as subject to the "Classpath" exception as provided
4293# by Oracle in the LICENSE file that accompanied this code.
4294#
4295# This code is distributed in the hope that it will be useful, but WITHOUT
4296# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4297# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4298# version 2 for more details (a copy is included in the LICENSE file that
4299# accompanied this code).
4300#
4301# You should have received a copy of the GNU General Public License version
4302# 2 along with this work; if not, write to the Free Software Foundation,
4303# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4304#
4305# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4306# or visit www.oracle.com if you need additional information or have any
4307# questions.
4308#
4309
4310###############################################################################
4311# Check which variant of the JDK that we want to build.
4312# Currently we have:
4313#    normal:   standard edition
4314# but the custom make system may add other variants
4315#
4316# Effectively the JDK variant gives a name to a specific set of
4317# modules to compile into the JDK.
4318
4319
4320###############################################################################
4321# Set the debug level
4322#    release: no debug information, all optimizations, no asserts.
4323#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4324#    fastdebug: debug information (-g), all optimizations, all asserts
4325#    slowdebug: debug information (-g), no optimizations, all asserts
4326
4327
4328###############################################################################
4329#
4330# Should we build only OpenJDK even if closed sources are present?
4331#
4332
4333
4334
4335
4336###############################################################################
4337#
4338# Enable or disable the elliptic curve crypto implementation
4339#
4340
4341
4342
4343
4344################################################################################
4345#
4346# Gcov coverage data for hotspot
4347#
4348
4349
4350################################################################################
4351#
4352# Static build support.  When enabled will generate static
4353# libraries instead of shared libraries for all JDK libs.
4354#
4355
4356
4357################################################################################
4358#
4359# jlink options.
4360# We always keep packaged modules in JDK image.
4361#
4362
4363
4364################################################################################
4365#
4366# Check if building of the jtreg failure handler should be enabled.
4367#
4368
4369
4370#
4371# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4372# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4373#
4374# This code is free software; you can redistribute it and/or modify it
4375# under the terms of the GNU General Public License version 2 only, as
4376# published by the Free Software Foundation.  Oracle designates this
4377# particular file as subject to the "Classpath" exception as provided
4378# by Oracle in the LICENSE file that accompanied this code.
4379#
4380# This code is distributed in the hope that it will be useful, but WITHOUT
4381# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4382# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4383# version 2 for more details (a copy is included in the LICENSE file that
4384# accompanied this code).
4385#
4386# You should have received a copy of the GNU General Public License version
4387# 2 along with this work; if not, write to the Free Software Foundation,
4388# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4389#
4390# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4391# or visit www.oracle.com if you need additional information or have any
4392# questions.
4393#
4394
4395###############################################################################
4396#
4397# Setup version numbers
4398#
4399
4400# Verify that a given string represents a valid version number, and assign it
4401# to a variable.
4402
4403# Argument 1: the variable to assign to
4404# Argument 2: the value given by the user
4405
4406
4407
4408
4409#
4410# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4411# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4412#
4413# This code is free software; you can redistribute it and/or modify it
4414# under the terms of the GNU General Public License version 2 only, as
4415# published by the Free Software Foundation.  Oracle designates this
4416# particular file as subject to the "Classpath" exception as provided
4417# by Oracle in the LICENSE file that accompanied this code.
4418#
4419# This code is distributed in the hope that it will be useful, but WITHOUT
4420# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4421# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4422# version 2 for more details (a copy is included in the LICENSE file that
4423# accompanied this code).
4424#
4425# You should have received a copy of the GNU General Public License version
4426# 2 along with this work; if not, write to the Free Software Foundation,
4427# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4428#
4429# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4430# or visit www.oracle.com if you need additional information or have any
4431# questions.
4432#
4433
4434# Major library component reside in separate files.
4435#
4436# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4437# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4438#
4439# This code is free software; you can redistribute it and/or modify it
4440# under the terms of the GNU General Public License version 2 only, as
4441# published by the Free Software Foundation.  Oracle designates this
4442# particular file as subject to the "Classpath" exception as provided
4443# by Oracle in the LICENSE file that accompanied this code.
4444#
4445# This code is distributed in the hope that it will be useful, but WITHOUT
4446# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4447# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4448# version 2 for more details (a copy is included in the LICENSE file that
4449# accompanied this code).
4450#
4451# You should have received a copy of the GNU General Public License version
4452# 2 along with this work; if not, write to the Free Software Foundation,
4453# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4454#
4455# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4456# or visit www.oracle.com if you need additional information or have any
4457# questions.
4458#
4459
4460################################################################################
4461# Setup alsa (Advanced Linux Sound Architecture)
4462################################################################################
4463
4464
4465#
4466# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4467# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4468#
4469# This code is free software; you can redistribute it and/or modify it
4470# under the terms of the GNU General Public License version 2 only, as
4471# published by the Free Software Foundation.  Oracle designates this
4472# particular file as subject to the "Classpath" exception as provided
4473# by Oracle in the LICENSE file that accompanied this code.
4474#
4475# This code is distributed in the hope that it will be useful, but WITHOUT
4476# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4477# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4478# version 2 for more details (a copy is included in the LICENSE file that
4479# accompanied this code).
4480#
4481# You should have received a copy of the GNU General Public License version
4482# 2 along with this work; if not, write to the Free Software Foundation,
4483# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4484#
4485# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4486# or visit www.oracle.com if you need additional information or have any
4487# questions.
4488#
4489
4490################################################################################
4491# Setup bundled libraries.
4492#
4493# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4494# OpenJDK repository. Default is to use these libraries as bundled, but they
4495# might be replaced by en external version by the user.
4496################################################################################
4497
4498
4499################################################################################
4500# Setup libjpeg
4501################################################################################
4502
4503
4504################################################################################
4505# Setup giflib
4506################################################################################
4507
4508
4509################################################################################
4510# Setup libpng
4511################################################################################
4512
4513
4514################################################################################
4515# Setup zlib
4516################################################################################
4517
4518
4519################################################################################
4520# Setup lcms (Little CMS)
4521################################################################################
4522
4523
4524#
4525# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4526# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4527#
4528# This code is free software; you can redistribute it and/or modify it
4529# under the terms of the GNU General Public License version 2 only, as
4530# published by the Free Software Foundation.  Oracle designates this
4531# particular file as subject to the "Classpath" exception as provided
4532# by Oracle in the LICENSE file that accompanied this code.
4533#
4534# This code is distributed in the hope that it will be useful, but WITHOUT
4535# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4536# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4537# version 2 for more details (a copy is included in the LICENSE file that
4538# accompanied this code).
4539#
4540# You should have received a copy of the GNU General Public License version
4541# 2 along with this work; if not, write to the Free Software Foundation,
4542# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4543#
4544# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4545# or visit www.oracle.com if you need additional information or have any
4546# questions.
4547#
4548
4549################################################################################
4550# Setup cups (Common Unix Printing System)
4551################################################################################
4552
4553
4554#
4555# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4556# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4557#
4558# This code is free software; you can redistribute it and/or modify it
4559# under the terms of the GNU General Public License version 2 only, as
4560# published by the Free Software Foundation.  Oracle designates this
4561# particular file as subject to the "Classpath" exception as provided
4562# by Oracle in the LICENSE file that accompanied this code.
4563#
4564# This code is distributed in the hope that it will be useful, but WITHOUT
4565# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4566# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4567# version 2 for more details (a copy is included in the LICENSE file that
4568# accompanied this code).
4569#
4570# You should have received a copy of the GNU General Public License version
4571# 2 along with this work; if not, write to the Free Software Foundation,
4572# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4573#
4574# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4575# or visit www.oracle.com if you need additional information or have any
4576# questions.
4577#
4578
4579################################################################################
4580# Setup libffi (Foreign Function Interface)
4581################################################################################
4582
4583
4584#
4585# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4586# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4587#
4588# This code is free software; you can redistribute it and/or modify it
4589# under the terms of the GNU General Public License version 2 only, as
4590# published by the Free Software Foundation.  Oracle designates this
4591# particular file as subject to the "Classpath" exception as provided
4592# by Oracle in the LICENSE file that accompanied this code.
4593#
4594# This code is distributed in the hope that it will be useful, but WITHOUT
4595# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4596# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4597# version 2 for more details (a copy is included in the LICENSE file that
4598# accompanied this code).
4599#
4600# You should have received a copy of the GNU General Public License version
4601# 2 along with this work; if not, write to the Free Software Foundation,
4602# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4603#
4604# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4605# or visit www.oracle.com if you need additional information or have any
4606# questions.
4607#
4608
4609################################################################################
4610# Build the freetype lib from source
4611################################################################################
4612
4613
4614################################################################################
4615# Check if a potential freeype library match is correct and usable
4616################################################################################
4617
4618
4619################################################################################
4620# Setup freetype (The FreeType2 font rendering library)
4621################################################################################
4622
4623
4624#
4625# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4626# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4627#
4628# This code is free software; you can redistribute it and/or modify it
4629# under the terms of the GNU General Public License version 2 only, as
4630# published by the Free Software Foundation.  Oracle designates this
4631# particular file as subject to the "Classpath" exception as provided
4632# by Oracle in the LICENSE file that accompanied this code.
4633#
4634# This code is distributed in the hope that it will be useful, but WITHOUT
4635# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4636# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4637# version 2 for more details (a copy is included in the LICENSE file that
4638# accompanied this code).
4639#
4640# You should have received a copy of the GNU General Public License version
4641# 2 along with this work; if not, write to the Free Software Foundation,
4642# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4643#
4644# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4645# or visit www.oracle.com if you need additional information or have any
4646# questions.
4647#
4648
4649################################################################################
4650# Setup the standard C/C++ runtime libraries.
4651#
4652# Most importantly, determine if stdc++ should be linked statically or
4653# dynamically.
4654################################################################################
4655
4656
4657#
4658# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4659# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4660#
4661# This code is free software; you can redistribute it and/or modify it
4662# under the terms of the GNU General Public License version 2 only, as
4663# published by the Free Software Foundation.  Oracle designates this
4664# particular file as subject to the "Classpath" exception as provided
4665# by Oracle in the LICENSE file that accompanied this code.
4666#
4667# This code is distributed in the hope that it will be useful, but WITHOUT
4668# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4669# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4670# version 2 for more details (a copy is included in the LICENSE file that
4671# accompanied this code).
4672#
4673# You should have received a copy of the GNU General Public License version
4674# 2 along with this work; if not, write to the Free Software Foundation,
4675# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4676#
4677# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4678# or visit www.oracle.com if you need additional information or have any
4679# questions.
4680#
4681
4682################################################################################
4683# Setup X11 Windows system
4684################################################################################
4685
4686
4687
4688################################################################################
4689# Determine which libraries are needed for this configuration
4690################################################################################
4691
4692
4693################################################################################
4694# Parse library options, and setup needed libraries
4695################################################################################
4696
4697
4698################################################################################
4699# Setup llvm (Low-Level VM)
4700################################################################################
4701
4702
4703################################################################################
4704# Setup various libraries, typically small system libraries
4705################################################################################
4706
4707
4708################################################################################
4709# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4710# redistribute it in the test image.
4711################################################################################
4712
4713
4714
4715#
4716# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4717# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4718#
4719# This code is free software; you can redistribute it and/or modify it
4720# under the terms of the GNU General Public License version 2 only, as
4721# published by the Free Software Foundation.  Oracle designates this
4722# particular file as subject to the "Classpath" exception as provided
4723# by Oracle in the LICENSE file that accompanied this code.
4724#
4725# This code is distributed in the hope that it will be useful, but WITHOUT
4726# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4727# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4728# version 2 for more details (a copy is included in the LICENSE file that
4729# accompanied this code).
4730#
4731# You should have received a copy of the GNU General Public License version
4732# 2 along with this work; if not, write to the Free Software Foundation,
4733# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4734#
4735# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4736# or visit www.oracle.com if you need additional information or have any
4737# questions.
4738#
4739
4740# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4741# Converts autoconf style CPU name to OpenJDK style, into
4742# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4743
4744
4745# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4746# Converts autoconf style OS name to OpenJDK style, into
4747# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4748
4749
4750# Expects $host_os $host_cpu $build_os and $build_cpu
4751# and $with_target_bits to have been setup!
4752#
4753# Translate the standard triplet(quadruplet) definition
4754# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4755# OPENJDK_BUILD_OS, etc.
4756
4757
4758# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4759# accordingly. Must be done after setting up build and target system, but before
4760# doing anything else with these values.
4761
4762
4763# Setup the legacy variables, for controlling the old makefiles.
4764#
4765
4766
4767# $1 - Either TARGET or BUILD to setup the variables for.
4768
4769
4770
4771
4772#%%% Build and target systems %%%
4773
4774
4775
4776
4777# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4778# Add -mX to various FLAGS variables.
4779
4780
4781
4782
4783
4784
4785#
4786# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4787# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4788#
4789# This code is free software; you can redistribute it and/or modify it
4790# under the terms of the GNU General Public License version 2 only, as
4791# published by the Free Software Foundation.  Oracle designates this
4792# particular file as subject to the "Classpath" exception as provided
4793# by Oracle in the LICENSE file that accompanied this code.
4794#
4795# This code is distributed in the hope that it will be useful, but WITHOUT
4796# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4797# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4798# version 2 for more details (a copy is included in the LICENSE file that
4799# accompanied this code).
4800#
4801# You should have received a copy of the GNU General Public License version
4802# 2 along with this work; if not, write to the Free Software Foundation,
4803# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4804#
4805# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4806# or visit www.oracle.com if you need additional information or have any
4807# questions.
4808#
4809
4810
4811
4812
4813
4814
4815
4816################################################################################
4817# Define a mechanism for importing extra prebuilt modules
4818#
4819
4820
4821
4822#
4823# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4824# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4825#
4826# This code is free software; you can redistribute it and/or modify it
4827# under the terms of the GNU General Public License version 2 only, as
4828# published by the Free Software Foundation.  Oracle designates this
4829# particular file as subject to the "Classpath" exception as provided
4830# by Oracle in the LICENSE file that accompanied this code.
4831#
4832# This code is distributed in the hope that it will be useful, but WITHOUT
4833# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4834# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4835# version 2 for more details (a copy is included in the LICENSE file that
4836# accompanied this code).
4837#
4838# You should have received a copy of the GNU General Public License version
4839# 2 along with this work; if not, write to the Free Software Foundation,
4840# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4841#
4842# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4843# or visit www.oracle.com if you need additional information or have any
4844# questions.
4845#
4846
4847########################################################################
4848# This file is responsible for detecting, verifying and setting up the
4849# toolchain, i.e. the compiler, linker and related utilities. It will setup
4850# proper paths to the binaries, but it will not setup any flags.
4851#
4852# The binaries used is determined by the toolchain type, which is the family of
4853# compilers and related tools that are used.
4854########################################################################
4855
4856
4857# All valid toolchains, regardless of platform (used by help.m4)
4858VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4859
4860# These toolchains are valid on different platforms
4861VALID_TOOLCHAINS_linux="gcc clang"
4862VALID_TOOLCHAINS_solaris="solstudio"
4863VALID_TOOLCHAINS_macosx="gcc clang"
4864VALID_TOOLCHAINS_aix="xlc"
4865VALID_TOOLCHAINS_windows="microsoft"
4866
4867# Toolchain descriptions
4868TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4869TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4870TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4871TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4872TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4873
4874# Minimum supported versions, empty means unspecified
4875TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4876TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4877TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4878TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4879TOOLCHAIN_MINIMUM_VERSION_xlc=""
4880
4881# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4882# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4883# $1 - optional variable prefix for compiler and version variables (BUILD_)
4884# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4885
4886
4887# Check if the configured compiler (C and C++) is of a specific version or
4888# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4889#
4890# Arguments:
4891#   VERSION:   The version string to check against the found version
4892#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4893#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4894#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4895
4896
4897
4898
4899# Setup a number of variables describing how native output files are
4900# named on this platform/toolchain.
4901
4902
4903# Determine which toolchain type to use, and make sure it is valid for this
4904# platform. Setup various information about the selected toolchain.
4905
4906
4907# Before we start detecting the toolchain executables, we might need some
4908# special setup, e.g. additional paths etc.
4909
4910
4911# Restore path, etc
4912
4913
4914# Check if a compiler is of the toolchain type we expect, and save the version
4915# information from it. If the compiler does not match the expected type,
4916# this function will abort using AC_MSG_ERROR. If it matches, the version will
4917# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4918# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4919#
4920# $1 = compiler to test (CC or CXX)
4921# $2 = human readable name of compiler (C or C++)
4922
4923
4924# Try to locate the given C or C++ compiler in the path, or otherwise.
4925#
4926# $1 = compiler to test (CC or CXX)
4927# $2 = human readable name of compiler (C or C++)
4928# $3 = list of compiler names to search for
4929
4930
4931# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4932# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4933# archiver (AR). Verify that the compilers are correct according to the
4934# toolchain type.
4935
4936
4937# Setup additional tools that is considered a part of the toolchain, but not the
4938# core part. Many of these are highly platform-specific and do not exist,
4939# and/or are not needed on all platforms.
4940
4941
4942# Setup the build tools (i.e, the compiler and linker used to build programs
4943# that should be run on the build platform, not the target platform, as a build
4944# helper). Since the non-cross-compile case uses the normal, target compilers
4945# for this, we can only do this after these have been setup.
4946
4947
4948# Setup legacy variables that are still needed as alternative ways to refer to
4949# parts of the toolchain.
4950
4951
4952# Do some additional checks on the detected tools.
4953
4954
4955# Setup the JTReg Regression Test Harness.
4956
4957
4958#
4959# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4960# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4961#
4962# This code is free software; you can redistribute it and/or modify it
4963# under the terms of the GNU General Public License version 2 only, as
4964# published by the Free Software Foundation.  Oracle designates this
4965# particular file as subject to the "Classpath" exception as provided
4966# by Oracle in the LICENSE file that accompanied this code.
4967#
4968# This code is distributed in the hope that it will be useful, but WITHOUT
4969# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4970# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4971# version 2 for more details (a copy is included in the LICENSE file that
4972# accompanied this code).
4973#
4974# You should have received a copy of the GNU General Public License version
4975# 2 along with this work; if not, write to the Free Software Foundation,
4976# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4977#
4978# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4979# or visit www.oracle.com if you need additional information or have any
4980# questions.
4981#
4982
4983################################################################################
4984# The order of these defines the priority by which we try to find them.
4985VALID_VS_VERSIONS="2013 2012 2010"
4986
4987VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4988VS_VERSION_INTERNAL_2010=100
4989VS_MSVCR_2010=msvcr100.dll
4990# We don't use msvcp on Visual Studio 2010
4991#VS_MSVCP_2010=msvcp100.dll
4992VS_ENVVAR_2010="VS100COMNTOOLS"
4993VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4994VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4995VS_VS_PLATFORM_NAME_2010="v100"
4996VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4997
4998VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4999VS_VERSION_INTERNAL_2012=110
5000VS_MSVCR_2012=msvcr110.dll
5001VS_MSVCP_2012=msvcp110.dll
5002VS_ENVVAR_2012="VS110COMNTOOLS"
5003VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5004VS_SDK_INSTALLDIR_2012=
5005VS_VS_PLATFORM_NAME_2012="v110"
5006VS_SDK_PLATFORM_NAME_2012=
5007
5008VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5009VS_VERSION_INTERNAL_2013=120
5010VS_MSVCR_2013=msvcr120.dll
5011VS_MSVCP_2013=msvcp120.dll
5012VS_ENVVAR_2013="VS120COMNTOOLS"
5013VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5014VS_SDK_INSTALLDIR_2013=
5015VS_VS_PLATFORM_NAME_2013="v120"
5016VS_SDK_PLATFORM_NAME_2013=
5017
5018################################################################################
5019
5020
5021
5022################################################################################
5023
5024
5025
5026################################################################################
5027# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5028# build environment and assigns it to VS_ENV_CMD
5029
5030
5031################################################################################
5032
5033
5034
5035################################################################################
5036# Check if the VS env variables were setup prior to running configure.
5037# If not, then find vcvarsall.bat and run it automatically, and integrate
5038# the set env variables into the spec file.
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053# This line needs to be here, verbatim, after all includes and the dummy hook
5054# definitions. It is replaced with custom functionality when building
5055# custom sources.
5056#CUSTOM_AUTOCONF_INCLUDE
5057
5058# Do not change or remove the following line, it is needed for consistency checks:
5059DATE_WHEN_GENERATED=1463011468
5060
5061###############################################################################
5062#
5063# Initialization / Boot-strapping
5064#
5065# The bootstrapping process needs to solve the "chicken or the egg" problem,
5066# thus it jumps back and forth, each time gaining something needed later on.
5067#
5068###############################################################################
5069
5070# If we are requested to print additional help, do that and then exit.
5071# This must be the very first call.
5072
5073  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5074
5075    # Print available toolchains
5076    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5077    $PRINTF "Which are valid to use depends on the build platform.\n"
5078    for toolchain in $VALID_TOOLCHAINS_all; do
5079      # Use indirect variable referencing
5080      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5081      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5082      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5083    done
5084    $PRINTF "\n"
5085
5086    # Print available jvm features
5087    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5088    $PRINTF "Which are valid to use depends on the target platform.\n  "
5089    $PRINTF "%s " $VALID_JVM_FEATURES
5090    $PRINTF "\n"
5091
5092    # And now exit directly
5093    exit 0
5094  fi
5095
5096
5097# Basic initialization that must happen first of all in the normal process.
5098
5099  # Save the original command line. This is passed to us by the wrapper configure script.
5100
5101  # Save the path variable before it gets changed
5102  ORIGINAL_PATH="$PATH"
5103
5104  DATE_WHEN_CONFIGURED=`LANG=C date`
5105
5106  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5107$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5108  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5109$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5110
5111
5112  # Start with tools that do not need have cross compilation support
5113  # and can be expected to be found in the default PATH. These tools are
5114  # used by configure.
5115
5116  # First are all the simple required tools.
5117
5118
5119
5120  # Publish this variable in the help.
5121
5122
5123  if [ -z "${BASENAME+x}" ]; then
5124    # The variable is not set by user, try to locate tool using the code snippet
5125    for ac_prog in basename
5126do
5127  # Extract the first word of "$ac_prog", so it can be a program name with args.
5128set dummy $ac_prog; ac_word=$2
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
5131if ${ac_cv_path_BASENAME+:} false; then :
5132  $as_echo_n "(cached) " >&6
5133else
5134  case $BASENAME in
5135  [\\/]* | ?:[\\/]*)
5136  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5137  ;;
5138  *)
5139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5140for as_dir in $PATH
5141do
5142  IFS=$as_save_IFS
5143  test -z "$as_dir" && as_dir=.
5144    for ac_exec_ext in '' $ac_executable_extensions; do
5145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5146    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5148    break 2
5149  fi
5150done
5151  done
5152IFS=$as_save_IFS
5153
5154  ;;
5155esac
5156fi
5157BASENAME=$ac_cv_path_BASENAME
5158if test -n "$BASENAME"; then
5159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5160$as_echo "$BASENAME" >&6; }
5161else
5162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163$as_echo "no" >&6; }
5164fi
5165
5166
5167  test -n "$BASENAME" && break
5168done
5169
5170  else
5171    # The variable is set, but is it from the command line or the environment?
5172
5173    # Try to remove the string !BASENAME! from our list.
5174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5176      # If it failed, the variable was not from the command line. Ignore it,
5177      # but warn the user (except for BASH, which is always set by the calling BASH).
5178      if test "xBASENAME" != xBASH; then
5179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5180$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5181      fi
5182      # Try to locate tool using the code snippet
5183      for ac_prog in basename
5184do
5185  # Extract the first word of "$ac_prog", so it can be a program name with args.
5186set dummy $ac_prog; ac_word=$2
5187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5188$as_echo_n "checking for $ac_word... " >&6; }
5189if ${ac_cv_path_BASENAME+:} false; then :
5190  $as_echo_n "(cached) " >&6
5191else
5192  case $BASENAME in
5193  [\\/]* | ?:[\\/]*)
5194  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5195  ;;
5196  *)
5197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5198for as_dir in $PATH
5199do
5200  IFS=$as_save_IFS
5201  test -z "$as_dir" && as_dir=.
5202    for ac_exec_ext in '' $ac_executable_extensions; do
5203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5204    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5206    break 2
5207  fi
5208done
5209  done
5210IFS=$as_save_IFS
5211
5212  ;;
5213esac
5214fi
5215BASENAME=$ac_cv_path_BASENAME
5216if test -n "$BASENAME"; then
5217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5218$as_echo "$BASENAME" >&6; }
5219else
5220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5221$as_echo "no" >&6; }
5222fi
5223
5224
5225  test -n "$BASENAME" && break
5226done
5227
5228    else
5229      # If it succeeded, then it was overridden by the user. We will use it
5230      # for the tool.
5231
5232      # First remove it from the list of overridden variables, so we can test
5233      # for unknown variables in the end.
5234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5235
5236      # Check if we try to supply an empty value
5237      if test "x$BASENAME" = x; then
5238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5239$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5241$as_echo_n "checking for BASENAME... " >&6; }
5242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5243$as_echo "disabled" >&6; }
5244      else
5245        # Check if the provided tool contains a complete path.
5246        tool_specified="$BASENAME"
5247        tool_basename="${tool_specified##*/}"
5248        if test "x$tool_basename" = "x$tool_specified"; then
5249          # A command without a complete path is provided, search $PATH.
5250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5251$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5252          # Extract the first word of "$tool_basename", so it can be a program name with args.
5253set dummy $tool_basename; ac_word=$2
5254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5255$as_echo_n "checking for $ac_word... " >&6; }
5256if ${ac_cv_path_BASENAME+:} false; then :
5257  $as_echo_n "(cached) " >&6
5258else
5259  case $BASENAME in
5260  [\\/]* | ?:[\\/]*)
5261  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5262  ;;
5263  *)
5264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5265for as_dir in $PATH
5266do
5267  IFS=$as_save_IFS
5268  test -z "$as_dir" && as_dir=.
5269    for ac_exec_ext in '' $ac_executable_extensions; do
5270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5271    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5273    break 2
5274  fi
5275done
5276  done
5277IFS=$as_save_IFS
5278
5279  ;;
5280esac
5281fi
5282BASENAME=$ac_cv_path_BASENAME
5283if test -n "$BASENAME"; then
5284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5285$as_echo "$BASENAME" >&6; }
5286else
5287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5288$as_echo "no" >&6; }
5289fi
5290
5291
5292          if test "x$BASENAME" = x; then
5293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5294          fi
5295        else
5296          # Otherwise we believe it is a complete path. Use it as it is.
5297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5298$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5300$as_echo_n "checking for BASENAME... " >&6; }
5301          if test ! -x "$tool_specified"; then
5302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5303$as_echo "not found" >&6; }
5304            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5305          fi
5306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5307$as_echo "$tool_specified" >&6; }
5308        fi
5309      fi
5310    fi
5311
5312  fi
5313
5314
5315
5316  if test "x$BASENAME" = x; then
5317    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5318  fi
5319
5320
5321
5322
5323
5324  # Publish this variable in the help.
5325
5326
5327  if [ -z "${BASH+x}" ]; then
5328    # The variable is not set by user, try to locate tool using the code snippet
5329    for ac_prog in bash
5330do
5331  # Extract the first word of "$ac_prog", so it can be a program name with args.
5332set dummy $ac_prog; ac_word=$2
5333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5334$as_echo_n "checking for $ac_word... " >&6; }
5335if ${ac_cv_path_BASH+:} false; then :
5336  $as_echo_n "(cached) " >&6
5337else
5338  case $BASH in
5339  [\\/]* | ?:[\\/]*)
5340  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5341  ;;
5342  *)
5343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344for as_dir in $PATH
5345do
5346  IFS=$as_save_IFS
5347  test -z "$as_dir" && as_dir=.
5348    for ac_exec_ext in '' $ac_executable_extensions; do
5349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352    break 2
5353  fi
5354done
5355  done
5356IFS=$as_save_IFS
5357
5358  ;;
5359esac
5360fi
5361BASH=$ac_cv_path_BASH
5362if test -n "$BASH"; then
5363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5364$as_echo "$BASH" >&6; }
5365else
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
5368fi
5369
5370
5371  test -n "$BASH" && break
5372done
5373
5374  else
5375    # The variable is set, but is it from the command line or the environment?
5376
5377    # Try to remove the string !BASH! from our list.
5378    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5379    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5380      # If it failed, the variable was not from the command line. Ignore it,
5381      # but warn the user (except for BASH, which is always set by the calling BASH).
5382      if test "xBASH" != xBASH; then
5383        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5384$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5385      fi
5386      # Try to locate tool using the code snippet
5387      for ac_prog in bash
5388do
5389  # Extract the first word of "$ac_prog", so it can be a program name with args.
5390set dummy $ac_prog; ac_word=$2
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392$as_echo_n "checking for $ac_word... " >&6; }
5393if ${ac_cv_path_BASH+:} false; then :
5394  $as_echo_n "(cached) " >&6
5395else
5396  case $BASH in
5397  [\\/]* | ?:[\\/]*)
5398  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5399  ;;
5400  *)
5401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402for as_dir in $PATH
5403do
5404  IFS=$as_save_IFS
5405  test -z "$as_dir" && as_dir=.
5406    for ac_exec_ext in '' $ac_executable_extensions; do
5407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410    break 2
5411  fi
5412done
5413  done
5414IFS=$as_save_IFS
5415
5416  ;;
5417esac
5418fi
5419BASH=$ac_cv_path_BASH
5420if test -n "$BASH"; then
5421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5422$as_echo "$BASH" >&6; }
5423else
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425$as_echo "no" >&6; }
5426fi
5427
5428
5429  test -n "$BASH" && break
5430done
5431
5432    else
5433      # If it succeeded, then it was overridden by the user. We will use it
5434      # for the tool.
5435
5436      # First remove it from the list of overridden variables, so we can test
5437      # for unknown variables in the end.
5438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5439
5440      # Check if we try to supply an empty value
5441      if test "x$BASH" = x; then
5442        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5443$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5445$as_echo_n "checking for BASH... " >&6; }
5446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5447$as_echo "disabled" >&6; }
5448      else
5449        # Check if the provided tool contains a complete path.
5450        tool_specified="$BASH"
5451        tool_basename="${tool_specified##*/}"
5452        if test "x$tool_basename" = "x$tool_specified"; then
5453          # A command without a complete path is provided, search $PATH.
5454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5455$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5456          # Extract the first word of "$tool_basename", so it can be a program name with args.
5457set dummy $tool_basename; ac_word=$2
5458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5459$as_echo_n "checking for $ac_word... " >&6; }
5460if ${ac_cv_path_BASH+:} false; then :
5461  $as_echo_n "(cached) " >&6
5462else
5463  case $BASH in
5464  [\\/]* | ?:[\\/]*)
5465  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5466  ;;
5467  *)
5468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5469for as_dir in $PATH
5470do
5471  IFS=$as_save_IFS
5472  test -z "$as_dir" && as_dir=.
5473    for ac_exec_ext in '' $ac_executable_extensions; do
5474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5475    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5477    break 2
5478  fi
5479done
5480  done
5481IFS=$as_save_IFS
5482
5483  ;;
5484esac
5485fi
5486BASH=$ac_cv_path_BASH
5487if test -n "$BASH"; then
5488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5489$as_echo "$BASH" >&6; }
5490else
5491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5492$as_echo "no" >&6; }
5493fi
5494
5495
5496          if test "x$BASH" = x; then
5497            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5498          fi
5499        else
5500          # Otherwise we believe it is a complete path. Use it as it is.
5501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5502$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5503          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5504$as_echo_n "checking for BASH... " >&6; }
5505          if test ! -x "$tool_specified"; then
5506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5507$as_echo "not found" >&6; }
5508            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5509          fi
5510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5511$as_echo "$tool_specified" >&6; }
5512        fi
5513      fi
5514    fi
5515
5516  fi
5517
5518
5519
5520  if test "x$BASH" = x; then
5521    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5522  fi
5523
5524
5525
5526
5527
5528  # Publish this variable in the help.
5529
5530
5531  if [ -z "${CAT+x}" ]; then
5532    # The variable is not set by user, try to locate tool using the code snippet
5533    for ac_prog in cat
5534do
5535  # Extract the first word of "$ac_prog", so it can be a program name with args.
5536set dummy $ac_prog; ac_word=$2
5537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5538$as_echo_n "checking for $ac_word... " >&6; }
5539if ${ac_cv_path_CAT+:} false; then :
5540  $as_echo_n "(cached) " >&6
5541else
5542  case $CAT in
5543  [\\/]* | ?:[\\/]*)
5544  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5545  ;;
5546  *)
5547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5548for as_dir in $PATH
5549do
5550  IFS=$as_save_IFS
5551  test -z "$as_dir" && as_dir=.
5552    for ac_exec_ext in '' $ac_executable_extensions; do
5553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5554    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5556    break 2
5557  fi
5558done
5559  done
5560IFS=$as_save_IFS
5561
5562  ;;
5563esac
5564fi
5565CAT=$ac_cv_path_CAT
5566if test -n "$CAT"; then
5567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5568$as_echo "$CAT" >&6; }
5569else
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5571$as_echo "no" >&6; }
5572fi
5573
5574
5575  test -n "$CAT" && break
5576done
5577
5578  else
5579    # The variable is set, but is it from the command line or the environment?
5580
5581    # Try to remove the string !CAT! from our list.
5582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5584      # If it failed, the variable was not from the command line. Ignore it,
5585      # but warn the user (except for BASH, which is always set by the calling BASH).
5586      if test "xCAT" != xBASH; then
5587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5588$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5589      fi
5590      # Try to locate tool using the code snippet
5591      for ac_prog in cat
5592do
5593  # Extract the first word of "$ac_prog", so it can be a program name with args.
5594set dummy $ac_prog; ac_word=$2
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5596$as_echo_n "checking for $ac_word... " >&6; }
5597if ${ac_cv_path_CAT+:} false; then :
5598  $as_echo_n "(cached) " >&6
5599else
5600  case $CAT in
5601  [\\/]* | ?:[\\/]*)
5602  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5603  ;;
5604  *)
5605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5606for as_dir in $PATH
5607do
5608  IFS=$as_save_IFS
5609  test -z "$as_dir" && as_dir=.
5610    for ac_exec_ext in '' $ac_executable_extensions; do
5611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5612    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5614    break 2
5615  fi
5616done
5617  done
5618IFS=$as_save_IFS
5619
5620  ;;
5621esac
5622fi
5623CAT=$ac_cv_path_CAT
5624if test -n "$CAT"; then
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5626$as_echo "$CAT" >&6; }
5627else
5628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5629$as_echo "no" >&6; }
5630fi
5631
5632
5633  test -n "$CAT" && break
5634done
5635
5636    else
5637      # If it succeeded, then it was overridden by the user. We will use it
5638      # for the tool.
5639
5640      # First remove it from the list of overridden variables, so we can test
5641      # for unknown variables in the end.
5642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5643
5644      # Check if we try to supply an empty value
5645      if test "x$CAT" = x; then
5646        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5647$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5649$as_echo_n "checking for CAT... " >&6; }
5650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5651$as_echo "disabled" >&6; }
5652      else
5653        # Check if the provided tool contains a complete path.
5654        tool_specified="$CAT"
5655        tool_basename="${tool_specified##*/}"
5656        if test "x$tool_basename" = "x$tool_specified"; then
5657          # A command without a complete path is provided, search $PATH.
5658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5659$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5660          # Extract the first word of "$tool_basename", so it can be a program name with args.
5661set dummy $tool_basename; ac_word=$2
5662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663$as_echo_n "checking for $ac_word... " >&6; }
5664if ${ac_cv_path_CAT+:} false; then :
5665  $as_echo_n "(cached) " >&6
5666else
5667  case $CAT in
5668  [\\/]* | ?:[\\/]*)
5669  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5670  ;;
5671  *)
5672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673for as_dir in $PATH
5674do
5675  IFS=$as_save_IFS
5676  test -z "$as_dir" && as_dir=.
5677    for ac_exec_ext in '' $ac_executable_extensions; do
5678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5679    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5681    break 2
5682  fi
5683done
5684  done
5685IFS=$as_save_IFS
5686
5687  ;;
5688esac
5689fi
5690CAT=$ac_cv_path_CAT
5691if test -n "$CAT"; then
5692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5693$as_echo "$CAT" >&6; }
5694else
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696$as_echo "no" >&6; }
5697fi
5698
5699
5700          if test "x$CAT" = x; then
5701            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5702          fi
5703        else
5704          # Otherwise we believe it is a complete path. Use it as it is.
5705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5706$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5707          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5708$as_echo_n "checking for CAT... " >&6; }
5709          if test ! -x "$tool_specified"; then
5710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5711$as_echo "not found" >&6; }
5712            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5713          fi
5714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5715$as_echo "$tool_specified" >&6; }
5716        fi
5717      fi
5718    fi
5719
5720  fi
5721
5722
5723
5724  if test "x$CAT" = x; then
5725    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5726  fi
5727
5728
5729
5730
5731
5732  # Publish this variable in the help.
5733
5734
5735  if [ -z "${CHMOD+x}" ]; then
5736    # The variable is not set by user, try to locate tool using the code snippet
5737    for ac_prog in chmod
5738do
5739  # Extract the first word of "$ac_prog", so it can be a program name with args.
5740set dummy $ac_prog; ac_word=$2
5741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5742$as_echo_n "checking for $ac_word... " >&6; }
5743if ${ac_cv_path_CHMOD+:} false; then :
5744  $as_echo_n "(cached) " >&6
5745else
5746  case $CHMOD in
5747  [\\/]* | ?:[\\/]*)
5748  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5749  ;;
5750  *)
5751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5752for as_dir in $PATH
5753do
5754  IFS=$as_save_IFS
5755  test -z "$as_dir" && as_dir=.
5756    for ac_exec_ext in '' $ac_executable_extensions; do
5757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5758    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5760    break 2
5761  fi
5762done
5763  done
5764IFS=$as_save_IFS
5765
5766  ;;
5767esac
5768fi
5769CHMOD=$ac_cv_path_CHMOD
5770if test -n "$CHMOD"; then
5771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5772$as_echo "$CHMOD" >&6; }
5773else
5774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5775$as_echo "no" >&6; }
5776fi
5777
5778
5779  test -n "$CHMOD" && break
5780done
5781
5782  else
5783    # The variable is set, but is it from the command line or the environment?
5784
5785    # Try to remove the string !CHMOD! from our list.
5786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5788      # If it failed, the variable was not from the command line. Ignore it,
5789      # but warn the user (except for BASH, which is always set by the calling BASH).
5790      if test "xCHMOD" != xBASH; then
5791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5792$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5793      fi
5794      # Try to locate tool using the code snippet
5795      for ac_prog in chmod
5796do
5797  # Extract the first word of "$ac_prog", so it can be a program name with args.
5798set dummy $ac_prog; ac_word=$2
5799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5800$as_echo_n "checking for $ac_word... " >&6; }
5801if ${ac_cv_path_CHMOD+:} false; then :
5802  $as_echo_n "(cached) " >&6
5803else
5804  case $CHMOD in
5805  [\\/]* | ?:[\\/]*)
5806  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5807  ;;
5808  *)
5809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5810for as_dir in $PATH
5811do
5812  IFS=$as_save_IFS
5813  test -z "$as_dir" && as_dir=.
5814    for ac_exec_ext in '' $ac_executable_extensions; do
5815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5816    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5818    break 2
5819  fi
5820done
5821  done
5822IFS=$as_save_IFS
5823
5824  ;;
5825esac
5826fi
5827CHMOD=$ac_cv_path_CHMOD
5828if test -n "$CHMOD"; then
5829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5830$as_echo "$CHMOD" >&6; }
5831else
5832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5833$as_echo "no" >&6; }
5834fi
5835
5836
5837  test -n "$CHMOD" && break
5838done
5839
5840    else
5841      # If it succeeded, then it was overridden by the user. We will use it
5842      # for the tool.
5843
5844      # First remove it from the list of overridden variables, so we can test
5845      # for unknown variables in the end.
5846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5847
5848      # Check if we try to supply an empty value
5849      if test "x$CHMOD" = x; then
5850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5851$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5853$as_echo_n "checking for CHMOD... " >&6; }
5854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5855$as_echo "disabled" >&6; }
5856      else
5857        # Check if the provided tool contains a complete path.
5858        tool_specified="$CHMOD"
5859        tool_basename="${tool_specified##*/}"
5860        if test "x$tool_basename" = "x$tool_specified"; then
5861          # A command without a complete path is provided, search $PATH.
5862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5863$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5864          # Extract the first word of "$tool_basename", so it can be a program name with args.
5865set dummy $tool_basename; ac_word=$2
5866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5867$as_echo_n "checking for $ac_word... " >&6; }
5868if ${ac_cv_path_CHMOD+:} false; then :
5869  $as_echo_n "(cached) " >&6
5870else
5871  case $CHMOD in
5872  [\\/]* | ?:[\\/]*)
5873  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5874  ;;
5875  *)
5876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5877for as_dir in $PATH
5878do
5879  IFS=$as_save_IFS
5880  test -z "$as_dir" && as_dir=.
5881    for ac_exec_ext in '' $ac_executable_extensions; do
5882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5883    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5885    break 2
5886  fi
5887done
5888  done
5889IFS=$as_save_IFS
5890
5891  ;;
5892esac
5893fi
5894CHMOD=$ac_cv_path_CHMOD
5895if test -n "$CHMOD"; then
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5897$as_echo "$CHMOD" >&6; }
5898else
5899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5900$as_echo "no" >&6; }
5901fi
5902
5903
5904          if test "x$CHMOD" = x; then
5905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5906          fi
5907        else
5908          # Otherwise we believe it is a complete path. Use it as it is.
5909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5910$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5912$as_echo_n "checking for CHMOD... " >&6; }
5913          if test ! -x "$tool_specified"; then
5914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5915$as_echo "not found" >&6; }
5916            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5917          fi
5918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5919$as_echo "$tool_specified" >&6; }
5920        fi
5921      fi
5922    fi
5923
5924  fi
5925
5926
5927
5928  if test "x$CHMOD" = x; then
5929    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5930  fi
5931
5932
5933
5934
5935
5936  # Publish this variable in the help.
5937
5938
5939  if [ -z "${CMP+x}" ]; then
5940    # The variable is not set by user, try to locate tool using the code snippet
5941    for ac_prog in cmp
5942do
5943  # Extract the first word of "$ac_prog", so it can be a program name with args.
5944set dummy $ac_prog; ac_word=$2
5945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5946$as_echo_n "checking for $ac_word... " >&6; }
5947if ${ac_cv_path_CMP+:} false; then :
5948  $as_echo_n "(cached) " >&6
5949else
5950  case $CMP in
5951  [\\/]* | ?:[\\/]*)
5952  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5953  ;;
5954  *)
5955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5956for as_dir in $PATH
5957do
5958  IFS=$as_save_IFS
5959  test -z "$as_dir" && as_dir=.
5960    for ac_exec_ext in '' $ac_executable_extensions; do
5961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5962    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5964    break 2
5965  fi
5966done
5967  done
5968IFS=$as_save_IFS
5969
5970  ;;
5971esac
5972fi
5973CMP=$ac_cv_path_CMP
5974if test -n "$CMP"; then
5975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5976$as_echo "$CMP" >&6; }
5977else
5978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979$as_echo "no" >&6; }
5980fi
5981
5982
5983  test -n "$CMP" && break
5984done
5985
5986  else
5987    # The variable is set, but is it from the command line or the environment?
5988
5989    # Try to remove the string !CMP! from our list.
5990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5992      # If it failed, the variable was not from the command line. Ignore it,
5993      # but warn the user (except for BASH, which is always set by the calling BASH).
5994      if test "xCMP" != xBASH; then
5995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5996$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5997      fi
5998      # Try to locate tool using the code snippet
5999      for ac_prog in cmp
6000do
6001  # Extract the first word of "$ac_prog", so it can be a program name with args.
6002set dummy $ac_prog; ac_word=$2
6003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6004$as_echo_n "checking for $ac_word... " >&6; }
6005if ${ac_cv_path_CMP+:} false; then :
6006  $as_echo_n "(cached) " >&6
6007else
6008  case $CMP in
6009  [\\/]* | ?:[\\/]*)
6010  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6011  ;;
6012  *)
6013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014for as_dir in $PATH
6015do
6016  IFS=$as_save_IFS
6017  test -z "$as_dir" && as_dir=.
6018    for ac_exec_ext in '' $ac_executable_extensions; do
6019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6020    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6022    break 2
6023  fi
6024done
6025  done
6026IFS=$as_save_IFS
6027
6028  ;;
6029esac
6030fi
6031CMP=$ac_cv_path_CMP
6032if test -n "$CMP"; then
6033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6034$as_echo "$CMP" >&6; }
6035else
6036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037$as_echo "no" >&6; }
6038fi
6039
6040
6041  test -n "$CMP" && break
6042done
6043
6044    else
6045      # If it succeeded, then it was overridden by the user. We will use it
6046      # for the tool.
6047
6048      # First remove it from the list of overridden variables, so we can test
6049      # for unknown variables in the end.
6050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6051
6052      # Check if we try to supply an empty value
6053      if test "x$CMP" = x; then
6054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6055$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6057$as_echo_n "checking for CMP... " >&6; }
6058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6059$as_echo "disabled" >&6; }
6060      else
6061        # Check if the provided tool contains a complete path.
6062        tool_specified="$CMP"
6063        tool_basename="${tool_specified##*/}"
6064        if test "x$tool_basename" = "x$tool_specified"; then
6065          # A command without a complete path is provided, search $PATH.
6066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6067$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6068          # Extract the first word of "$tool_basename", so it can be a program name with args.
6069set dummy $tool_basename; ac_word=$2
6070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6071$as_echo_n "checking for $ac_word... " >&6; }
6072if ${ac_cv_path_CMP+:} false; then :
6073  $as_echo_n "(cached) " >&6
6074else
6075  case $CMP in
6076  [\\/]* | ?:[\\/]*)
6077  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6078  ;;
6079  *)
6080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081for as_dir in $PATH
6082do
6083  IFS=$as_save_IFS
6084  test -z "$as_dir" && as_dir=.
6085    for ac_exec_ext in '' $ac_executable_extensions; do
6086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6087    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6089    break 2
6090  fi
6091done
6092  done
6093IFS=$as_save_IFS
6094
6095  ;;
6096esac
6097fi
6098CMP=$ac_cv_path_CMP
6099if test -n "$CMP"; then
6100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6101$as_echo "$CMP" >&6; }
6102else
6103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6104$as_echo "no" >&6; }
6105fi
6106
6107
6108          if test "x$CMP" = x; then
6109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6110          fi
6111        else
6112          # Otherwise we believe it is a complete path. Use it as it is.
6113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6114$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6116$as_echo_n "checking for CMP... " >&6; }
6117          if test ! -x "$tool_specified"; then
6118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6119$as_echo "not found" >&6; }
6120            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6121          fi
6122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6123$as_echo "$tool_specified" >&6; }
6124        fi
6125      fi
6126    fi
6127
6128  fi
6129
6130
6131
6132  if test "x$CMP" = x; then
6133    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6134  fi
6135
6136
6137
6138
6139
6140  # Publish this variable in the help.
6141
6142
6143  if [ -z "${COMM+x}" ]; then
6144    # The variable is not set by user, try to locate tool using the code snippet
6145    for ac_prog in comm
6146do
6147  # Extract the first word of "$ac_prog", so it can be a program name with args.
6148set dummy $ac_prog; ac_word=$2
6149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6150$as_echo_n "checking for $ac_word... " >&6; }
6151if ${ac_cv_path_COMM+:} false; then :
6152  $as_echo_n "(cached) " >&6
6153else
6154  case $COMM in
6155  [\\/]* | ?:[\\/]*)
6156  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6157  ;;
6158  *)
6159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6160for as_dir in $PATH
6161do
6162  IFS=$as_save_IFS
6163  test -z "$as_dir" && as_dir=.
6164    for ac_exec_ext in '' $ac_executable_extensions; do
6165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6166    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6168    break 2
6169  fi
6170done
6171  done
6172IFS=$as_save_IFS
6173
6174  ;;
6175esac
6176fi
6177COMM=$ac_cv_path_COMM
6178if test -n "$COMM"; then
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6180$as_echo "$COMM" >&6; }
6181else
6182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6183$as_echo "no" >&6; }
6184fi
6185
6186
6187  test -n "$COMM" && break
6188done
6189
6190  else
6191    # The variable is set, but is it from the command line or the environment?
6192
6193    # Try to remove the string !COMM! from our list.
6194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6196      # If it failed, the variable was not from the command line. Ignore it,
6197      # but warn the user (except for BASH, which is always set by the calling BASH).
6198      if test "xCOMM" != xBASH; then
6199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6200$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6201      fi
6202      # Try to locate tool using the code snippet
6203      for ac_prog in comm
6204do
6205  # Extract the first word of "$ac_prog", so it can be a program name with args.
6206set dummy $ac_prog; ac_word=$2
6207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6208$as_echo_n "checking for $ac_word... " >&6; }
6209if ${ac_cv_path_COMM+:} false; then :
6210  $as_echo_n "(cached) " >&6
6211else
6212  case $COMM in
6213  [\\/]* | ?:[\\/]*)
6214  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6215  ;;
6216  *)
6217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6218for as_dir in $PATH
6219do
6220  IFS=$as_save_IFS
6221  test -z "$as_dir" && as_dir=.
6222    for ac_exec_ext in '' $ac_executable_extensions; do
6223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6224    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6226    break 2
6227  fi
6228done
6229  done
6230IFS=$as_save_IFS
6231
6232  ;;
6233esac
6234fi
6235COMM=$ac_cv_path_COMM
6236if test -n "$COMM"; then
6237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6238$as_echo "$COMM" >&6; }
6239else
6240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6241$as_echo "no" >&6; }
6242fi
6243
6244
6245  test -n "$COMM" && break
6246done
6247
6248    else
6249      # If it succeeded, then it was overridden by the user. We will use it
6250      # for the tool.
6251
6252      # First remove it from the list of overridden variables, so we can test
6253      # for unknown variables in the end.
6254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6255
6256      # Check if we try to supply an empty value
6257      if test "x$COMM" = x; then
6258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6259$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6261$as_echo_n "checking for COMM... " >&6; }
6262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6263$as_echo "disabled" >&6; }
6264      else
6265        # Check if the provided tool contains a complete path.
6266        tool_specified="$COMM"
6267        tool_basename="${tool_specified##*/}"
6268        if test "x$tool_basename" = "x$tool_specified"; then
6269          # A command without a complete path is provided, search $PATH.
6270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6271$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6272          # Extract the first word of "$tool_basename", so it can be a program name with args.
6273set dummy $tool_basename; ac_word=$2
6274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6275$as_echo_n "checking for $ac_word... " >&6; }
6276if ${ac_cv_path_COMM+:} false; then :
6277  $as_echo_n "(cached) " >&6
6278else
6279  case $COMM in
6280  [\\/]* | ?:[\\/]*)
6281  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6282  ;;
6283  *)
6284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6285for as_dir in $PATH
6286do
6287  IFS=$as_save_IFS
6288  test -z "$as_dir" && as_dir=.
6289    for ac_exec_ext in '' $ac_executable_extensions; do
6290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6291    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6293    break 2
6294  fi
6295done
6296  done
6297IFS=$as_save_IFS
6298
6299  ;;
6300esac
6301fi
6302COMM=$ac_cv_path_COMM
6303if test -n "$COMM"; then
6304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6305$as_echo "$COMM" >&6; }
6306else
6307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6308$as_echo "no" >&6; }
6309fi
6310
6311
6312          if test "x$COMM" = x; then
6313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6314          fi
6315        else
6316          # Otherwise we believe it is a complete path. Use it as it is.
6317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6318$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6320$as_echo_n "checking for COMM... " >&6; }
6321          if test ! -x "$tool_specified"; then
6322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6323$as_echo "not found" >&6; }
6324            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6325          fi
6326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6327$as_echo "$tool_specified" >&6; }
6328        fi
6329      fi
6330    fi
6331
6332  fi
6333
6334
6335
6336  if test "x$COMM" = x; then
6337    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6338  fi
6339
6340
6341
6342
6343
6344  # Publish this variable in the help.
6345
6346
6347  if [ -z "${CP+x}" ]; then
6348    # The variable is not set by user, try to locate tool using the code snippet
6349    for ac_prog in cp
6350do
6351  # Extract the first word of "$ac_prog", so it can be a program name with args.
6352set dummy $ac_prog; ac_word=$2
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6354$as_echo_n "checking for $ac_word... " >&6; }
6355if ${ac_cv_path_CP+:} false; then :
6356  $as_echo_n "(cached) " >&6
6357else
6358  case $CP in
6359  [\\/]* | ?:[\\/]*)
6360  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6361  ;;
6362  *)
6363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6364for as_dir in $PATH
6365do
6366  IFS=$as_save_IFS
6367  test -z "$as_dir" && as_dir=.
6368    for ac_exec_ext in '' $ac_executable_extensions; do
6369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6370    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6372    break 2
6373  fi
6374done
6375  done
6376IFS=$as_save_IFS
6377
6378  ;;
6379esac
6380fi
6381CP=$ac_cv_path_CP
6382if test -n "$CP"; then
6383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6384$as_echo "$CP" >&6; }
6385else
6386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387$as_echo "no" >&6; }
6388fi
6389
6390
6391  test -n "$CP" && break
6392done
6393
6394  else
6395    # The variable is set, but is it from the command line or the environment?
6396
6397    # Try to remove the string !CP! from our list.
6398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6400      # If it failed, the variable was not from the command line. Ignore it,
6401      # but warn the user (except for BASH, which is always set by the calling BASH).
6402      if test "xCP" != xBASH; then
6403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6404$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6405      fi
6406      # Try to locate tool using the code snippet
6407      for ac_prog in cp
6408do
6409  # Extract the first word of "$ac_prog", so it can be a program name with args.
6410set dummy $ac_prog; ac_word=$2
6411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6412$as_echo_n "checking for $ac_word... " >&6; }
6413if ${ac_cv_path_CP+:} false; then :
6414  $as_echo_n "(cached) " >&6
6415else
6416  case $CP in
6417  [\\/]* | ?:[\\/]*)
6418  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6419  ;;
6420  *)
6421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6422for as_dir in $PATH
6423do
6424  IFS=$as_save_IFS
6425  test -z "$as_dir" && as_dir=.
6426    for ac_exec_ext in '' $ac_executable_extensions; do
6427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6428    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6430    break 2
6431  fi
6432done
6433  done
6434IFS=$as_save_IFS
6435
6436  ;;
6437esac
6438fi
6439CP=$ac_cv_path_CP
6440if test -n "$CP"; then
6441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6442$as_echo "$CP" >&6; }
6443else
6444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6445$as_echo "no" >&6; }
6446fi
6447
6448
6449  test -n "$CP" && break
6450done
6451
6452    else
6453      # If it succeeded, then it was overridden by the user. We will use it
6454      # for the tool.
6455
6456      # First remove it from the list of overridden variables, so we can test
6457      # for unknown variables in the end.
6458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6459
6460      # Check if we try to supply an empty value
6461      if test "x$CP" = x; then
6462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6463$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6465$as_echo_n "checking for CP... " >&6; }
6466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6467$as_echo "disabled" >&6; }
6468      else
6469        # Check if the provided tool contains a complete path.
6470        tool_specified="$CP"
6471        tool_basename="${tool_specified##*/}"
6472        if test "x$tool_basename" = "x$tool_specified"; then
6473          # A command without a complete path is provided, search $PATH.
6474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6475$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6476          # Extract the first word of "$tool_basename", so it can be a program name with args.
6477set dummy $tool_basename; ac_word=$2
6478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6479$as_echo_n "checking for $ac_word... " >&6; }
6480if ${ac_cv_path_CP+:} false; then :
6481  $as_echo_n "(cached) " >&6
6482else
6483  case $CP in
6484  [\\/]* | ?:[\\/]*)
6485  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6486  ;;
6487  *)
6488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6489for as_dir in $PATH
6490do
6491  IFS=$as_save_IFS
6492  test -z "$as_dir" && as_dir=.
6493    for ac_exec_ext in '' $ac_executable_extensions; do
6494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6495    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6497    break 2
6498  fi
6499done
6500  done
6501IFS=$as_save_IFS
6502
6503  ;;
6504esac
6505fi
6506CP=$ac_cv_path_CP
6507if test -n "$CP"; then
6508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6509$as_echo "$CP" >&6; }
6510else
6511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6512$as_echo "no" >&6; }
6513fi
6514
6515
6516          if test "x$CP" = x; then
6517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6518          fi
6519        else
6520          # Otherwise we believe it is a complete path. Use it as it is.
6521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6522$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6524$as_echo_n "checking for CP... " >&6; }
6525          if test ! -x "$tool_specified"; then
6526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6527$as_echo "not found" >&6; }
6528            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6529          fi
6530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6531$as_echo "$tool_specified" >&6; }
6532        fi
6533      fi
6534    fi
6535
6536  fi
6537
6538
6539
6540  if test "x$CP" = x; then
6541    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6542  fi
6543
6544
6545
6546
6547
6548  # Publish this variable in the help.
6549
6550
6551  if [ -z "${CUT+x}" ]; then
6552    # The variable is not set by user, try to locate tool using the code snippet
6553    for ac_prog in cut
6554do
6555  # Extract the first word of "$ac_prog", so it can be a program name with args.
6556set dummy $ac_prog; ac_word=$2
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6558$as_echo_n "checking for $ac_word... " >&6; }
6559if ${ac_cv_path_CUT+:} false; then :
6560  $as_echo_n "(cached) " >&6
6561else
6562  case $CUT in
6563  [\\/]* | ?:[\\/]*)
6564  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6565  ;;
6566  *)
6567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6568for as_dir in $PATH
6569do
6570  IFS=$as_save_IFS
6571  test -z "$as_dir" && as_dir=.
6572    for ac_exec_ext in '' $ac_executable_extensions; do
6573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6574    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6576    break 2
6577  fi
6578done
6579  done
6580IFS=$as_save_IFS
6581
6582  ;;
6583esac
6584fi
6585CUT=$ac_cv_path_CUT
6586if test -n "$CUT"; then
6587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6588$as_echo "$CUT" >&6; }
6589else
6590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591$as_echo "no" >&6; }
6592fi
6593
6594
6595  test -n "$CUT" && break
6596done
6597
6598  else
6599    # The variable is set, but is it from the command line or the environment?
6600
6601    # Try to remove the string !CUT! from our list.
6602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6604      # If it failed, the variable was not from the command line. Ignore it,
6605      # but warn the user (except for BASH, which is always set by the calling BASH).
6606      if test "xCUT" != xBASH; then
6607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6608$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6609      fi
6610      # Try to locate tool using the code snippet
6611      for ac_prog in cut
6612do
6613  # Extract the first word of "$ac_prog", so it can be a program name with args.
6614set dummy $ac_prog; ac_word=$2
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6616$as_echo_n "checking for $ac_word... " >&6; }
6617if ${ac_cv_path_CUT+:} false; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  case $CUT in
6621  [\\/]* | ?:[\\/]*)
6622  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6623  ;;
6624  *)
6625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6626for as_dir in $PATH
6627do
6628  IFS=$as_save_IFS
6629  test -z "$as_dir" && as_dir=.
6630    for ac_exec_ext in '' $ac_executable_extensions; do
6631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6632    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6634    break 2
6635  fi
6636done
6637  done
6638IFS=$as_save_IFS
6639
6640  ;;
6641esac
6642fi
6643CUT=$ac_cv_path_CUT
6644if test -n "$CUT"; then
6645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6646$as_echo "$CUT" >&6; }
6647else
6648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6649$as_echo "no" >&6; }
6650fi
6651
6652
6653  test -n "$CUT" && break
6654done
6655
6656    else
6657      # If it succeeded, then it was overridden by the user. We will use it
6658      # for the tool.
6659
6660      # First remove it from the list of overridden variables, so we can test
6661      # for unknown variables in the end.
6662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6663
6664      # Check if we try to supply an empty value
6665      if test "x$CUT" = x; then
6666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6667$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6669$as_echo_n "checking for CUT... " >&6; }
6670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6671$as_echo "disabled" >&6; }
6672      else
6673        # Check if the provided tool contains a complete path.
6674        tool_specified="$CUT"
6675        tool_basename="${tool_specified##*/}"
6676        if test "x$tool_basename" = "x$tool_specified"; then
6677          # A command without a complete path is provided, search $PATH.
6678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6679$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6680          # Extract the first word of "$tool_basename", so it can be a program name with args.
6681set dummy $tool_basename; ac_word=$2
6682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6683$as_echo_n "checking for $ac_word... " >&6; }
6684if ${ac_cv_path_CUT+:} false; then :
6685  $as_echo_n "(cached) " >&6
6686else
6687  case $CUT in
6688  [\\/]* | ?:[\\/]*)
6689  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6690  ;;
6691  *)
6692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6693for as_dir in $PATH
6694do
6695  IFS=$as_save_IFS
6696  test -z "$as_dir" && as_dir=.
6697    for ac_exec_ext in '' $ac_executable_extensions; do
6698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6699    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6701    break 2
6702  fi
6703done
6704  done
6705IFS=$as_save_IFS
6706
6707  ;;
6708esac
6709fi
6710CUT=$ac_cv_path_CUT
6711if test -n "$CUT"; then
6712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6713$as_echo "$CUT" >&6; }
6714else
6715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6716$as_echo "no" >&6; }
6717fi
6718
6719
6720          if test "x$CUT" = x; then
6721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6722          fi
6723        else
6724          # Otherwise we believe it is a complete path. Use it as it is.
6725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6726$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6728$as_echo_n "checking for CUT... " >&6; }
6729          if test ! -x "$tool_specified"; then
6730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6731$as_echo "not found" >&6; }
6732            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6733          fi
6734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6735$as_echo "$tool_specified" >&6; }
6736        fi
6737      fi
6738    fi
6739
6740  fi
6741
6742
6743
6744  if test "x$CUT" = x; then
6745    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6746  fi
6747
6748
6749
6750
6751
6752  # Publish this variable in the help.
6753
6754
6755  if [ -z "${DATE+x}" ]; then
6756    # The variable is not set by user, try to locate tool using the code snippet
6757    for ac_prog in date
6758do
6759  # Extract the first word of "$ac_prog", so it can be a program name with args.
6760set dummy $ac_prog; ac_word=$2
6761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6762$as_echo_n "checking for $ac_word... " >&6; }
6763if ${ac_cv_path_DATE+:} false; then :
6764  $as_echo_n "(cached) " >&6
6765else
6766  case $DATE in
6767  [\\/]* | ?:[\\/]*)
6768  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6769  ;;
6770  *)
6771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6772for as_dir in $PATH
6773do
6774  IFS=$as_save_IFS
6775  test -z "$as_dir" && as_dir=.
6776    for ac_exec_ext in '' $ac_executable_extensions; do
6777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6778    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6780    break 2
6781  fi
6782done
6783  done
6784IFS=$as_save_IFS
6785
6786  ;;
6787esac
6788fi
6789DATE=$ac_cv_path_DATE
6790if test -n "$DATE"; then
6791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6792$as_echo "$DATE" >&6; }
6793else
6794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6795$as_echo "no" >&6; }
6796fi
6797
6798
6799  test -n "$DATE" && break
6800done
6801
6802  else
6803    # The variable is set, but is it from the command line or the environment?
6804
6805    # Try to remove the string !DATE! from our list.
6806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6808      # If it failed, the variable was not from the command line. Ignore it,
6809      # but warn the user (except for BASH, which is always set by the calling BASH).
6810      if test "xDATE" != xBASH; then
6811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6812$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6813      fi
6814      # Try to locate tool using the code snippet
6815      for ac_prog in date
6816do
6817  # Extract the first word of "$ac_prog", so it can be a program name with args.
6818set dummy $ac_prog; ac_word=$2
6819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6820$as_echo_n "checking for $ac_word... " >&6; }
6821if ${ac_cv_path_DATE+:} false; then :
6822  $as_echo_n "(cached) " >&6
6823else
6824  case $DATE in
6825  [\\/]* | ?:[\\/]*)
6826  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6827  ;;
6828  *)
6829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6830for as_dir in $PATH
6831do
6832  IFS=$as_save_IFS
6833  test -z "$as_dir" && as_dir=.
6834    for ac_exec_ext in '' $ac_executable_extensions; do
6835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6836    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6838    break 2
6839  fi
6840done
6841  done
6842IFS=$as_save_IFS
6843
6844  ;;
6845esac
6846fi
6847DATE=$ac_cv_path_DATE
6848if test -n "$DATE"; then
6849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6850$as_echo "$DATE" >&6; }
6851else
6852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6853$as_echo "no" >&6; }
6854fi
6855
6856
6857  test -n "$DATE" && break
6858done
6859
6860    else
6861      # If it succeeded, then it was overridden by the user. We will use it
6862      # for the tool.
6863
6864      # First remove it from the list of overridden variables, so we can test
6865      # for unknown variables in the end.
6866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6867
6868      # Check if we try to supply an empty value
6869      if test "x$DATE" = x; then
6870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6871$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6873$as_echo_n "checking for DATE... " >&6; }
6874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6875$as_echo "disabled" >&6; }
6876      else
6877        # Check if the provided tool contains a complete path.
6878        tool_specified="$DATE"
6879        tool_basename="${tool_specified##*/}"
6880        if test "x$tool_basename" = "x$tool_specified"; then
6881          # A command without a complete path is provided, search $PATH.
6882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6883$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6884          # Extract the first word of "$tool_basename", so it can be a program name with args.
6885set dummy $tool_basename; ac_word=$2
6886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6887$as_echo_n "checking for $ac_word... " >&6; }
6888if ${ac_cv_path_DATE+:} false; then :
6889  $as_echo_n "(cached) " >&6
6890else
6891  case $DATE in
6892  [\\/]* | ?:[\\/]*)
6893  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6894  ;;
6895  *)
6896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6897for as_dir in $PATH
6898do
6899  IFS=$as_save_IFS
6900  test -z "$as_dir" && as_dir=.
6901    for ac_exec_ext in '' $ac_executable_extensions; do
6902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6903    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6905    break 2
6906  fi
6907done
6908  done
6909IFS=$as_save_IFS
6910
6911  ;;
6912esac
6913fi
6914DATE=$ac_cv_path_DATE
6915if test -n "$DATE"; then
6916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6917$as_echo "$DATE" >&6; }
6918else
6919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6920$as_echo "no" >&6; }
6921fi
6922
6923
6924          if test "x$DATE" = x; then
6925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6926          fi
6927        else
6928          # Otherwise we believe it is a complete path. Use it as it is.
6929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6930$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6932$as_echo_n "checking for DATE... " >&6; }
6933          if test ! -x "$tool_specified"; then
6934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6935$as_echo "not found" >&6; }
6936            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6937          fi
6938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6939$as_echo "$tool_specified" >&6; }
6940        fi
6941      fi
6942    fi
6943
6944  fi
6945
6946
6947
6948  if test "x$DATE" = x; then
6949    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6950  fi
6951
6952
6953
6954
6955
6956  # Publish this variable in the help.
6957
6958
6959  if [ -z "${DIFF+x}" ]; then
6960    # The variable is not set by user, try to locate tool using the code snippet
6961    for ac_prog in gdiff diff
6962do
6963  # Extract the first word of "$ac_prog", so it can be a program name with args.
6964set dummy $ac_prog; ac_word=$2
6965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6966$as_echo_n "checking for $ac_word... " >&6; }
6967if ${ac_cv_path_DIFF+:} false; then :
6968  $as_echo_n "(cached) " >&6
6969else
6970  case $DIFF in
6971  [\\/]* | ?:[\\/]*)
6972  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6973  ;;
6974  *)
6975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6976for as_dir in $PATH
6977do
6978  IFS=$as_save_IFS
6979  test -z "$as_dir" && as_dir=.
6980    for ac_exec_ext in '' $ac_executable_extensions; do
6981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6982    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6984    break 2
6985  fi
6986done
6987  done
6988IFS=$as_save_IFS
6989
6990  ;;
6991esac
6992fi
6993DIFF=$ac_cv_path_DIFF
6994if test -n "$DIFF"; then
6995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6996$as_echo "$DIFF" >&6; }
6997else
6998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6999$as_echo "no" >&6; }
7000fi
7001
7002
7003  test -n "$DIFF" && break
7004done
7005
7006  else
7007    # The variable is set, but is it from the command line or the environment?
7008
7009    # Try to remove the string !DIFF! from our list.
7010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7012      # If it failed, the variable was not from the command line. Ignore it,
7013      # but warn the user (except for BASH, which is always set by the calling BASH).
7014      if test "xDIFF" != xBASH; then
7015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7016$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7017      fi
7018      # Try to locate tool using the code snippet
7019      for ac_prog in gdiff diff
7020do
7021  # Extract the first word of "$ac_prog", so it can be a program name with args.
7022set dummy $ac_prog; ac_word=$2
7023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7024$as_echo_n "checking for $ac_word... " >&6; }
7025if ${ac_cv_path_DIFF+:} false; then :
7026  $as_echo_n "(cached) " >&6
7027else
7028  case $DIFF in
7029  [\\/]* | ?:[\\/]*)
7030  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7031  ;;
7032  *)
7033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7034for as_dir in $PATH
7035do
7036  IFS=$as_save_IFS
7037  test -z "$as_dir" && as_dir=.
7038    for ac_exec_ext in '' $ac_executable_extensions; do
7039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7040    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7042    break 2
7043  fi
7044done
7045  done
7046IFS=$as_save_IFS
7047
7048  ;;
7049esac
7050fi
7051DIFF=$ac_cv_path_DIFF
7052if test -n "$DIFF"; then
7053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7054$as_echo "$DIFF" >&6; }
7055else
7056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7057$as_echo "no" >&6; }
7058fi
7059
7060
7061  test -n "$DIFF" && break
7062done
7063
7064    else
7065      # If it succeeded, then it was overridden by the user. We will use it
7066      # for the tool.
7067
7068      # First remove it from the list of overridden variables, so we can test
7069      # for unknown variables in the end.
7070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7071
7072      # Check if we try to supply an empty value
7073      if test "x$DIFF" = x; then
7074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7075$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7077$as_echo_n "checking for DIFF... " >&6; }
7078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7079$as_echo "disabled" >&6; }
7080      else
7081        # Check if the provided tool contains a complete path.
7082        tool_specified="$DIFF"
7083        tool_basename="${tool_specified##*/}"
7084        if test "x$tool_basename" = "x$tool_specified"; then
7085          # A command without a complete path is provided, search $PATH.
7086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7087$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7088          # Extract the first word of "$tool_basename", so it can be a program name with args.
7089set dummy $tool_basename; ac_word=$2
7090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7091$as_echo_n "checking for $ac_word... " >&6; }
7092if ${ac_cv_path_DIFF+:} false; then :
7093  $as_echo_n "(cached) " >&6
7094else
7095  case $DIFF in
7096  [\\/]* | ?:[\\/]*)
7097  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7098  ;;
7099  *)
7100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7101for as_dir in $PATH
7102do
7103  IFS=$as_save_IFS
7104  test -z "$as_dir" && as_dir=.
7105    for ac_exec_ext in '' $ac_executable_extensions; do
7106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7107    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7109    break 2
7110  fi
7111done
7112  done
7113IFS=$as_save_IFS
7114
7115  ;;
7116esac
7117fi
7118DIFF=$ac_cv_path_DIFF
7119if test -n "$DIFF"; then
7120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7121$as_echo "$DIFF" >&6; }
7122else
7123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7124$as_echo "no" >&6; }
7125fi
7126
7127
7128          if test "x$DIFF" = x; then
7129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7130          fi
7131        else
7132          # Otherwise we believe it is a complete path. Use it as it is.
7133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7134$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7136$as_echo_n "checking for DIFF... " >&6; }
7137          if test ! -x "$tool_specified"; then
7138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7139$as_echo "not found" >&6; }
7140            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7141          fi
7142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7143$as_echo "$tool_specified" >&6; }
7144        fi
7145      fi
7146    fi
7147
7148  fi
7149
7150
7151
7152  if test "x$DIFF" = x; then
7153    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7154  fi
7155
7156
7157
7158
7159
7160  # Publish this variable in the help.
7161
7162
7163  if [ -z "${DIRNAME+x}" ]; then
7164    # The variable is not set by user, try to locate tool using the code snippet
7165    for ac_prog in dirname
7166do
7167  # Extract the first word of "$ac_prog", so it can be a program name with args.
7168set dummy $ac_prog; ac_word=$2
7169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7170$as_echo_n "checking for $ac_word... " >&6; }
7171if ${ac_cv_path_DIRNAME+:} false; then :
7172  $as_echo_n "(cached) " >&6
7173else
7174  case $DIRNAME in
7175  [\\/]* | ?:[\\/]*)
7176  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7177  ;;
7178  *)
7179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7180for as_dir in $PATH
7181do
7182  IFS=$as_save_IFS
7183  test -z "$as_dir" && as_dir=.
7184    for ac_exec_ext in '' $ac_executable_extensions; do
7185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7186    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7188    break 2
7189  fi
7190done
7191  done
7192IFS=$as_save_IFS
7193
7194  ;;
7195esac
7196fi
7197DIRNAME=$ac_cv_path_DIRNAME
7198if test -n "$DIRNAME"; then
7199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7200$as_echo "$DIRNAME" >&6; }
7201else
7202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7203$as_echo "no" >&6; }
7204fi
7205
7206
7207  test -n "$DIRNAME" && break
7208done
7209
7210  else
7211    # The variable is set, but is it from the command line or the environment?
7212
7213    # Try to remove the string !DIRNAME! from our list.
7214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7216      # If it failed, the variable was not from the command line. Ignore it,
7217      # but warn the user (except for BASH, which is always set by the calling BASH).
7218      if test "xDIRNAME" != xBASH; then
7219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7220$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7221      fi
7222      # Try to locate tool using the code snippet
7223      for ac_prog in dirname
7224do
7225  # Extract the first word of "$ac_prog", so it can be a program name with args.
7226set dummy $ac_prog; ac_word=$2
7227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7228$as_echo_n "checking for $ac_word... " >&6; }
7229if ${ac_cv_path_DIRNAME+:} false; then :
7230  $as_echo_n "(cached) " >&6
7231else
7232  case $DIRNAME in
7233  [\\/]* | ?:[\\/]*)
7234  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7235  ;;
7236  *)
7237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7238for as_dir in $PATH
7239do
7240  IFS=$as_save_IFS
7241  test -z "$as_dir" && as_dir=.
7242    for ac_exec_ext in '' $ac_executable_extensions; do
7243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7244    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7246    break 2
7247  fi
7248done
7249  done
7250IFS=$as_save_IFS
7251
7252  ;;
7253esac
7254fi
7255DIRNAME=$ac_cv_path_DIRNAME
7256if test -n "$DIRNAME"; then
7257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7258$as_echo "$DIRNAME" >&6; }
7259else
7260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7261$as_echo "no" >&6; }
7262fi
7263
7264
7265  test -n "$DIRNAME" && break
7266done
7267
7268    else
7269      # If it succeeded, then it was overridden by the user. We will use it
7270      # for the tool.
7271
7272      # First remove it from the list of overridden variables, so we can test
7273      # for unknown variables in the end.
7274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7275
7276      # Check if we try to supply an empty value
7277      if test "x$DIRNAME" = x; then
7278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7279$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7281$as_echo_n "checking for DIRNAME... " >&6; }
7282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7283$as_echo "disabled" >&6; }
7284      else
7285        # Check if the provided tool contains a complete path.
7286        tool_specified="$DIRNAME"
7287        tool_basename="${tool_specified##*/}"
7288        if test "x$tool_basename" = "x$tool_specified"; then
7289          # A command without a complete path is provided, search $PATH.
7290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7291$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7292          # Extract the first word of "$tool_basename", so it can be a program name with args.
7293set dummy $tool_basename; ac_word=$2
7294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7295$as_echo_n "checking for $ac_word... " >&6; }
7296if ${ac_cv_path_DIRNAME+:} false; then :
7297  $as_echo_n "(cached) " >&6
7298else
7299  case $DIRNAME in
7300  [\\/]* | ?:[\\/]*)
7301  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7302  ;;
7303  *)
7304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7305for as_dir in $PATH
7306do
7307  IFS=$as_save_IFS
7308  test -z "$as_dir" && as_dir=.
7309    for ac_exec_ext in '' $ac_executable_extensions; do
7310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7311    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7313    break 2
7314  fi
7315done
7316  done
7317IFS=$as_save_IFS
7318
7319  ;;
7320esac
7321fi
7322DIRNAME=$ac_cv_path_DIRNAME
7323if test -n "$DIRNAME"; then
7324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7325$as_echo "$DIRNAME" >&6; }
7326else
7327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7328$as_echo "no" >&6; }
7329fi
7330
7331
7332          if test "x$DIRNAME" = x; then
7333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7334          fi
7335        else
7336          # Otherwise we believe it is a complete path. Use it as it is.
7337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7338$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7340$as_echo_n "checking for DIRNAME... " >&6; }
7341          if test ! -x "$tool_specified"; then
7342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7343$as_echo "not found" >&6; }
7344            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7345          fi
7346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7347$as_echo "$tool_specified" >&6; }
7348        fi
7349      fi
7350    fi
7351
7352  fi
7353
7354
7355
7356  if test "x$DIRNAME" = x; then
7357    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7358  fi
7359
7360
7361
7362
7363
7364  # Publish this variable in the help.
7365
7366
7367  if [ -z "${ECHO+x}" ]; then
7368    # The variable is not set by user, try to locate tool using the code snippet
7369    for ac_prog in echo
7370do
7371  # Extract the first word of "$ac_prog", so it can be a program name with args.
7372set dummy $ac_prog; ac_word=$2
7373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7374$as_echo_n "checking for $ac_word... " >&6; }
7375if ${ac_cv_path_ECHO+:} false; then :
7376  $as_echo_n "(cached) " >&6
7377else
7378  case $ECHO in
7379  [\\/]* | ?:[\\/]*)
7380  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7381  ;;
7382  *)
7383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7384for as_dir in $PATH
7385do
7386  IFS=$as_save_IFS
7387  test -z "$as_dir" && as_dir=.
7388    for ac_exec_ext in '' $ac_executable_extensions; do
7389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7390    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7392    break 2
7393  fi
7394done
7395  done
7396IFS=$as_save_IFS
7397
7398  ;;
7399esac
7400fi
7401ECHO=$ac_cv_path_ECHO
7402if test -n "$ECHO"; then
7403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7404$as_echo "$ECHO" >&6; }
7405else
7406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7407$as_echo "no" >&6; }
7408fi
7409
7410
7411  test -n "$ECHO" && break
7412done
7413
7414  else
7415    # The variable is set, but is it from the command line or the environment?
7416
7417    # Try to remove the string !ECHO! from our list.
7418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7420      # If it failed, the variable was not from the command line. Ignore it,
7421      # but warn the user (except for BASH, which is always set by the calling BASH).
7422      if test "xECHO" != xBASH; then
7423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7424$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7425      fi
7426      # Try to locate tool using the code snippet
7427      for ac_prog in echo
7428do
7429  # Extract the first word of "$ac_prog", so it can be a program name with args.
7430set dummy $ac_prog; ac_word=$2
7431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7432$as_echo_n "checking for $ac_word... " >&6; }
7433if ${ac_cv_path_ECHO+:} false; then :
7434  $as_echo_n "(cached) " >&6
7435else
7436  case $ECHO in
7437  [\\/]* | ?:[\\/]*)
7438  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7439  ;;
7440  *)
7441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7442for as_dir in $PATH
7443do
7444  IFS=$as_save_IFS
7445  test -z "$as_dir" && as_dir=.
7446    for ac_exec_ext in '' $ac_executable_extensions; do
7447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7448    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7450    break 2
7451  fi
7452done
7453  done
7454IFS=$as_save_IFS
7455
7456  ;;
7457esac
7458fi
7459ECHO=$ac_cv_path_ECHO
7460if test -n "$ECHO"; then
7461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7462$as_echo "$ECHO" >&6; }
7463else
7464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465$as_echo "no" >&6; }
7466fi
7467
7468
7469  test -n "$ECHO" && break
7470done
7471
7472    else
7473      # If it succeeded, then it was overridden by the user. We will use it
7474      # for the tool.
7475
7476      # First remove it from the list of overridden variables, so we can test
7477      # for unknown variables in the end.
7478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7479
7480      # Check if we try to supply an empty value
7481      if test "x$ECHO" = x; then
7482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7483$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7485$as_echo_n "checking for ECHO... " >&6; }
7486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7487$as_echo "disabled" >&6; }
7488      else
7489        # Check if the provided tool contains a complete path.
7490        tool_specified="$ECHO"
7491        tool_basename="${tool_specified##*/}"
7492        if test "x$tool_basename" = "x$tool_specified"; then
7493          # A command without a complete path is provided, search $PATH.
7494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7495$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7496          # Extract the first word of "$tool_basename", so it can be a program name with args.
7497set dummy $tool_basename; ac_word=$2
7498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7499$as_echo_n "checking for $ac_word... " >&6; }
7500if ${ac_cv_path_ECHO+:} false; then :
7501  $as_echo_n "(cached) " >&6
7502else
7503  case $ECHO in
7504  [\\/]* | ?:[\\/]*)
7505  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7506  ;;
7507  *)
7508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7509for as_dir in $PATH
7510do
7511  IFS=$as_save_IFS
7512  test -z "$as_dir" && as_dir=.
7513    for ac_exec_ext in '' $ac_executable_extensions; do
7514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7515    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7517    break 2
7518  fi
7519done
7520  done
7521IFS=$as_save_IFS
7522
7523  ;;
7524esac
7525fi
7526ECHO=$ac_cv_path_ECHO
7527if test -n "$ECHO"; then
7528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7529$as_echo "$ECHO" >&6; }
7530else
7531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7532$as_echo "no" >&6; }
7533fi
7534
7535
7536          if test "x$ECHO" = x; then
7537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7538          fi
7539        else
7540          # Otherwise we believe it is a complete path. Use it as it is.
7541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7542$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7544$as_echo_n "checking for ECHO... " >&6; }
7545          if test ! -x "$tool_specified"; then
7546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7547$as_echo "not found" >&6; }
7548            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7549          fi
7550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7551$as_echo "$tool_specified" >&6; }
7552        fi
7553      fi
7554    fi
7555
7556  fi
7557
7558
7559
7560  if test "x$ECHO" = x; then
7561    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7562  fi
7563
7564
7565
7566
7567
7568  # Publish this variable in the help.
7569
7570
7571  if [ -z "${EXPR+x}" ]; then
7572    # The variable is not set by user, try to locate tool using the code snippet
7573    for ac_prog in expr
7574do
7575  # Extract the first word of "$ac_prog", so it can be a program name with args.
7576set dummy $ac_prog; ac_word=$2
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7578$as_echo_n "checking for $ac_word... " >&6; }
7579if ${ac_cv_path_EXPR+:} false; then :
7580  $as_echo_n "(cached) " >&6
7581else
7582  case $EXPR in
7583  [\\/]* | ?:[\\/]*)
7584  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7585  ;;
7586  *)
7587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588for as_dir in $PATH
7589do
7590  IFS=$as_save_IFS
7591  test -z "$as_dir" && as_dir=.
7592    for ac_exec_ext in '' $ac_executable_extensions; do
7593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7594    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7596    break 2
7597  fi
7598done
7599  done
7600IFS=$as_save_IFS
7601
7602  ;;
7603esac
7604fi
7605EXPR=$ac_cv_path_EXPR
7606if test -n "$EXPR"; then
7607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7608$as_echo "$EXPR" >&6; }
7609else
7610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7611$as_echo "no" >&6; }
7612fi
7613
7614
7615  test -n "$EXPR" && break
7616done
7617
7618  else
7619    # The variable is set, but is it from the command line or the environment?
7620
7621    # Try to remove the string !EXPR! from our list.
7622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7624      # If it failed, the variable was not from the command line. Ignore it,
7625      # but warn the user (except for BASH, which is always set by the calling BASH).
7626      if test "xEXPR" != xBASH; then
7627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7628$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7629      fi
7630      # Try to locate tool using the code snippet
7631      for ac_prog in expr
7632do
7633  # Extract the first word of "$ac_prog", so it can be a program name with args.
7634set dummy $ac_prog; ac_word=$2
7635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7636$as_echo_n "checking for $ac_word... " >&6; }
7637if ${ac_cv_path_EXPR+:} false; then :
7638  $as_echo_n "(cached) " >&6
7639else
7640  case $EXPR in
7641  [\\/]* | ?:[\\/]*)
7642  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7643  ;;
7644  *)
7645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7646for as_dir in $PATH
7647do
7648  IFS=$as_save_IFS
7649  test -z "$as_dir" && as_dir=.
7650    for ac_exec_ext in '' $ac_executable_extensions; do
7651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7652    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7654    break 2
7655  fi
7656done
7657  done
7658IFS=$as_save_IFS
7659
7660  ;;
7661esac
7662fi
7663EXPR=$ac_cv_path_EXPR
7664if test -n "$EXPR"; then
7665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7666$as_echo "$EXPR" >&6; }
7667else
7668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7669$as_echo "no" >&6; }
7670fi
7671
7672
7673  test -n "$EXPR" && break
7674done
7675
7676    else
7677      # If it succeeded, then it was overridden by the user. We will use it
7678      # for the tool.
7679
7680      # First remove it from the list of overridden variables, so we can test
7681      # for unknown variables in the end.
7682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7683
7684      # Check if we try to supply an empty value
7685      if test "x$EXPR" = x; then
7686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7687$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7689$as_echo_n "checking for EXPR... " >&6; }
7690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7691$as_echo "disabled" >&6; }
7692      else
7693        # Check if the provided tool contains a complete path.
7694        tool_specified="$EXPR"
7695        tool_basename="${tool_specified##*/}"
7696        if test "x$tool_basename" = "x$tool_specified"; then
7697          # A command without a complete path is provided, search $PATH.
7698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7699$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7700          # Extract the first word of "$tool_basename", so it can be a program name with args.
7701set dummy $tool_basename; ac_word=$2
7702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7703$as_echo_n "checking for $ac_word... " >&6; }
7704if ${ac_cv_path_EXPR+:} false; then :
7705  $as_echo_n "(cached) " >&6
7706else
7707  case $EXPR in
7708  [\\/]* | ?:[\\/]*)
7709  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7710  ;;
7711  *)
7712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7713for as_dir in $PATH
7714do
7715  IFS=$as_save_IFS
7716  test -z "$as_dir" && as_dir=.
7717    for ac_exec_ext in '' $ac_executable_extensions; do
7718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7719    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7721    break 2
7722  fi
7723done
7724  done
7725IFS=$as_save_IFS
7726
7727  ;;
7728esac
7729fi
7730EXPR=$ac_cv_path_EXPR
7731if test -n "$EXPR"; then
7732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7733$as_echo "$EXPR" >&6; }
7734else
7735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7736$as_echo "no" >&6; }
7737fi
7738
7739
7740          if test "x$EXPR" = x; then
7741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7742          fi
7743        else
7744          # Otherwise we believe it is a complete path. Use it as it is.
7745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7746$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7748$as_echo_n "checking for EXPR... " >&6; }
7749          if test ! -x "$tool_specified"; then
7750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7751$as_echo "not found" >&6; }
7752            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7753          fi
7754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7755$as_echo "$tool_specified" >&6; }
7756        fi
7757      fi
7758    fi
7759
7760  fi
7761
7762
7763
7764  if test "x$EXPR" = x; then
7765    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7766  fi
7767
7768
7769
7770
7771
7772  # Publish this variable in the help.
7773
7774
7775  if [ -z "${FILE+x}" ]; then
7776    # The variable is not set by user, try to locate tool using the code snippet
7777    for ac_prog in file
7778do
7779  # Extract the first word of "$ac_prog", so it can be a program name with args.
7780set dummy $ac_prog; ac_word=$2
7781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7782$as_echo_n "checking for $ac_word... " >&6; }
7783if ${ac_cv_path_FILE+:} false; then :
7784  $as_echo_n "(cached) " >&6
7785else
7786  case $FILE in
7787  [\\/]* | ?:[\\/]*)
7788  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7789  ;;
7790  *)
7791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7792for as_dir in $PATH
7793do
7794  IFS=$as_save_IFS
7795  test -z "$as_dir" && as_dir=.
7796    for ac_exec_ext in '' $ac_executable_extensions; do
7797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7798    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7800    break 2
7801  fi
7802done
7803  done
7804IFS=$as_save_IFS
7805
7806  ;;
7807esac
7808fi
7809FILE=$ac_cv_path_FILE
7810if test -n "$FILE"; then
7811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7812$as_echo "$FILE" >&6; }
7813else
7814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7815$as_echo "no" >&6; }
7816fi
7817
7818
7819  test -n "$FILE" && break
7820done
7821
7822  else
7823    # The variable is set, but is it from the command line or the environment?
7824
7825    # Try to remove the string !FILE! from our list.
7826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7828      # If it failed, the variable was not from the command line. Ignore it,
7829      # but warn the user (except for BASH, which is always set by the calling BASH).
7830      if test "xFILE" != xBASH; then
7831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7832$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7833      fi
7834      # Try to locate tool using the code snippet
7835      for ac_prog in file
7836do
7837  # Extract the first word of "$ac_prog", so it can be a program name with args.
7838set dummy $ac_prog; ac_word=$2
7839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7840$as_echo_n "checking for $ac_word... " >&6; }
7841if ${ac_cv_path_FILE+:} false; then :
7842  $as_echo_n "(cached) " >&6
7843else
7844  case $FILE in
7845  [\\/]* | ?:[\\/]*)
7846  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7847  ;;
7848  *)
7849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7850for as_dir in $PATH
7851do
7852  IFS=$as_save_IFS
7853  test -z "$as_dir" && as_dir=.
7854    for ac_exec_ext in '' $ac_executable_extensions; do
7855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7856    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7858    break 2
7859  fi
7860done
7861  done
7862IFS=$as_save_IFS
7863
7864  ;;
7865esac
7866fi
7867FILE=$ac_cv_path_FILE
7868if test -n "$FILE"; then
7869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7870$as_echo "$FILE" >&6; }
7871else
7872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7873$as_echo "no" >&6; }
7874fi
7875
7876
7877  test -n "$FILE" && break
7878done
7879
7880    else
7881      # If it succeeded, then it was overridden by the user. We will use it
7882      # for the tool.
7883
7884      # First remove it from the list of overridden variables, so we can test
7885      # for unknown variables in the end.
7886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7887
7888      # Check if we try to supply an empty value
7889      if test "x$FILE" = x; then
7890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7891$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7893$as_echo_n "checking for FILE... " >&6; }
7894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7895$as_echo "disabled" >&6; }
7896      else
7897        # Check if the provided tool contains a complete path.
7898        tool_specified="$FILE"
7899        tool_basename="${tool_specified##*/}"
7900        if test "x$tool_basename" = "x$tool_specified"; then
7901          # A command without a complete path is provided, search $PATH.
7902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7903$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7904          # Extract the first word of "$tool_basename", so it can be a program name with args.
7905set dummy $tool_basename; ac_word=$2
7906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7907$as_echo_n "checking for $ac_word... " >&6; }
7908if ${ac_cv_path_FILE+:} false; then :
7909  $as_echo_n "(cached) " >&6
7910else
7911  case $FILE in
7912  [\\/]* | ?:[\\/]*)
7913  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7914  ;;
7915  *)
7916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7917for as_dir in $PATH
7918do
7919  IFS=$as_save_IFS
7920  test -z "$as_dir" && as_dir=.
7921    for ac_exec_ext in '' $ac_executable_extensions; do
7922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7923    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7925    break 2
7926  fi
7927done
7928  done
7929IFS=$as_save_IFS
7930
7931  ;;
7932esac
7933fi
7934FILE=$ac_cv_path_FILE
7935if test -n "$FILE"; then
7936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7937$as_echo "$FILE" >&6; }
7938else
7939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7940$as_echo "no" >&6; }
7941fi
7942
7943
7944          if test "x$FILE" = x; then
7945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7946          fi
7947        else
7948          # Otherwise we believe it is a complete path. Use it as it is.
7949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7950$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7952$as_echo_n "checking for FILE... " >&6; }
7953          if test ! -x "$tool_specified"; then
7954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7955$as_echo "not found" >&6; }
7956            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7957          fi
7958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7959$as_echo "$tool_specified" >&6; }
7960        fi
7961      fi
7962    fi
7963
7964  fi
7965
7966
7967
7968  if test "x$FILE" = x; then
7969    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7970  fi
7971
7972
7973
7974
7975
7976  # Publish this variable in the help.
7977
7978
7979  if [ -z "${FIND+x}" ]; then
7980    # The variable is not set by user, try to locate tool using the code snippet
7981    for ac_prog in find
7982do
7983  # Extract the first word of "$ac_prog", so it can be a program name with args.
7984set dummy $ac_prog; ac_word=$2
7985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7986$as_echo_n "checking for $ac_word... " >&6; }
7987if ${ac_cv_path_FIND+:} false; then :
7988  $as_echo_n "(cached) " >&6
7989else
7990  case $FIND in
7991  [\\/]* | ?:[\\/]*)
7992  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7993  ;;
7994  *)
7995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7996for as_dir in $PATH
7997do
7998  IFS=$as_save_IFS
7999  test -z "$as_dir" && as_dir=.
8000    for ac_exec_ext in '' $ac_executable_extensions; do
8001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8002    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8004    break 2
8005  fi
8006done
8007  done
8008IFS=$as_save_IFS
8009
8010  ;;
8011esac
8012fi
8013FIND=$ac_cv_path_FIND
8014if test -n "$FIND"; then
8015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8016$as_echo "$FIND" >&6; }
8017else
8018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8019$as_echo "no" >&6; }
8020fi
8021
8022
8023  test -n "$FIND" && break
8024done
8025
8026  else
8027    # The variable is set, but is it from the command line or the environment?
8028
8029    # Try to remove the string !FIND! from our list.
8030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8032      # If it failed, the variable was not from the command line. Ignore it,
8033      # but warn the user (except for BASH, which is always set by the calling BASH).
8034      if test "xFIND" != xBASH; then
8035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8036$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8037      fi
8038      # Try to locate tool using the code snippet
8039      for ac_prog in find
8040do
8041  # Extract the first word of "$ac_prog", so it can be a program name with args.
8042set dummy $ac_prog; ac_word=$2
8043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8044$as_echo_n "checking for $ac_word... " >&6; }
8045if ${ac_cv_path_FIND+:} false; then :
8046  $as_echo_n "(cached) " >&6
8047else
8048  case $FIND in
8049  [\\/]* | ?:[\\/]*)
8050  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8051  ;;
8052  *)
8053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8054for as_dir in $PATH
8055do
8056  IFS=$as_save_IFS
8057  test -z "$as_dir" && as_dir=.
8058    for ac_exec_ext in '' $ac_executable_extensions; do
8059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8060    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8062    break 2
8063  fi
8064done
8065  done
8066IFS=$as_save_IFS
8067
8068  ;;
8069esac
8070fi
8071FIND=$ac_cv_path_FIND
8072if test -n "$FIND"; then
8073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8074$as_echo "$FIND" >&6; }
8075else
8076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8077$as_echo "no" >&6; }
8078fi
8079
8080
8081  test -n "$FIND" && break
8082done
8083
8084    else
8085      # If it succeeded, then it was overridden by the user. We will use it
8086      # for the tool.
8087
8088      # First remove it from the list of overridden variables, so we can test
8089      # for unknown variables in the end.
8090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8091
8092      # Check if we try to supply an empty value
8093      if test "x$FIND" = x; then
8094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8095$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8097$as_echo_n "checking for FIND... " >&6; }
8098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8099$as_echo "disabled" >&6; }
8100      else
8101        # Check if the provided tool contains a complete path.
8102        tool_specified="$FIND"
8103        tool_basename="${tool_specified##*/}"
8104        if test "x$tool_basename" = "x$tool_specified"; then
8105          # A command without a complete path is provided, search $PATH.
8106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8107$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8108          # Extract the first word of "$tool_basename", so it can be a program name with args.
8109set dummy $tool_basename; ac_word=$2
8110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8111$as_echo_n "checking for $ac_word... " >&6; }
8112if ${ac_cv_path_FIND+:} false; then :
8113  $as_echo_n "(cached) " >&6
8114else
8115  case $FIND in
8116  [\\/]* | ?:[\\/]*)
8117  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8118  ;;
8119  *)
8120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8121for as_dir in $PATH
8122do
8123  IFS=$as_save_IFS
8124  test -z "$as_dir" && as_dir=.
8125    for ac_exec_ext in '' $ac_executable_extensions; do
8126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8127    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8129    break 2
8130  fi
8131done
8132  done
8133IFS=$as_save_IFS
8134
8135  ;;
8136esac
8137fi
8138FIND=$ac_cv_path_FIND
8139if test -n "$FIND"; then
8140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8141$as_echo "$FIND" >&6; }
8142else
8143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8144$as_echo "no" >&6; }
8145fi
8146
8147
8148          if test "x$FIND" = x; then
8149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8150          fi
8151        else
8152          # Otherwise we believe it is a complete path. Use it as it is.
8153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8154$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8156$as_echo_n "checking for FIND... " >&6; }
8157          if test ! -x "$tool_specified"; then
8158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8159$as_echo "not found" >&6; }
8160            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8161          fi
8162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8163$as_echo "$tool_specified" >&6; }
8164        fi
8165      fi
8166    fi
8167
8168  fi
8169
8170
8171
8172  if test "x$FIND" = x; then
8173    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8174  fi
8175
8176
8177
8178
8179
8180  # Publish this variable in the help.
8181
8182
8183  if [ -z "${HEAD+x}" ]; then
8184    # The variable is not set by user, try to locate tool using the code snippet
8185    for ac_prog in head
8186do
8187  # Extract the first word of "$ac_prog", so it can be a program name with args.
8188set dummy $ac_prog; ac_word=$2
8189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8190$as_echo_n "checking for $ac_word... " >&6; }
8191if ${ac_cv_path_HEAD+:} false; then :
8192  $as_echo_n "(cached) " >&6
8193else
8194  case $HEAD in
8195  [\\/]* | ?:[\\/]*)
8196  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8197  ;;
8198  *)
8199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8200for as_dir in $PATH
8201do
8202  IFS=$as_save_IFS
8203  test -z "$as_dir" && as_dir=.
8204    for ac_exec_ext in '' $ac_executable_extensions; do
8205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8206    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8208    break 2
8209  fi
8210done
8211  done
8212IFS=$as_save_IFS
8213
8214  ;;
8215esac
8216fi
8217HEAD=$ac_cv_path_HEAD
8218if test -n "$HEAD"; then
8219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8220$as_echo "$HEAD" >&6; }
8221else
8222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8223$as_echo "no" >&6; }
8224fi
8225
8226
8227  test -n "$HEAD" && break
8228done
8229
8230  else
8231    # The variable is set, but is it from the command line or the environment?
8232
8233    # Try to remove the string !HEAD! from our list.
8234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8236      # If it failed, the variable was not from the command line. Ignore it,
8237      # but warn the user (except for BASH, which is always set by the calling BASH).
8238      if test "xHEAD" != xBASH; then
8239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8240$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8241      fi
8242      # Try to locate tool using the code snippet
8243      for ac_prog in head
8244do
8245  # Extract the first word of "$ac_prog", so it can be a program name with args.
8246set dummy $ac_prog; ac_word=$2
8247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8248$as_echo_n "checking for $ac_word... " >&6; }
8249if ${ac_cv_path_HEAD+:} false; then :
8250  $as_echo_n "(cached) " >&6
8251else
8252  case $HEAD in
8253  [\\/]* | ?:[\\/]*)
8254  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8255  ;;
8256  *)
8257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8258for as_dir in $PATH
8259do
8260  IFS=$as_save_IFS
8261  test -z "$as_dir" && as_dir=.
8262    for ac_exec_ext in '' $ac_executable_extensions; do
8263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8264    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8266    break 2
8267  fi
8268done
8269  done
8270IFS=$as_save_IFS
8271
8272  ;;
8273esac
8274fi
8275HEAD=$ac_cv_path_HEAD
8276if test -n "$HEAD"; then
8277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8278$as_echo "$HEAD" >&6; }
8279else
8280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8281$as_echo "no" >&6; }
8282fi
8283
8284
8285  test -n "$HEAD" && break
8286done
8287
8288    else
8289      # If it succeeded, then it was overridden by the user. We will use it
8290      # for the tool.
8291
8292      # First remove it from the list of overridden variables, so we can test
8293      # for unknown variables in the end.
8294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8295
8296      # Check if we try to supply an empty value
8297      if test "x$HEAD" = x; then
8298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8299$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8301$as_echo_n "checking for HEAD... " >&6; }
8302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8303$as_echo "disabled" >&6; }
8304      else
8305        # Check if the provided tool contains a complete path.
8306        tool_specified="$HEAD"
8307        tool_basename="${tool_specified##*/}"
8308        if test "x$tool_basename" = "x$tool_specified"; then
8309          # A command without a complete path is provided, search $PATH.
8310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8311$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8312          # Extract the first word of "$tool_basename", so it can be a program name with args.
8313set dummy $tool_basename; ac_word=$2
8314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8315$as_echo_n "checking for $ac_word... " >&6; }
8316if ${ac_cv_path_HEAD+:} false; then :
8317  $as_echo_n "(cached) " >&6
8318else
8319  case $HEAD in
8320  [\\/]* | ?:[\\/]*)
8321  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8322  ;;
8323  *)
8324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8325for as_dir in $PATH
8326do
8327  IFS=$as_save_IFS
8328  test -z "$as_dir" && as_dir=.
8329    for ac_exec_ext in '' $ac_executable_extensions; do
8330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8331    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8333    break 2
8334  fi
8335done
8336  done
8337IFS=$as_save_IFS
8338
8339  ;;
8340esac
8341fi
8342HEAD=$ac_cv_path_HEAD
8343if test -n "$HEAD"; then
8344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8345$as_echo "$HEAD" >&6; }
8346else
8347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8348$as_echo "no" >&6; }
8349fi
8350
8351
8352          if test "x$HEAD" = x; then
8353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8354          fi
8355        else
8356          # Otherwise we believe it is a complete path. Use it as it is.
8357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8358$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8360$as_echo_n "checking for HEAD... " >&6; }
8361          if test ! -x "$tool_specified"; then
8362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8363$as_echo "not found" >&6; }
8364            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8365          fi
8366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8367$as_echo "$tool_specified" >&6; }
8368        fi
8369      fi
8370    fi
8371
8372  fi
8373
8374
8375
8376  if test "x$HEAD" = x; then
8377    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8378  fi
8379
8380
8381
8382
8383
8384  # Publish this variable in the help.
8385
8386
8387  if [ -z "${LN+x}" ]; then
8388    # The variable is not set by user, try to locate tool using the code snippet
8389    for ac_prog in ln
8390do
8391  # Extract the first word of "$ac_prog", so it can be a program name with args.
8392set dummy $ac_prog; ac_word=$2
8393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8394$as_echo_n "checking for $ac_word... " >&6; }
8395if ${ac_cv_path_LN+:} false; then :
8396  $as_echo_n "(cached) " >&6
8397else
8398  case $LN in
8399  [\\/]* | ?:[\\/]*)
8400  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8401  ;;
8402  *)
8403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8404for as_dir in $PATH
8405do
8406  IFS=$as_save_IFS
8407  test -z "$as_dir" && as_dir=.
8408    for ac_exec_ext in '' $ac_executable_extensions; do
8409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8410    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8412    break 2
8413  fi
8414done
8415  done
8416IFS=$as_save_IFS
8417
8418  ;;
8419esac
8420fi
8421LN=$ac_cv_path_LN
8422if test -n "$LN"; then
8423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8424$as_echo "$LN" >&6; }
8425else
8426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8427$as_echo "no" >&6; }
8428fi
8429
8430
8431  test -n "$LN" && break
8432done
8433
8434  else
8435    # The variable is set, but is it from the command line or the environment?
8436
8437    # Try to remove the string !LN! from our list.
8438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8440      # If it failed, the variable was not from the command line. Ignore it,
8441      # but warn the user (except for BASH, which is always set by the calling BASH).
8442      if test "xLN" != xBASH; then
8443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8444$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8445      fi
8446      # Try to locate tool using the code snippet
8447      for ac_prog in ln
8448do
8449  # Extract the first word of "$ac_prog", so it can be a program name with args.
8450set dummy $ac_prog; ac_word=$2
8451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8452$as_echo_n "checking for $ac_word... " >&6; }
8453if ${ac_cv_path_LN+:} false; then :
8454  $as_echo_n "(cached) " >&6
8455else
8456  case $LN in
8457  [\\/]* | ?:[\\/]*)
8458  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8459  ;;
8460  *)
8461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8462for as_dir in $PATH
8463do
8464  IFS=$as_save_IFS
8465  test -z "$as_dir" && as_dir=.
8466    for ac_exec_ext in '' $ac_executable_extensions; do
8467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8468    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8470    break 2
8471  fi
8472done
8473  done
8474IFS=$as_save_IFS
8475
8476  ;;
8477esac
8478fi
8479LN=$ac_cv_path_LN
8480if test -n "$LN"; then
8481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8482$as_echo "$LN" >&6; }
8483else
8484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8485$as_echo "no" >&6; }
8486fi
8487
8488
8489  test -n "$LN" && break
8490done
8491
8492    else
8493      # If it succeeded, then it was overridden by the user. We will use it
8494      # for the tool.
8495
8496      # First remove it from the list of overridden variables, so we can test
8497      # for unknown variables in the end.
8498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8499
8500      # Check if we try to supply an empty value
8501      if test "x$LN" = x; then
8502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8503$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8505$as_echo_n "checking for LN... " >&6; }
8506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8507$as_echo "disabled" >&6; }
8508      else
8509        # Check if the provided tool contains a complete path.
8510        tool_specified="$LN"
8511        tool_basename="${tool_specified##*/}"
8512        if test "x$tool_basename" = "x$tool_specified"; then
8513          # A command without a complete path is provided, search $PATH.
8514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8515$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8516          # Extract the first word of "$tool_basename", so it can be a program name with args.
8517set dummy $tool_basename; ac_word=$2
8518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8519$as_echo_n "checking for $ac_word... " >&6; }
8520if ${ac_cv_path_LN+:} false; then :
8521  $as_echo_n "(cached) " >&6
8522else
8523  case $LN in
8524  [\\/]* | ?:[\\/]*)
8525  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8526  ;;
8527  *)
8528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8529for as_dir in $PATH
8530do
8531  IFS=$as_save_IFS
8532  test -z "$as_dir" && as_dir=.
8533    for ac_exec_ext in '' $ac_executable_extensions; do
8534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8535    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8537    break 2
8538  fi
8539done
8540  done
8541IFS=$as_save_IFS
8542
8543  ;;
8544esac
8545fi
8546LN=$ac_cv_path_LN
8547if test -n "$LN"; then
8548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8549$as_echo "$LN" >&6; }
8550else
8551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8552$as_echo "no" >&6; }
8553fi
8554
8555
8556          if test "x$LN" = x; then
8557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8558          fi
8559        else
8560          # Otherwise we believe it is a complete path. Use it as it is.
8561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8562$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8564$as_echo_n "checking for LN... " >&6; }
8565          if test ! -x "$tool_specified"; then
8566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8567$as_echo "not found" >&6; }
8568            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8569          fi
8570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8571$as_echo "$tool_specified" >&6; }
8572        fi
8573      fi
8574    fi
8575
8576  fi
8577
8578
8579
8580  if test "x$LN" = x; then
8581    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8582  fi
8583
8584
8585
8586
8587
8588  # Publish this variable in the help.
8589
8590
8591  if [ -z "${LS+x}" ]; then
8592    # The variable is not set by user, try to locate tool using the code snippet
8593    for ac_prog in ls
8594do
8595  # Extract the first word of "$ac_prog", so it can be a program name with args.
8596set dummy $ac_prog; ac_word=$2
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8598$as_echo_n "checking for $ac_word... " >&6; }
8599if ${ac_cv_path_LS+:} false; then :
8600  $as_echo_n "(cached) " >&6
8601else
8602  case $LS in
8603  [\\/]* | ?:[\\/]*)
8604  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8605  ;;
8606  *)
8607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608for as_dir in $PATH
8609do
8610  IFS=$as_save_IFS
8611  test -z "$as_dir" && as_dir=.
8612    for ac_exec_ext in '' $ac_executable_extensions; do
8613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8616    break 2
8617  fi
8618done
8619  done
8620IFS=$as_save_IFS
8621
8622  ;;
8623esac
8624fi
8625LS=$ac_cv_path_LS
8626if test -n "$LS"; then
8627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8628$as_echo "$LS" >&6; }
8629else
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8631$as_echo "no" >&6; }
8632fi
8633
8634
8635  test -n "$LS" && break
8636done
8637
8638  else
8639    # The variable is set, but is it from the command line or the environment?
8640
8641    # Try to remove the string !LS! from our list.
8642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8644      # If it failed, the variable was not from the command line. Ignore it,
8645      # but warn the user (except for BASH, which is always set by the calling BASH).
8646      if test "xLS" != xBASH; then
8647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8648$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8649      fi
8650      # Try to locate tool using the code snippet
8651      for ac_prog in ls
8652do
8653  # Extract the first word of "$ac_prog", so it can be a program name with args.
8654set dummy $ac_prog; ac_word=$2
8655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8656$as_echo_n "checking for $ac_word... " >&6; }
8657if ${ac_cv_path_LS+:} false; then :
8658  $as_echo_n "(cached) " >&6
8659else
8660  case $LS in
8661  [\\/]* | ?:[\\/]*)
8662  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8663  ;;
8664  *)
8665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8666for as_dir in $PATH
8667do
8668  IFS=$as_save_IFS
8669  test -z "$as_dir" && as_dir=.
8670    for ac_exec_ext in '' $ac_executable_extensions; do
8671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8672    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8674    break 2
8675  fi
8676done
8677  done
8678IFS=$as_save_IFS
8679
8680  ;;
8681esac
8682fi
8683LS=$ac_cv_path_LS
8684if test -n "$LS"; then
8685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8686$as_echo "$LS" >&6; }
8687else
8688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8689$as_echo "no" >&6; }
8690fi
8691
8692
8693  test -n "$LS" && break
8694done
8695
8696    else
8697      # If it succeeded, then it was overridden by the user. We will use it
8698      # for the tool.
8699
8700      # First remove it from the list of overridden variables, so we can test
8701      # for unknown variables in the end.
8702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8703
8704      # Check if we try to supply an empty value
8705      if test "x$LS" = x; then
8706        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8707$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8709$as_echo_n "checking for LS... " >&6; }
8710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8711$as_echo "disabled" >&6; }
8712      else
8713        # Check if the provided tool contains a complete path.
8714        tool_specified="$LS"
8715        tool_basename="${tool_specified##*/}"
8716        if test "x$tool_basename" = "x$tool_specified"; then
8717          # A command without a complete path is provided, search $PATH.
8718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8719$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8720          # Extract the first word of "$tool_basename", so it can be a program name with args.
8721set dummy $tool_basename; ac_word=$2
8722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8723$as_echo_n "checking for $ac_word... " >&6; }
8724if ${ac_cv_path_LS+:} false; then :
8725  $as_echo_n "(cached) " >&6
8726else
8727  case $LS in
8728  [\\/]* | ?:[\\/]*)
8729  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8730  ;;
8731  *)
8732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8733for as_dir in $PATH
8734do
8735  IFS=$as_save_IFS
8736  test -z "$as_dir" && as_dir=.
8737    for ac_exec_ext in '' $ac_executable_extensions; do
8738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8739    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8741    break 2
8742  fi
8743done
8744  done
8745IFS=$as_save_IFS
8746
8747  ;;
8748esac
8749fi
8750LS=$ac_cv_path_LS
8751if test -n "$LS"; then
8752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8753$as_echo "$LS" >&6; }
8754else
8755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8756$as_echo "no" >&6; }
8757fi
8758
8759
8760          if test "x$LS" = x; then
8761            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8762          fi
8763        else
8764          # Otherwise we believe it is a complete path. Use it as it is.
8765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8766$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8767          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8768$as_echo_n "checking for LS... " >&6; }
8769          if test ! -x "$tool_specified"; then
8770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8771$as_echo "not found" >&6; }
8772            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8773          fi
8774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8775$as_echo "$tool_specified" >&6; }
8776        fi
8777      fi
8778    fi
8779
8780  fi
8781
8782
8783
8784  if test "x$LS" = x; then
8785    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8786  fi
8787
8788
8789
8790
8791
8792  # Publish this variable in the help.
8793
8794
8795  if [ -z "${MKDIR+x}" ]; then
8796    # The variable is not set by user, try to locate tool using the code snippet
8797    for ac_prog in mkdir
8798do
8799  # Extract the first word of "$ac_prog", so it can be a program name with args.
8800set dummy $ac_prog; ac_word=$2
8801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8802$as_echo_n "checking for $ac_word... " >&6; }
8803if ${ac_cv_path_MKDIR+:} false; then :
8804  $as_echo_n "(cached) " >&6
8805else
8806  case $MKDIR in
8807  [\\/]* | ?:[\\/]*)
8808  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8809  ;;
8810  *)
8811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8812for as_dir in $PATH
8813do
8814  IFS=$as_save_IFS
8815  test -z "$as_dir" && as_dir=.
8816    for ac_exec_ext in '' $ac_executable_extensions; do
8817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8818    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8820    break 2
8821  fi
8822done
8823  done
8824IFS=$as_save_IFS
8825
8826  ;;
8827esac
8828fi
8829MKDIR=$ac_cv_path_MKDIR
8830if test -n "$MKDIR"; then
8831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8832$as_echo "$MKDIR" >&6; }
8833else
8834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8835$as_echo "no" >&6; }
8836fi
8837
8838
8839  test -n "$MKDIR" && break
8840done
8841
8842  else
8843    # The variable is set, but is it from the command line or the environment?
8844
8845    # Try to remove the string !MKDIR! from our list.
8846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8848      # If it failed, the variable was not from the command line. Ignore it,
8849      # but warn the user (except for BASH, which is always set by the calling BASH).
8850      if test "xMKDIR" != xBASH; then
8851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8852$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8853      fi
8854      # Try to locate tool using the code snippet
8855      for ac_prog in mkdir
8856do
8857  # Extract the first word of "$ac_prog", so it can be a program name with args.
8858set dummy $ac_prog; ac_word=$2
8859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8860$as_echo_n "checking for $ac_word... " >&6; }
8861if ${ac_cv_path_MKDIR+:} false; then :
8862  $as_echo_n "(cached) " >&6
8863else
8864  case $MKDIR in
8865  [\\/]* | ?:[\\/]*)
8866  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8867  ;;
8868  *)
8869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8870for as_dir in $PATH
8871do
8872  IFS=$as_save_IFS
8873  test -z "$as_dir" && as_dir=.
8874    for ac_exec_ext in '' $ac_executable_extensions; do
8875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8876    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8878    break 2
8879  fi
8880done
8881  done
8882IFS=$as_save_IFS
8883
8884  ;;
8885esac
8886fi
8887MKDIR=$ac_cv_path_MKDIR
8888if test -n "$MKDIR"; then
8889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8890$as_echo "$MKDIR" >&6; }
8891else
8892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8893$as_echo "no" >&6; }
8894fi
8895
8896
8897  test -n "$MKDIR" && break
8898done
8899
8900    else
8901      # If it succeeded, then it was overridden by the user. We will use it
8902      # for the tool.
8903
8904      # First remove it from the list of overridden variables, so we can test
8905      # for unknown variables in the end.
8906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8907
8908      # Check if we try to supply an empty value
8909      if test "x$MKDIR" = x; then
8910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8911$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8913$as_echo_n "checking for MKDIR... " >&6; }
8914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8915$as_echo "disabled" >&6; }
8916      else
8917        # Check if the provided tool contains a complete path.
8918        tool_specified="$MKDIR"
8919        tool_basename="${tool_specified##*/}"
8920        if test "x$tool_basename" = "x$tool_specified"; then
8921          # A command without a complete path is provided, search $PATH.
8922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8923$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8924          # Extract the first word of "$tool_basename", so it can be a program name with args.
8925set dummy $tool_basename; ac_word=$2
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8927$as_echo_n "checking for $ac_word... " >&6; }
8928if ${ac_cv_path_MKDIR+:} false; then :
8929  $as_echo_n "(cached) " >&6
8930else
8931  case $MKDIR in
8932  [\\/]* | ?:[\\/]*)
8933  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8934  ;;
8935  *)
8936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8937for as_dir in $PATH
8938do
8939  IFS=$as_save_IFS
8940  test -z "$as_dir" && as_dir=.
8941    for ac_exec_ext in '' $ac_executable_extensions; do
8942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8943    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8945    break 2
8946  fi
8947done
8948  done
8949IFS=$as_save_IFS
8950
8951  ;;
8952esac
8953fi
8954MKDIR=$ac_cv_path_MKDIR
8955if test -n "$MKDIR"; then
8956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8957$as_echo "$MKDIR" >&6; }
8958else
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8960$as_echo "no" >&6; }
8961fi
8962
8963
8964          if test "x$MKDIR" = x; then
8965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8966          fi
8967        else
8968          # Otherwise we believe it is a complete path. Use it as it is.
8969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8970$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8972$as_echo_n "checking for MKDIR... " >&6; }
8973          if test ! -x "$tool_specified"; then
8974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8975$as_echo "not found" >&6; }
8976            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8977          fi
8978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8979$as_echo "$tool_specified" >&6; }
8980        fi
8981      fi
8982    fi
8983
8984  fi
8985
8986
8987
8988  if test "x$MKDIR" = x; then
8989    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8990  fi
8991
8992
8993
8994
8995
8996  # Publish this variable in the help.
8997
8998
8999  if [ -z "${MKTEMP+x}" ]; then
9000    # The variable is not set by user, try to locate tool using the code snippet
9001    for ac_prog in mktemp
9002do
9003  # Extract the first word of "$ac_prog", so it can be a program name with args.
9004set dummy $ac_prog; ac_word=$2
9005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9006$as_echo_n "checking for $ac_word... " >&6; }
9007if ${ac_cv_path_MKTEMP+:} false; then :
9008  $as_echo_n "(cached) " >&6
9009else
9010  case $MKTEMP in
9011  [\\/]* | ?:[\\/]*)
9012  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9013  ;;
9014  *)
9015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9016for as_dir in $PATH
9017do
9018  IFS=$as_save_IFS
9019  test -z "$as_dir" && as_dir=.
9020    for ac_exec_ext in '' $ac_executable_extensions; do
9021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9022    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9024    break 2
9025  fi
9026done
9027  done
9028IFS=$as_save_IFS
9029
9030  ;;
9031esac
9032fi
9033MKTEMP=$ac_cv_path_MKTEMP
9034if test -n "$MKTEMP"; then
9035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9036$as_echo "$MKTEMP" >&6; }
9037else
9038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9039$as_echo "no" >&6; }
9040fi
9041
9042
9043  test -n "$MKTEMP" && break
9044done
9045
9046  else
9047    # The variable is set, but is it from the command line or the environment?
9048
9049    # Try to remove the string !MKTEMP! from our list.
9050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9052      # If it failed, the variable was not from the command line. Ignore it,
9053      # but warn the user (except for BASH, which is always set by the calling BASH).
9054      if test "xMKTEMP" != xBASH; then
9055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9056$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9057      fi
9058      # Try to locate tool using the code snippet
9059      for ac_prog in mktemp
9060do
9061  # Extract the first word of "$ac_prog", so it can be a program name with args.
9062set dummy $ac_prog; ac_word=$2
9063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9064$as_echo_n "checking for $ac_word... " >&6; }
9065if ${ac_cv_path_MKTEMP+:} false; then :
9066  $as_echo_n "(cached) " >&6
9067else
9068  case $MKTEMP in
9069  [\\/]* | ?:[\\/]*)
9070  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9071  ;;
9072  *)
9073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9074for as_dir in $PATH
9075do
9076  IFS=$as_save_IFS
9077  test -z "$as_dir" && as_dir=.
9078    for ac_exec_ext in '' $ac_executable_extensions; do
9079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9080    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9082    break 2
9083  fi
9084done
9085  done
9086IFS=$as_save_IFS
9087
9088  ;;
9089esac
9090fi
9091MKTEMP=$ac_cv_path_MKTEMP
9092if test -n "$MKTEMP"; then
9093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9094$as_echo "$MKTEMP" >&6; }
9095else
9096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9097$as_echo "no" >&6; }
9098fi
9099
9100
9101  test -n "$MKTEMP" && break
9102done
9103
9104    else
9105      # If it succeeded, then it was overridden by the user. We will use it
9106      # for the tool.
9107
9108      # First remove it from the list of overridden variables, so we can test
9109      # for unknown variables in the end.
9110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9111
9112      # Check if we try to supply an empty value
9113      if test "x$MKTEMP" = x; then
9114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9115$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9117$as_echo_n "checking for MKTEMP... " >&6; }
9118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9119$as_echo "disabled" >&6; }
9120      else
9121        # Check if the provided tool contains a complete path.
9122        tool_specified="$MKTEMP"
9123        tool_basename="${tool_specified##*/}"
9124        if test "x$tool_basename" = "x$tool_specified"; then
9125          # A command without a complete path is provided, search $PATH.
9126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9127$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9128          # Extract the first word of "$tool_basename", so it can be a program name with args.
9129set dummy $tool_basename; ac_word=$2
9130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9131$as_echo_n "checking for $ac_word... " >&6; }
9132if ${ac_cv_path_MKTEMP+:} false; then :
9133  $as_echo_n "(cached) " >&6
9134else
9135  case $MKTEMP in
9136  [\\/]* | ?:[\\/]*)
9137  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9138  ;;
9139  *)
9140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9141for as_dir in $PATH
9142do
9143  IFS=$as_save_IFS
9144  test -z "$as_dir" && as_dir=.
9145    for ac_exec_ext in '' $ac_executable_extensions; do
9146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9147    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9149    break 2
9150  fi
9151done
9152  done
9153IFS=$as_save_IFS
9154
9155  ;;
9156esac
9157fi
9158MKTEMP=$ac_cv_path_MKTEMP
9159if test -n "$MKTEMP"; then
9160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9161$as_echo "$MKTEMP" >&6; }
9162else
9163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9164$as_echo "no" >&6; }
9165fi
9166
9167
9168          if test "x$MKTEMP" = x; then
9169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9170          fi
9171        else
9172          # Otherwise we believe it is a complete path. Use it as it is.
9173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9174$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9176$as_echo_n "checking for MKTEMP... " >&6; }
9177          if test ! -x "$tool_specified"; then
9178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9179$as_echo "not found" >&6; }
9180            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9181          fi
9182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9183$as_echo "$tool_specified" >&6; }
9184        fi
9185      fi
9186    fi
9187
9188  fi
9189
9190
9191
9192  if test "x$MKTEMP" = x; then
9193    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9194  fi
9195
9196
9197
9198
9199
9200  # Publish this variable in the help.
9201
9202
9203  if [ -z "${MV+x}" ]; then
9204    # The variable is not set by user, try to locate tool using the code snippet
9205    for ac_prog in mv
9206do
9207  # Extract the first word of "$ac_prog", so it can be a program name with args.
9208set dummy $ac_prog; ac_word=$2
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9210$as_echo_n "checking for $ac_word... " >&6; }
9211if ${ac_cv_path_MV+:} false; then :
9212  $as_echo_n "(cached) " >&6
9213else
9214  case $MV in
9215  [\\/]* | ?:[\\/]*)
9216  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9217  ;;
9218  *)
9219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9220for as_dir in $PATH
9221do
9222  IFS=$as_save_IFS
9223  test -z "$as_dir" && as_dir=.
9224    for ac_exec_ext in '' $ac_executable_extensions; do
9225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9226    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9228    break 2
9229  fi
9230done
9231  done
9232IFS=$as_save_IFS
9233
9234  ;;
9235esac
9236fi
9237MV=$ac_cv_path_MV
9238if test -n "$MV"; then
9239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9240$as_echo "$MV" >&6; }
9241else
9242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9243$as_echo "no" >&6; }
9244fi
9245
9246
9247  test -n "$MV" && break
9248done
9249
9250  else
9251    # The variable is set, but is it from the command line or the environment?
9252
9253    # Try to remove the string !MV! from our list.
9254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9256      # If it failed, the variable was not from the command line. Ignore it,
9257      # but warn the user (except for BASH, which is always set by the calling BASH).
9258      if test "xMV" != xBASH; then
9259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9260$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9261      fi
9262      # Try to locate tool using the code snippet
9263      for ac_prog in mv
9264do
9265  # Extract the first word of "$ac_prog", so it can be a program name with args.
9266set dummy $ac_prog; ac_word=$2
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9268$as_echo_n "checking for $ac_word... " >&6; }
9269if ${ac_cv_path_MV+:} false; then :
9270  $as_echo_n "(cached) " >&6
9271else
9272  case $MV in
9273  [\\/]* | ?:[\\/]*)
9274  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9275  ;;
9276  *)
9277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9278for as_dir in $PATH
9279do
9280  IFS=$as_save_IFS
9281  test -z "$as_dir" && as_dir=.
9282    for ac_exec_ext in '' $ac_executable_extensions; do
9283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9284    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9286    break 2
9287  fi
9288done
9289  done
9290IFS=$as_save_IFS
9291
9292  ;;
9293esac
9294fi
9295MV=$ac_cv_path_MV
9296if test -n "$MV"; then
9297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9298$as_echo "$MV" >&6; }
9299else
9300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
9302fi
9303
9304
9305  test -n "$MV" && break
9306done
9307
9308    else
9309      # If it succeeded, then it was overridden by the user. We will use it
9310      # for the tool.
9311
9312      # First remove it from the list of overridden variables, so we can test
9313      # for unknown variables in the end.
9314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9315
9316      # Check if we try to supply an empty value
9317      if test "x$MV" = x; then
9318        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9319$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9320        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9321$as_echo_n "checking for MV... " >&6; }
9322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9323$as_echo "disabled" >&6; }
9324      else
9325        # Check if the provided tool contains a complete path.
9326        tool_specified="$MV"
9327        tool_basename="${tool_specified##*/}"
9328        if test "x$tool_basename" = "x$tool_specified"; then
9329          # A command without a complete path is provided, search $PATH.
9330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9331$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9332          # Extract the first word of "$tool_basename", so it can be a program name with args.
9333set dummy $tool_basename; ac_word=$2
9334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9335$as_echo_n "checking for $ac_word... " >&6; }
9336if ${ac_cv_path_MV+:} false; then :
9337  $as_echo_n "(cached) " >&6
9338else
9339  case $MV in
9340  [\\/]* | ?:[\\/]*)
9341  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9342  ;;
9343  *)
9344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9345for as_dir in $PATH
9346do
9347  IFS=$as_save_IFS
9348  test -z "$as_dir" && as_dir=.
9349    for ac_exec_ext in '' $ac_executable_extensions; do
9350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9351    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9353    break 2
9354  fi
9355done
9356  done
9357IFS=$as_save_IFS
9358
9359  ;;
9360esac
9361fi
9362MV=$ac_cv_path_MV
9363if test -n "$MV"; then
9364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9365$as_echo "$MV" >&6; }
9366else
9367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9368$as_echo "no" >&6; }
9369fi
9370
9371
9372          if test "x$MV" = x; then
9373            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9374          fi
9375        else
9376          # Otherwise we believe it is a complete path. Use it as it is.
9377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9378$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9379          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9380$as_echo_n "checking for MV... " >&6; }
9381          if test ! -x "$tool_specified"; then
9382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9383$as_echo "not found" >&6; }
9384            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9385          fi
9386          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9387$as_echo "$tool_specified" >&6; }
9388        fi
9389      fi
9390    fi
9391
9392  fi
9393
9394
9395
9396  if test "x$MV" = x; then
9397    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9398  fi
9399
9400
9401
9402
9403
9404  # Publish this variable in the help.
9405
9406
9407  if [ -z "${NAWK+x}" ]; then
9408    # The variable is not set by user, try to locate tool using the code snippet
9409    for ac_prog in nawk gawk awk
9410do
9411  # Extract the first word of "$ac_prog", so it can be a program name with args.
9412set dummy $ac_prog; ac_word=$2
9413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9414$as_echo_n "checking for $ac_word... " >&6; }
9415if ${ac_cv_path_NAWK+:} false; then :
9416  $as_echo_n "(cached) " >&6
9417else
9418  case $NAWK in
9419  [\\/]* | ?:[\\/]*)
9420  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9421  ;;
9422  *)
9423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9424for as_dir in $PATH
9425do
9426  IFS=$as_save_IFS
9427  test -z "$as_dir" && as_dir=.
9428    for ac_exec_ext in '' $ac_executable_extensions; do
9429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9430    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9432    break 2
9433  fi
9434done
9435  done
9436IFS=$as_save_IFS
9437
9438  ;;
9439esac
9440fi
9441NAWK=$ac_cv_path_NAWK
9442if test -n "$NAWK"; then
9443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9444$as_echo "$NAWK" >&6; }
9445else
9446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9447$as_echo "no" >&6; }
9448fi
9449
9450
9451  test -n "$NAWK" && break
9452done
9453
9454  else
9455    # The variable is set, but is it from the command line or the environment?
9456
9457    # Try to remove the string !NAWK! from our list.
9458    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9459    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9460      # If it failed, the variable was not from the command line. Ignore it,
9461      # but warn the user (except for BASH, which is always set by the calling BASH).
9462      if test "xNAWK" != xBASH; then
9463        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9464$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9465      fi
9466      # Try to locate tool using the code snippet
9467      for ac_prog in nawk gawk awk
9468do
9469  # Extract the first word of "$ac_prog", so it can be a program name with args.
9470set dummy $ac_prog; ac_word=$2
9471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9472$as_echo_n "checking for $ac_word... " >&6; }
9473if ${ac_cv_path_NAWK+:} false; then :
9474  $as_echo_n "(cached) " >&6
9475else
9476  case $NAWK in
9477  [\\/]* | ?:[\\/]*)
9478  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9479  ;;
9480  *)
9481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9482for as_dir in $PATH
9483do
9484  IFS=$as_save_IFS
9485  test -z "$as_dir" && as_dir=.
9486    for ac_exec_ext in '' $ac_executable_extensions; do
9487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9488    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9490    break 2
9491  fi
9492done
9493  done
9494IFS=$as_save_IFS
9495
9496  ;;
9497esac
9498fi
9499NAWK=$ac_cv_path_NAWK
9500if test -n "$NAWK"; then
9501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9502$as_echo "$NAWK" >&6; }
9503else
9504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9505$as_echo "no" >&6; }
9506fi
9507
9508
9509  test -n "$NAWK" && break
9510done
9511
9512    else
9513      # If it succeeded, then it was overridden by the user. We will use it
9514      # for the tool.
9515
9516      # First remove it from the list of overridden variables, so we can test
9517      # for unknown variables in the end.
9518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9519
9520      # Check if we try to supply an empty value
9521      if test "x$NAWK" = x; then
9522        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9523$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9524        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9525$as_echo_n "checking for NAWK... " >&6; }
9526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9527$as_echo "disabled" >&6; }
9528      else
9529        # Check if the provided tool contains a complete path.
9530        tool_specified="$NAWK"
9531        tool_basename="${tool_specified##*/}"
9532        if test "x$tool_basename" = "x$tool_specified"; then
9533          # A command without a complete path is provided, search $PATH.
9534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9535$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9536          # Extract the first word of "$tool_basename", so it can be a program name with args.
9537set dummy $tool_basename; ac_word=$2
9538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9539$as_echo_n "checking for $ac_word... " >&6; }
9540if ${ac_cv_path_NAWK+:} false; then :
9541  $as_echo_n "(cached) " >&6
9542else
9543  case $NAWK in
9544  [\\/]* | ?:[\\/]*)
9545  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9546  ;;
9547  *)
9548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9549for as_dir in $PATH
9550do
9551  IFS=$as_save_IFS
9552  test -z "$as_dir" && as_dir=.
9553    for ac_exec_ext in '' $ac_executable_extensions; do
9554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9555    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9557    break 2
9558  fi
9559done
9560  done
9561IFS=$as_save_IFS
9562
9563  ;;
9564esac
9565fi
9566NAWK=$ac_cv_path_NAWK
9567if test -n "$NAWK"; then
9568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9569$as_echo "$NAWK" >&6; }
9570else
9571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9572$as_echo "no" >&6; }
9573fi
9574
9575
9576          if test "x$NAWK" = x; then
9577            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9578          fi
9579        else
9580          # Otherwise we believe it is a complete path. Use it as it is.
9581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9582$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9583          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9584$as_echo_n "checking for NAWK... " >&6; }
9585          if test ! -x "$tool_specified"; then
9586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9587$as_echo "not found" >&6; }
9588            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9589          fi
9590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9591$as_echo "$tool_specified" >&6; }
9592        fi
9593      fi
9594    fi
9595
9596  fi
9597
9598
9599
9600  if test "x$NAWK" = x; then
9601    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9602  fi
9603
9604
9605
9606
9607
9608  # Publish this variable in the help.
9609
9610
9611  if [ -z "${PRINTF+x}" ]; then
9612    # The variable is not set by user, try to locate tool using the code snippet
9613    for ac_prog in printf
9614do
9615  # Extract the first word of "$ac_prog", so it can be a program name with args.
9616set dummy $ac_prog; ac_word=$2
9617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9618$as_echo_n "checking for $ac_word... " >&6; }
9619if ${ac_cv_path_PRINTF+:} false; then :
9620  $as_echo_n "(cached) " >&6
9621else
9622  case $PRINTF in
9623  [\\/]* | ?:[\\/]*)
9624  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9625  ;;
9626  *)
9627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9628for as_dir in $PATH
9629do
9630  IFS=$as_save_IFS
9631  test -z "$as_dir" && as_dir=.
9632    for ac_exec_ext in '' $ac_executable_extensions; do
9633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9634    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9636    break 2
9637  fi
9638done
9639  done
9640IFS=$as_save_IFS
9641
9642  ;;
9643esac
9644fi
9645PRINTF=$ac_cv_path_PRINTF
9646if test -n "$PRINTF"; then
9647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9648$as_echo "$PRINTF" >&6; }
9649else
9650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9651$as_echo "no" >&6; }
9652fi
9653
9654
9655  test -n "$PRINTF" && break
9656done
9657
9658  else
9659    # The variable is set, but is it from the command line or the environment?
9660
9661    # Try to remove the string !PRINTF! from our list.
9662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9664      # If it failed, the variable was not from the command line. Ignore it,
9665      # but warn the user (except for BASH, which is always set by the calling BASH).
9666      if test "xPRINTF" != xBASH; then
9667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9668$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9669      fi
9670      # Try to locate tool using the code snippet
9671      for ac_prog in printf
9672do
9673  # Extract the first word of "$ac_prog", so it can be a program name with args.
9674set dummy $ac_prog; ac_word=$2
9675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9676$as_echo_n "checking for $ac_word... " >&6; }
9677if ${ac_cv_path_PRINTF+:} false; then :
9678  $as_echo_n "(cached) " >&6
9679else
9680  case $PRINTF in
9681  [\\/]* | ?:[\\/]*)
9682  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9683  ;;
9684  *)
9685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9686for as_dir in $PATH
9687do
9688  IFS=$as_save_IFS
9689  test -z "$as_dir" && as_dir=.
9690    for ac_exec_ext in '' $ac_executable_extensions; do
9691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9692    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9694    break 2
9695  fi
9696done
9697  done
9698IFS=$as_save_IFS
9699
9700  ;;
9701esac
9702fi
9703PRINTF=$ac_cv_path_PRINTF
9704if test -n "$PRINTF"; then
9705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9706$as_echo "$PRINTF" >&6; }
9707else
9708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9709$as_echo "no" >&6; }
9710fi
9711
9712
9713  test -n "$PRINTF" && break
9714done
9715
9716    else
9717      # If it succeeded, then it was overridden by the user. We will use it
9718      # for the tool.
9719
9720      # First remove it from the list of overridden variables, so we can test
9721      # for unknown variables in the end.
9722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9723
9724      # Check if we try to supply an empty value
9725      if test "x$PRINTF" = x; then
9726        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9727$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9729$as_echo_n "checking for PRINTF... " >&6; }
9730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9731$as_echo "disabled" >&6; }
9732      else
9733        # Check if the provided tool contains a complete path.
9734        tool_specified="$PRINTF"
9735        tool_basename="${tool_specified##*/}"
9736        if test "x$tool_basename" = "x$tool_specified"; then
9737          # A command without a complete path is provided, search $PATH.
9738          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9739$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9740          # Extract the first word of "$tool_basename", so it can be a program name with args.
9741set dummy $tool_basename; ac_word=$2
9742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9743$as_echo_n "checking for $ac_word... " >&6; }
9744if ${ac_cv_path_PRINTF+:} false; then :
9745  $as_echo_n "(cached) " >&6
9746else
9747  case $PRINTF in
9748  [\\/]* | ?:[\\/]*)
9749  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9750  ;;
9751  *)
9752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9753for as_dir in $PATH
9754do
9755  IFS=$as_save_IFS
9756  test -z "$as_dir" && as_dir=.
9757    for ac_exec_ext in '' $ac_executable_extensions; do
9758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9759    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9761    break 2
9762  fi
9763done
9764  done
9765IFS=$as_save_IFS
9766
9767  ;;
9768esac
9769fi
9770PRINTF=$ac_cv_path_PRINTF
9771if test -n "$PRINTF"; then
9772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9773$as_echo "$PRINTF" >&6; }
9774else
9775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9776$as_echo "no" >&6; }
9777fi
9778
9779
9780          if test "x$PRINTF" = x; then
9781            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9782          fi
9783        else
9784          # Otherwise we believe it is a complete path. Use it as it is.
9785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9786$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9787          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9788$as_echo_n "checking for PRINTF... " >&6; }
9789          if test ! -x "$tool_specified"; then
9790            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9791$as_echo "not found" >&6; }
9792            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9793          fi
9794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9795$as_echo "$tool_specified" >&6; }
9796        fi
9797      fi
9798    fi
9799
9800  fi
9801
9802
9803
9804  if test "x$PRINTF" = x; then
9805    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9806  fi
9807
9808
9809
9810
9811
9812  # Publish this variable in the help.
9813
9814
9815  if [ -z "${RM+x}" ]; then
9816    # The variable is not set by user, try to locate tool using the code snippet
9817    for ac_prog in rm
9818do
9819  # Extract the first word of "$ac_prog", so it can be a program name with args.
9820set dummy $ac_prog; ac_word=$2
9821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9822$as_echo_n "checking for $ac_word... " >&6; }
9823if ${ac_cv_path_RM+:} false; then :
9824  $as_echo_n "(cached) " >&6
9825else
9826  case $RM in
9827  [\\/]* | ?:[\\/]*)
9828  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9829  ;;
9830  *)
9831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9832for as_dir in $PATH
9833do
9834  IFS=$as_save_IFS
9835  test -z "$as_dir" && as_dir=.
9836    for ac_exec_ext in '' $ac_executable_extensions; do
9837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9838    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9840    break 2
9841  fi
9842done
9843  done
9844IFS=$as_save_IFS
9845
9846  ;;
9847esac
9848fi
9849RM=$ac_cv_path_RM
9850if test -n "$RM"; then
9851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9852$as_echo "$RM" >&6; }
9853else
9854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9855$as_echo "no" >&6; }
9856fi
9857
9858
9859  test -n "$RM" && break
9860done
9861
9862  else
9863    # The variable is set, but is it from the command line or the environment?
9864
9865    # Try to remove the string !RM! from our list.
9866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9868      # If it failed, the variable was not from the command line. Ignore it,
9869      # but warn the user (except for BASH, which is always set by the calling BASH).
9870      if test "xRM" != xBASH; then
9871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9872$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9873      fi
9874      # Try to locate tool using the code snippet
9875      for ac_prog in rm
9876do
9877  # Extract the first word of "$ac_prog", so it can be a program name with args.
9878set dummy $ac_prog; ac_word=$2
9879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9880$as_echo_n "checking for $ac_word... " >&6; }
9881if ${ac_cv_path_RM+:} false; then :
9882  $as_echo_n "(cached) " >&6
9883else
9884  case $RM in
9885  [\\/]* | ?:[\\/]*)
9886  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9887  ;;
9888  *)
9889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9890for as_dir in $PATH
9891do
9892  IFS=$as_save_IFS
9893  test -z "$as_dir" && as_dir=.
9894    for ac_exec_ext in '' $ac_executable_extensions; do
9895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9896    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9898    break 2
9899  fi
9900done
9901  done
9902IFS=$as_save_IFS
9903
9904  ;;
9905esac
9906fi
9907RM=$ac_cv_path_RM
9908if test -n "$RM"; then
9909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9910$as_echo "$RM" >&6; }
9911else
9912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9913$as_echo "no" >&6; }
9914fi
9915
9916
9917  test -n "$RM" && break
9918done
9919
9920    else
9921      # If it succeeded, then it was overridden by the user. We will use it
9922      # for the tool.
9923
9924      # First remove it from the list of overridden variables, so we can test
9925      # for unknown variables in the end.
9926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9927
9928      # Check if we try to supply an empty value
9929      if test "x$RM" = x; then
9930        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9931$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9933$as_echo_n "checking for RM... " >&6; }
9934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9935$as_echo "disabled" >&6; }
9936      else
9937        # Check if the provided tool contains a complete path.
9938        tool_specified="$RM"
9939        tool_basename="${tool_specified##*/}"
9940        if test "x$tool_basename" = "x$tool_specified"; then
9941          # A command without a complete path is provided, search $PATH.
9942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9943$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9944          # Extract the first word of "$tool_basename", so it can be a program name with args.
9945set dummy $tool_basename; ac_word=$2
9946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9947$as_echo_n "checking for $ac_word... " >&6; }
9948if ${ac_cv_path_RM+:} false; then :
9949  $as_echo_n "(cached) " >&6
9950else
9951  case $RM in
9952  [\\/]* | ?:[\\/]*)
9953  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9954  ;;
9955  *)
9956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9957for as_dir in $PATH
9958do
9959  IFS=$as_save_IFS
9960  test -z "$as_dir" && as_dir=.
9961    for ac_exec_ext in '' $ac_executable_extensions; do
9962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9963    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9965    break 2
9966  fi
9967done
9968  done
9969IFS=$as_save_IFS
9970
9971  ;;
9972esac
9973fi
9974RM=$ac_cv_path_RM
9975if test -n "$RM"; then
9976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9977$as_echo "$RM" >&6; }
9978else
9979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980$as_echo "no" >&6; }
9981fi
9982
9983
9984          if test "x$RM" = x; then
9985            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9986          fi
9987        else
9988          # Otherwise we believe it is a complete path. Use it as it is.
9989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9990$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9991          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9992$as_echo_n "checking for RM... " >&6; }
9993          if test ! -x "$tool_specified"; then
9994            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9995$as_echo "not found" >&6; }
9996            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9997          fi
9998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9999$as_echo "$tool_specified" >&6; }
10000        fi
10001      fi
10002    fi
10003
10004  fi
10005
10006
10007
10008  if test "x$RM" = x; then
10009    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10010  fi
10011
10012
10013
10014
10015
10016  # Publish this variable in the help.
10017
10018
10019  if [ -z "${RMDIR+x}" ]; then
10020    # The variable is not set by user, try to locate tool using the code snippet
10021    for ac_prog in rmdir
10022do
10023  # Extract the first word of "$ac_prog", so it can be a program name with args.
10024set dummy $ac_prog; ac_word=$2
10025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10026$as_echo_n "checking for $ac_word... " >&6; }
10027if ${ac_cv_path_RMDIR+:} false; then :
10028  $as_echo_n "(cached) " >&6
10029else
10030  case $RMDIR in
10031  [\\/]* | ?:[\\/]*)
10032  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10033  ;;
10034  *)
10035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10036for as_dir in $PATH
10037do
10038  IFS=$as_save_IFS
10039  test -z "$as_dir" && as_dir=.
10040    for ac_exec_ext in '' $ac_executable_extensions; do
10041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10042    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10044    break 2
10045  fi
10046done
10047  done
10048IFS=$as_save_IFS
10049
10050  ;;
10051esac
10052fi
10053RMDIR=$ac_cv_path_RMDIR
10054if test -n "$RMDIR"; then
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10056$as_echo "$RMDIR" >&6; }
10057else
10058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059$as_echo "no" >&6; }
10060fi
10061
10062
10063  test -n "$RMDIR" && break
10064done
10065
10066  else
10067    # The variable is set, but is it from the command line or the environment?
10068
10069    # Try to remove the string !RMDIR! from our list.
10070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10072      # If it failed, the variable was not from the command line. Ignore it,
10073      # but warn the user (except for BASH, which is always set by the calling BASH).
10074      if test "xRMDIR" != xBASH; then
10075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10076$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10077      fi
10078      # Try to locate tool using the code snippet
10079      for ac_prog in rmdir
10080do
10081  # Extract the first word of "$ac_prog", so it can be a program name with args.
10082set dummy $ac_prog; ac_word=$2
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10084$as_echo_n "checking for $ac_word... " >&6; }
10085if ${ac_cv_path_RMDIR+:} false; then :
10086  $as_echo_n "(cached) " >&6
10087else
10088  case $RMDIR in
10089  [\\/]* | ?:[\\/]*)
10090  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10091  ;;
10092  *)
10093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10094for as_dir in $PATH
10095do
10096  IFS=$as_save_IFS
10097  test -z "$as_dir" && as_dir=.
10098    for ac_exec_ext in '' $ac_executable_extensions; do
10099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10100    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10102    break 2
10103  fi
10104done
10105  done
10106IFS=$as_save_IFS
10107
10108  ;;
10109esac
10110fi
10111RMDIR=$ac_cv_path_RMDIR
10112if test -n "$RMDIR"; then
10113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10114$as_echo "$RMDIR" >&6; }
10115else
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
10118fi
10119
10120
10121  test -n "$RMDIR" && break
10122done
10123
10124    else
10125      # If it succeeded, then it was overridden by the user. We will use it
10126      # for the tool.
10127
10128      # First remove it from the list of overridden variables, so we can test
10129      # for unknown variables in the end.
10130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10131
10132      # Check if we try to supply an empty value
10133      if test "x$RMDIR" = x; then
10134        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10135$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10137$as_echo_n "checking for RMDIR... " >&6; }
10138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10139$as_echo "disabled" >&6; }
10140      else
10141        # Check if the provided tool contains a complete path.
10142        tool_specified="$RMDIR"
10143        tool_basename="${tool_specified##*/}"
10144        if test "x$tool_basename" = "x$tool_specified"; then
10145          # A command without a complete path is provided, search $PATH.
10146          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10147$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10148          # Extract the first word of "$tool_basename", so it can be a program name with args.
10149set dummy $tool_basename; ac_word=$2
10150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10151$as_echo_n "checking for $ac_word... " >&6; }
10152if ${ac_cv_path_RMDIR+:} false; then :
10153  $as_echo_n "(cached) " >&6
10154else
10155  case $RMDIR in
10156  [\\/]* | ?:[\\/]*)
10157  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10158  ;;
10159  *)
10160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10161for as_dir in $PATH
10162do
10163  IFS=$as_save_IFS
10164  test -z "$as_dir" && as_dir=.
10165    for ac_exec_ext in '' $ac_executable_extensions; do
10166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10167    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10169    break 2
10170  fi
10171done
10172  done
10173IFS=$as_save_IFS
10174
10175  ;;
10176esac
10177fi
10178RMDIR=$ac_cv_path_RMDIR
10179if test -n "$RMDIR"; then
10180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10181$as_echo "$RMDIR" >&6; }
10182else
10183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10184$as_echo "no" >&6; }
10185fi
10186
10187
10188          if test "x$RMDIR" = x; then
10189            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10190          fi
10191        else
10192          # Otherwise we believe it is a complete path. Use it as it is.
10193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10194$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10195          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10196$as_echo_n "checking for RMDIR... " >&6; }
10197          if test ! -x "$tool_specified"; then
10198            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10199$as_echo "not found" >&6; }
10200            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10201          fi
10202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10203$as_echo "$tool_specified" >&6; }
10204        fi
10205      fi
10206    fi
10207
10208  fi
10209
10210
10211
10212  if test "x$RMDIR" = x; then
10213    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10214  fi
10215
10216
10217
10218
10219
10220  # Publish this variable in the help.
10221
10222
10223  if [ -z "${SH+x}" ]; then
10224    # The variable is not set by user, try to locate tool using the code snippet
10225    for ac_prog in sh
10226do
10227  # Extract the first word of "$ac_prog", so it can be a program name with args.
10228set dummy $ac_prog; ac_word=$2
10229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10230$as_echo_n "checking for $ac_word... " >&6; }
10231if ${ac_cv_path_SH+:} false; then :
10232  $as_echo_n "(cached) " >&6
10233else
10234  case $SH in
10235  [\\/]* | ?:[\\/]*)
10236  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10237  ;;
10238  *)
10239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10240for as_dir in $PATH
10241do
10242  IFS=$as_save_IFS
10243  test -z "$as_dir" && as_dir=.
10244    for ac_exec_ext in '' $ac_executable_extensions; do
10245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10246    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10248    break 2
10249  fi
10250done
10251  done
10252IFS=$as_save_IFS
10253
10254  ;;
10255esac
10256fi
10257SH=$ac_cv_path_SH
10258if test -n "$SH"; then
10259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10260$as_echo "$SH" >&6; }
10261else
10262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10263$as_echo "no" >&6; }
10264fi
10265
10266
10267  test -n "$SH" && break
10268done
10269
10270  else
10271    # The variable is set, but is it from the command line or the environment?
10272
10273    # Try to remove the string !SH! from our list.
10274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10276      # If it failed, the variable was not from the command line. Ignore it,
10277      # but warn the user (except for BASH, which is always set by the calling BASH).
10278      if test "xSH" != xBASH; then
10279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10280$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10281      fi
10282      # Try to locate tool using the code snippet
10283      for ac_prog in sh
10284do
10285  # Extract the first word of "$ac_prog", so it can be a program name with args.
10286set dummy $ac_prog; ac_word=$2
10287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10288$as_echo_n "checking for $ac_word... " >&6; }
10289if ${ac_cv_path_SH+:} false; then :
10290  $as_echo_n "(cached) " >&6
10291else
10292  case $SH in
10293  [\\/]* | ?:[\\/]*)
10294  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10295  ;;
10296  *)
10297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10298for as_dir in $PATH
10299do
10300  IFS=$as_save_IFS
10301  test -z "$as_dir" && as_dir=.
10302    for ac_exec_ext in '' $ac_executable_extensions; do
10303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10304    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10306    break 2
10307  fi
10308done
10309  done
10310IFS=$as_save_IFS
10311
10312  ;;
10313esac
10314fi
10315SH=$ac_cv_path_SH
10316if test -n "$SH"; then
10317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10318$as_echo "$SH" >&6; }
10319else
10320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10321$as_echo "no" >&6; }
10322fi
10323
10324
10325  test -n "$SH" && break
10326done
10327
10328    else
10329      # If it succeeded, then it was overridden by the user. We will use it
10330      # for the tool.
10331
10332      # First remove it from the list of overridden variables, so we can test
10333      # for unknown variables in the end.
10334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10335
10336      # Check if we try to supply an empty value
10337      if test "x$SH" = x; then
10338        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10339$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10341$as_echo_n "checking for SH... " >&6; }
10342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10343$as_echo "disabled" >&6; }
10344      else
10345        # Check if the provided tool contains a complete path.
10346        tool_specified="$SH"
10347        tool_basename="${tool_specified##*/}"
10348        if test "x$tool_basename" = "x$tool_specified"; then
10349          # A command without a complete path is provided, search $PATH.
10350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10351$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10352          # Extract the first word of "$tool_basename", so it can be a program name with args.
10353set dummy $tool_basename; ac_word=$2
10354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10355$as_echo_n "checking for $ac_word... " >&6; }
10356if ${ac_cv_path_SH+:} false; then :
10357  $as_echo_n "(cached) " >&6
10358else
10359  case $SH in
10360  [\\/]* | ?:[\\/]*)
10361  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10362  ;;
10363  *)
10364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10365for as_dir in $PATH
10366do
10367  IFS=$as_save_IFS
10368  test -z "$as_dir" && as_dir=.
10369    for ac_exec_ext in '' $ac_executable_extensions; do
10370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10371    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10373    break 2
10374  fi
10375done
10376  done
10377IFS=$as_save_IFS
10378
10379  ;;
10380esac
10381fi
10382SH=$ac_cv_path_SH
10383if test -n "$SH"; then
10384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10385$as_echo "$SH" >&6; }
10386else
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10388$as_echo "no" >&6; }
10389fi
10390
10391
10392          if test "x$SH" = x; then
10393            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10394          fi
10395        else
10396          # Otherwise we believe it is a complete path. Use it as it is.
10397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10398$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10399          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10400$as_echo_n "checking for SH... " >&6; }
10401          if test ! -x "$tool_specified"; then
10402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10403$as_echo "not found" >&6; }
10404            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10405          fi
10406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10407$as_echo "$tool_specified" >&6; }
10408        fi
10409      fi
10410    fi
10411
10412  fi
10413
10414
10415
10416  if test "x$SH" = x; then
10417    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10418  fi
10419
10420
10421
10422
10423
10424  # Publish this variable in the help.
10425
10426
10427  if [ -z "${SORT+x}" ]; then
10428    # The variable is not set by user, try to locate tool using the code snippet
10429    for ac_prog in sort
10430do
10431  # Extract the first word of "$ac_prog", so it can be a program name with args.
10432set dummy $ac_prog; ac_word=$2
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434$as_echo_n "checking for $ac_word... " >&6; }
10435if ${ac_cv_path_SORT+:} false; then :
10436  $as_echo_n "(cached) " >&6
10437else
10438  case $SORT in
10439  [\\/]* | ?:[\\/]*)
10440  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10441  ;;
10442  *)
10443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444for as_dir in $PATH
10445do
10446  IFS=$as_save_IFS
10447  test -z "$as_dir" && as_dir=.
10448    for ac_exec_ext in '' $ac_executable_extensions; do
10449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10450    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452    break 2
10453  fi
10454done
10455  done
10456IFS=$as_save_IFS
10457
10458  ;;
10459esac
10460fi
10461SORT=$ac_cv_path_SORT
10462if test -n "$SORT"; then
10463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10464$as_echo "$SORT" >&6; }
10465else
10466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
10468fi
10469
10470
10471  test -n "$SORT" && break
10472done
10473
10474  else
10475    # The variable is set, but is it from the command line or the environment?
10476
10477    # Try to remove the string !SORT! from our list.
10478    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10479    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10480      # If it failed, the variable was not from the command line. Ignore it,
10481      # but warn the user (except for BASH, which is always set by the calling BASH).
10482      if test "xSORT" != xBASH; then
10483        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10484$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10485      fi
10486      # Try to locate tool using the code snippet
10487      for ac_prog in sort
10488do
10489  # Extract the first word of "$ac_prog", so it can be a program name with args.
10490set dummy $ac_prog; ac_word=$2
10491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10492$as_echo_n "checking for $ac_word... " >&6; }
10493if ${ac_cv_path_SORT+:} false; then :
10494  $as_echo_n "(cached) " >&6
10495else
10496  case $SORT in
10497  [\\/]* | ?:[\\/]*)
10498  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10499  ;;
10500  *)
10501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502for as_dir in $PATH
10503do
10504  IFS=$as_save_IFS
10505  test -z "$as_dir" && as_dir=.
10506    for ac_exec_ext in '' $ac_executable_extensions; do
10507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10508    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510    break 2
10511  fi
10512done
10513  done
10514IFS=$as_save_IFS
10515
10516  ;;
10517esac
10518fi
10519SORT=$ac_cv_path_SORT
10520if test -n "$SORT"; then
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10522$as_echo "$SORT" >&6; }
10523else
10524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
10526fi
10527
10528
10529  test -n "$SORT" && break
10530done
10531
10532    else
10533      # If it succeeded, then it was overridden by the user. We will use it
10534      # for the tool.
10535
10536      # First remove it from the list of overridden variables, so we can test
10537      # for unknown variables in the end.
10538      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10539
10540      # Check if we try to supply an empty value
10541      if test "x$SORT" = x; then
10542        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10543$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10544        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10545$as_echo_n "checking for SORT... " >&6; }
10546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10547$as_echo "disabled" >&6; }
10548      else
10549        # Check if the provided tool contains a complete path.
10550        tool_specified="$SORT"
10551        tool_basename="${tool_specified##*/}"
10552        if test "x$tool_basename" = "x$tool_specified"; then
10553          # A command without a complete path is provided, search $PATH.
10554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10555$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10556          # Extract the first word of "$tool_basename", so it can be a program name with args.
10557set dummy $tool_basename; ac_word=$2
10558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10559$as_echo_n "checking for $ac_word... " >&6; }
10560if ${ac_cv_path_SORT+:} false; then :
10561  $as_echo_n "(cached) " >&6
10562else
10563  case $SORT in
10564  [\\/]* | ?:[\\/]*)
10565  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10566  ;;
10567  *)
10568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10569for as_dir in $PATH
10570do
10571  IFS=$as_save_IFS
10572  test -z "$as_dir" && as_dir=.
10573    for ac_exec_ext in '' $ac_executable_extensions; do
10574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10575    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10577    break 2
10578  fi
10579done
10580  done
10581IFS=$as_save_IFS
10582
10583  ;;
10584esac
10585fi
10586SORT=$ac_cv_path_SORT
10587if test -n "$SORT"; then
10588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10589$as_echo "$SORT" >&6; }
10590else
10591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592$as_echo "no" >&6; }
10593fi
10594
10595
10596          if test "x$SORT" = x; then
10597            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10598          fi
10599        else
10600          # Otherwise we believe it is a complete path. Use it as it is.
10601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10602$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10603          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10604$as_echo_n "checking for SORT... " >&6; }
10605          if test ! -x "$tool_specified"; then
10606            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10607$as_echo "not found" >&6; }
10608            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10609          fi
10610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10611$as_echo "$tool_specified" >&6; }
10612        fi
10613      fi
10614    fi
10615
10616  fi
10617
10618
10619
10620  if test "x$SORT" = x; then
10621    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10622  fi
10623
10624
10625
10626
10627
10628  # Publish this variable in the help.
10629
10630
10631  if [ -z "${TAIL+x}" ]; then
10632    # The variable is not set by user, try to locate tool using the code snippet
10633    for ac_prog in tail
10634do
10635  # Extract the first word of "$ac_prog", so it can be a program name with args.
10636set dummy $ac_prog; ac_word=$2
10637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10638$as_echo_n "checking for $ac_word... " >&6; }
10639if ${ac_cv_path_TAIL+:} false; then :
10640  $as_echo_n "(cached) " >&6
10641else
10642  case $TAIL in
10643  [\\/]* | ?:[\\/]*)
10644  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10645  ;;
10646  *)
10647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10648for as_dir in $PATH
10649do
10650  IFS=$as_save_IFS
10651  test -z "$as_dir" && as_dir=.
10652    for ac_exec_ext in '' $ac_executable_extensions; do
10653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10654    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10656    break 2
10657  fi
10658done
10659  done
10660IFS=$as_save_IFS
10661
10662  ;;
10663esac
10664fi
10665TAIL=$ac_cv_path_TAIL
10666if test -n "$TAIL"; then
10667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10668$as_echo "$TAIL" >&6; }
10669else
10670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671$as_echo "no" >&6; }
10672fi
10673
10674
10675  test -n "$TAIL" && break
10676done
10677
10678  else
10679    # The variable is set, but is it from the command line or the environment?
10680
10681    # Try to remove the string !TAIL! from our list.
10682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10684      # If it failed, the variable was not from the command line. Ignore it,
10685      # but warn the user (except for BASH, which is always set by the calling BASH).
10686      if test "xTAIL" != xBASH; then
10687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10688$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10689      fi
10690      # Try to locate tool using the code snippet
10691      for ac_prog in tail
10692do
10693  # Extract the first word of "$ac_prog", so it can be a program name with args.
10694set dummy $ac_prog; ac_word=$2
10695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10696$as_echo_n "checking for $ac_word... " >&6; }
10697if ${ac_cv_path_TAIL+:} false; then :
10698  $as_echo_n "(cached) " >&6
10699else
10700  case $TAIL in
10701  [\\/]* | ?:[\\/]*)
10702  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10703  ;;
10704  *)
10705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10706for as_dir in $PATH
10707do
10708  IFS=$as_save_IFS
10709  test -z "$as_dir" && as_dir=.
10710    for ac_exec_ext in '' $ac_executable_extensions; do
10711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10712    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10714    break 2
10715  fi
10716done
10717  done
10718IFS=$as_save_IFS
10719
10720  ;;
10721esac
10722fi
10723TAIL=$ac_cv_path_TAIL
10724if test -n "$TAIL"; then
10725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10726$as_echo "$TAIL" >&6; }
10727else
10728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10729$as_echo "no" >&6; }
10730fi
10731
10732
10733  test -n "$TAIL" && break
10734done
10735
10736    else
10737      # If it succeeded, then it was overridden by the user. We will use it
10738      # for the tool.
10739
10740      # First remove it from the list of overridden variables, so we can test
10741      # for unknown variables in the end.
10742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10743
10744      # Check if we try to supply an empty value
10745      if test "x$TAIL" = x; then
10746        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10747$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10749$as_echo_n "checking for TAIL... " >&6; }
10750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10751$as_echo "disabled" >&6; }
10752      else
10753        # Check if the provided tool contains a complete path.
10754        tool_specified="$TAIL"
10755        tool_basename="${tool_specified##*/}"
10756        if test "x$tool_basename" = "x$tool_specified"; then
10757          # A command without a complete path is provided, search $PATH.
10758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10759$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10760          # Extract the first word of "$tool_basename", so it can be a program name with args.
10761set dummy $tool_basename; ac_word=$2
10762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10763$as_echo_n "checking for $ac_word... " >&6; }
10764if ${ac_cv_path_TAIL+:} false; then :
10765  $as_echo_n "(cached) " >&6
10766else
10767  case $TAIL in
10768  [\\/]* | ?:[\\/]*)
10769  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10770  ;;
10771  *)
10772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10773for as_dir in $PATH
10774do
10775  IFS=$as_save_IFS
10776  test -z "$as_dir" && as_dir=.
10777    for ac_exec_ext in '' $ac_executable_extensions; do
10778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10779    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10781    break 2
10782  fi
10783done
10784  done
10785IFS=$as_save_IFS
10786
10787  ;;
10788esac
10789fi
10790TAIL=$ac_cv_path_TAIL
10791if test -n "$TAIL"; then
10792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10793$as_echo "$TAIL" >&6; }
10794else
10795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10796$as_echo "no" >&6; }
10797fi
10798
10799
10800          if test "x$TAIL" = x; then
10801            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10802          fi
10803        else
10804          # Otherwise we believe it is a complete path. Use it as it is.
10805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10806$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10807          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10808$as_echo_n "checking for TAIL... " >&6; }
10809          if test ! -x "$tool_specified"; then
10810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10811$as_echo "not found" >&6; }
10812            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10813          fi
10814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10815$as_echo "$tool_specified" >&6; }
10816        fi
10817      fi
10818    fi
10819
10820  fi
10821
10822
10823
10824  if test "x$TAIL" = x; then
10825    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10826  fi
10827
10828
10829
10830
10831
10832  # Publish this variable in the help.
10833
10834
10835  if [ -z "${TAR+x}" ]; then
10836    # The variable is not set by user, try to locate tool using the code snippet
10837    for ac_prog in tar
10838do
10839  # Extract the first word of "$ac_prog", so it can be a program name with args.
10840set dummy $ac_prog; ac_word=$2
10841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10842$as_echo_n "checking for $ac_word... " >&6; }
10843if ${ac_cv_path_TAR+:} false; then :
10844  $as_echo_n "(cached) " >&6
10845else
10846  case $TAR in
10847  [\\/]* | ?:[\\/]*)
10848  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10849  ;;
10850  *)
10851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10852for as_dir in $PATH
10853do
10854  IFS=$as_save_IFS
10855  test -z "$as_dir" && as_dir=.
10856    for ac_exec_ext in '' $ac_executable_extensions; do
10857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10858    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10860    break 2
10861  fi
10862done
10863  done
10864IFS=$as_save_IFS
10865
10866  ;;
10867esac
10868fi
10869TAR=$ac_cv_path_TAR
10870if test -n "$TAR"; then
10871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10872$as_echo "$TAR" >&6; }
10873else
10874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10875$as_echo "no" >&6; }
10876fi
10877
10878
10879  test -n "$TAR" && break
10880done
10881
10882  else
10883    # The variable is set, but is it from the command line or the environment?
10884
10885    # Try to remove the string !TAR! from our list.
10886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10888      # If it failed, the variable was not from the command line. Ignore it,
10889      # but warn the user (except for BASH, which is always set by the calling BASH).
10890      if test "xTAR" != xBASH; then
10891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10892$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10893      fi
10894      # Try to locate tool using the code snippet
10895      for ac_prog in tar
10896do
10897  # Extract the first word of "$ac_prog", so it can be a program name with args.
10898set dummy $ac_prog; ac_word=$2
10899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10900$as_echo_n "checking for $ac_word... " >&6; }
10901if ${ac_cv_path_TAR+:} false; then :
10902  $as_echo_n "(cached) " >&6
10903else
10904  case $TAR in
10905  [\\/]* | ?:[\\/]*)
10906  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10907  ;;
10908  *)
10909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10910for as_dir in $PATH
10911do
10912  IFS=$as_save_IFS
10913  test -z "$as_dir" && as_dir=.
10914    for ac_exec_ext in '' $ac_executable_extensions; do
10915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10916    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10918    break 2
10919  fi
10920done
10921  done
10922IFS=$as_save_IFS
10923
10924  ;;
10925esac
10926fi
10927TAR=$ac_cv_path_TAR
10928if test -n "$TAR"; then
10929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10930$as_echo "$TAR" >&6; }
10931else
10932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10933$as_echo "no" >&6; }
10934fi
10935
10936
10937  test -n "$TAR" && break
10938done
10939
10940    else
10941      # If it succeeded, then it was overridden by the user. We will use it
10942      # for the tool.
10943
10944      # First remove it from the list of overridden variables, so we can test
10945      # for unknown variables in the end.
10946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10947
10948      # Check if we try to supply an empty value
10949      if test "x$TAR" = x; then
10950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10951$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10953$as_echo_n "checking for TAR... " >&6; }
10954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10955$as_echo "disabled" >&6; }
10956      else
10957        # Check if the provided tool contains a complete path.
10958        tool_specified="$TAR"
10959        tool_basename="${tool_specified##*/}"
10960        if test "x$tool_basename" = "x$tool_specified"; then
10961          # A command without a complete path is provided, search $PATH.
10962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10963$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10964          # Extract the first word of "$tool_basename", so it can be a program name with args.
10965set dummy $tool_basename; ac_word=$2
10966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10967$as_echo_n "checking for $ac_word... " >&6; }
10968if ${ac_cv_path_TAR+:} false; then :
10969  $as_echo_n "(cached) " >&6
10970else
10971  case $TAR in
10972  [\\/]* | ?:[\\/]*)
10973  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10974  ;;
10975  *)
10976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10977for as_dir in $PATH
10978do
10979  IFS=$as_save_IFS
10980  test -z "$as_dir" && as_dir=.
10981    for ac_exec_ext in '' $ac_executable_extensions; do
10982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10983    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10985    break 2
10986  fi
10987done
10988  done
10989IFS=$as_save_IFS
10990
10991  ;;
10992esac
10993fi
10994TAR=$ac_cv_path_TAR
10995if test -n "$TAR"; then
10996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10997$as_echo "$TAR" >&6; }
10998else
10999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11000$as_echo "no" >&6; }
11001fi
11002
11003
11004          if test "x$TAR" = x; then
11005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11006          fi
11007        else
11008          # Otherwise we believe it is a complete path. Use it as it is.
11009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11010$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11012$as_echo_n "checking for TAR... " >&6; }
11013          if test ! -x "$tool_specified"; then
11014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11015$as_echo "not found" >&6; }
11016            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11017          fi
11018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11019$as_echo "$tool_specified" >&6; }
11020        fi
11021      fi
11022    fi
11023
11024  fi
11025
11026
11027
11028  if test "x$TAR" = x; then
11029    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11030  fi
11031
11032
11033
11034
11035
11036  # Publish this variable in the help.
11037
11038
11039  if [ -z "${TEE+x}" ]; then
11040    # The variable is not set by user, try to locate tool using the code snippet
11041    for ac_prog in tee
11042do
11043  # Extract the first word of "$ac_prog", so it can be a program name with args.
11044set dummy $ac_prog; ac_word=$2
11045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11046$as_echo_n "checking for $ac_word... " >&6; }
11047if ${ac_cv_path_TEE+:} false; then :
11048  $as_echo_n "(cached) " >&6
11049else
11050  case $TEE in
11051  [\\/]* | ?:[\\/]*)
11052  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11053  ;;
11054  *)
11055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11056for as_dir in $PATH
11057do
11058  IFS=$as_save_IFS
11059  test -z "$as_dir" && as_dir=.
11060    for ac_exec_ext in '' $ac_executable_extensions; do
11061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11062    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11064    break 2
11065  fi
11066done
11067  done
11068IFS=$as_save_IFS
11069
11070  ;;
11071esac
11072fi
11073TEE=$ac_cv_path_TEE
11074if test -n "$TEE"; then
11075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11076$as_echo "$TEE" >&6; }
11077else
11078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11079$as_echo "no" >&6; }
11080fi
11081
11082
11083  test -n "$TEE" && break
11084done
11085
11086  else
11087    # The variable is set, but is it from the command line or the environment?
11088
11089    # Try to remove the string !TEE! from our list.
11090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11092      # If it failed, the variable was not from the command line. Ignore it,
11093      # but warn the user (except for BASH, which is always set by the calling BASH).
11094      if test "xTEE" != xBASH; then
11095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11096$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11097      fi
11098      # Try to locate tool using the code snippet
11099      for ac_prog in tee
11100do
11101  # Extract the first word of "$ac_prog", so it can be a program name with args.
11102set dummy $ac_prog; ac_word=$2
11103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11104$as_echo_n "checking for $ac_word... " >&6; }
11105if ${ac_cv_path_TEE+:} false; then :
11106  $as_echo_n "(cached) " >&6
11107else
11108  case $TEE in
11109  [\\/]* | ?:[\\/]*)
11110  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11111  ;;
11112  *)
11113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11114for as_dir in $PATH
11115do
11116  IFS=$as_save_IFS
11117  test -z "$as_dir" && as_dir=.
11118    for ac_exec_ext in '' $ac_executable_extensions; do
11119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11120    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11122    break 2
11123  fi
11124done
11125  done
11126IFS=$as_save_IFS
11127
11128  ;;
11129esac
11130fi
11131TEE=$ac_cv_path_TEE
11132if test -n "$TEE"; then
11133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11134$as_echo "$TEE" >&6; }
11135else
11136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11137$as_echo "no" >&6; }
11138fi
11139
11140
11141  test -n "$TEE" && break
11142done
11143
11144    else
11145      # If it succeeded, then it was overridden by the user. We will use it
11146      # for the tool.
11147
11148      # First remove it from the list of overridden variables, so we can test
11149      # for unknown variables in the end.
11150      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11151
11152      # Check if we try to supply an empty value
11153      if test "x$TEE" = x; then
11154        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11155$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11157$as_echo_n "checking for TEE... " >&6; }
11158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11159$as_echo "disabled" >&6; }
11160      else
11161        # Check if the provided tool contains a complete path.
11162        tool_specified="$TEE"
11163        tool_basename="${tool_specified##*/}"
11164        if test "x$tool_basename" = "x$tool_specified"; then
11165          # A command without a complete path is provided, search $PATH.
11166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11167$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11168          # Extract the first word of "$tool_basename", so it can be a program name with args.
11169set dummy $tool_basename; ac_word=$2
11170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11171$as_echo_n "checking for $ac_word... " >&6; }
11172if ${ac_cv_path_TEE+:} false; then :
11173  $as_echo_n "(cached) " >&6
11174else
11175  case $TEE in
11176  [\\/]* | ?:[\\/]*)
11177  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11178  ;;
11179  *)
11180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11181for as_dir in $PATH
11182do
11183  IFS=$as_save_IFS
11184  test -z "$as_dir" && as_dir=.
11185    for ac_exec_ext in '' $ac_executable_extensions; do
11186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11187    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11189    break 2
11190  fi
11191done
11192  done
11193IFS=$as_save_IFS
11194
11195  ;;
11196esac
11197fi
11198TEE=$ac_cv_path_TEE
11199if test -n "$TEE"; then
11200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11201$as_echo "$TEE" >&6; }
11202else
11203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11204$as_echo "no" >&6; }
11205fi
11206
11207
11208          if test "x$TEE" = x; then
11209            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11210          fi
11211        else
11212          # Otherwise we believe it is a complete path. Use it as it is.
11213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11214$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11215          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11216$as_echo_n "checking for TEE... " >&6; }
11217          if test ! -x "$tool_specified"; then
11218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11219$as_echo "not found" >&6; }
11220            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11221          fi
11222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11223$as_echo "$tool_specified" >&6; }
11224        fi
11225      fi
11226    fi
11227
11228  fi
11229
11230
11231
11232  if test "x$TEE" = x; then
11233    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11234  fi
11235
11236
11237
11238
11239
11240  # Publish this variable in the help.
11241
11242
11243  if [ -z "${TOUCH+x}" ]; then
11244    # The variable is not set by user, try to locate tool using the code snippet
11245    for ac_prog in touch
11246do
11247  # Extract the first word of "$ac_prog", so it can be a program name with args.
11248set dummy $ac_prog; ac_word=$2
11249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11250$as_echo_n "checking for $ac_word... " >&6; }
11251if ${ac_cv_path_TOUCH+:} false; then :
11252  $as_echo_n "(cached) " >&6
11253else
11254  case $TOUCH in
11255  [\\/]* | ?:[\\/]*)
11256  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11257  ;;
11258  *)
11259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11260for as_dir in $PATH
11261do
11262  IFS=$as_save_IFS
11263  test -z "$as_dir" && as_dir=.
11264    for ac_exec_ext in '' $ac_executable_extensions; do
11265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11266    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11268    break 2
11269  fi
11270done
11271  done
11272IFS=$as_save_IFS
11273
11274  ;;
11275esac
11276fi
11277TOUCH=$ac_cv_path_TOUCH
11278if test -n "$TOUCH"; then
11279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11280$as_echo "$TOUCH" >&6; }
11281else
11282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11283$as_echo "no" >&6; }
11284fi
11285
11286
11287  test -n "$TOUCH" && break
11288done
11289
11290  else
11291    # The variable is set, but is it from the command line or the environment?
11292
11293    # Try to remove the string !TOUCH! from our list.
11294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11296      # If it failed, the variable was not from the command line. Ignore it,
11297      # but warn the user (except for BASH, which is always set by the calling BASH).
11298      if test "xTOUCH" != xBASH; then
11299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11300$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11301      fi
11302      # Try to locate tool using the code snippet
11303      for ac_prog in touch
11304do
11305  # Extract the first word of "$ac_prog", so it can be a program name with args.
11306set dummy $ac_prog; ac_word=$2
11307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11308$as_echo_n "checking for $ac_word... " >&6; }
11309if ${ac_cv_path_TOUCH+:} false; then :
11310  $as_echo_n "(cached) " >&6
11311else
11312  case $TOUCH in
11313  [\\/]* | ?:[\\/]*)
11314  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11315  ;;
11316  *)
11317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11318for as_dir in $PATH
11319do
11320  IFS=$as_save_IFS
11321  test -z "$as_dir" && as_dir=.
11322    for ac_exec_ext in '' $ac_executable_extensions; do
11323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11324    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11326    break 2
11327  fi
11328done
11329  done
11330IFS=$as_save_IFS
11331
11332  ;;
11333esac
11334fi
11335TOUCH=$ac_cv_path_TOUCH
11336if test -n "$TOUCH"; then
11337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11338$as_echo "$TOUCH" >&6; }
11339else
11340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341$as_echo "no" >&6; }
11342fi
11343
11344
11345  test -n "$TOUCH" && break
11346done
11347
11348    else
11349      # If it succeeded, then it was overridden by the user. We will use it
11350      # for the tool.
11351
11352      # First remove it from the list of overridden variables, so we can test
11353      # for unknown variables in the end.
11354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11355
11356      # Check if we try to supply an empty value
11357      if test "x$TOUCH" = x; then
11358        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11359$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11361$as_echo_n "checking for TOUCH... " >&6; }
11362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11363$as_echo "disabled" >&6; }
11364      else
11365        # Check if the provided tool contains a complete path.
11366        tool_specified="$TOUCH"
11367        tool_basename="${tool_specified##*/}"
11368        if test "x$tool_basename" = "x$tool_specified"; then
11369          # A command without a complete path is provided, search $PATH.
11370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11371$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11372          # Extract the first word of "$tool_basename", so it can be a program name with args.
11373set dummy $tool_basename; ac_word=$2
11374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11375$as_echo_n "checking for $ac_word... " >&6; }
11376if ${ac_cv_path_TOUCH+:} false; then :
11377  $as_echo_n "(cached) " >&6
11378else
11379  case $TOUCH in
11380  [\\/]* | ?:[\\/]*)
11381  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11382  ;;
11383  *)
11384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11385for as_dir in $PATH
11386do
11387  IFS=$as_save_IFS
11388  test -z "$as_dir" && as_dir=.
11389    for ac_exec_ext in '' $ac_executable_extensions; do
11390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11391    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11393    break 2
11394  fi
11395done
11396  done
11397IFS=$as_save_IFS
11398
11399  ;;
11400esac
11401fi
11402TOUCH=$ac_cv_path_TOUCH
11403if test -n "$TOUCH"; then
11404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11405$as_echo "$TOUCH" >&6; }
11406else
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408$as_echo "no" >&6; }
11409fi
11410
11411
11412          if test "x$TOUCH" = x; then
11413            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11414          fi
11415        else
11416          # Otherwise we believe it is a complete path. Use it as it is.
11417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11418$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11419          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11420$as_echo_n "checking for TOUCH... " >&6; }
11421          if test ! -x "$tool_specified"; then
11422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11423$as_echo "not found" >&6; }
11424            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11425          fi
11426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11427$as_echo "$tool_specified" >&6; }
11428        fi
11429      fi
11430    fi
11431
11432  fi
11433
11434
11435
11436  if test "x$TOUCH" = x; then
11437    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11438  fi
11439
11440
11441
11442
11443
11444  # Publish this variable in the help.
11445
11446
11447  if [ -z "${TR+x}" ]; then
11448    # The variable is not set by user, try to locate tool using the code snippet
11449    for ac_prog in tr
11450do
11451  # Extract the first word of "$ac_prog", so it can be a program name with args.
11452set dummy $ac_prog; ac_word=$2
11453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11454$as_echo_n "checking for $ac_word... " >&6; }
11455if ${ac_cv_path_TR+:} false; then :
11456  $as_echo_n "(cached) " >&6
11457else
11458  case $TR in
11459  [\\/]* | ?:[\\/]*)
11460  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11461  ;;
11462  *)
11463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11464for as_dir in $PATH
11465do
11466  IFS=$as_save_IFS
11467  test -z "$as_dir" && as_dir=.
11468    for ac_exec_ext in '' $ac_executable_extensions; do
11469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11470    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11472    break 2
11473  fi
11474done
11475  done
11476IFS=$as_save_IFS
11477
11478  ;;
11479esac
11480fi
11481TR=$ac_cv_path_TR
11482if test -n "$TR"; then
11483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11484$as_echo "$TR" >&6; }
11485else
11486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11487$as_echo "no" >&6; }
11488fi
11489
11490
11491  test -n "$TR" && break
11492done
11493
11494  else
11495    # The variable is set, but is it from the command line or the environment?
11496
11497    # Try to remove the string !TR! from our list.
11498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11500      # If it failed, the variable was not from the command line. Ignore it,
11501      # but warn the user (except for BASH, which is always set by the calling BASH).
11502      if test "xTR" != xBASH; then
11503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11504$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11505      fi
11506      # Try to locate tool using the code snippet
11507      for ac_prog in tr
11508do
11509  # Extract the first word of "$ac_prog", so it can be a program name with args.
11510set dummy $ac_prog; ac_word=$2
11511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11512$as_echo_n "checking for $ac_word... " >&6; }
11513if ${ac_cv_path_TR+:} false; then :
11514  $as_echo_n "(cached) " >&6
11515else
11516  case $TR in
11517  [\\/]* | ?:[\\/]*)
11518  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11519  ;;
11520  *)
11521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11522for as_dir in $PATH
11523do
11524  IFS=$as_save_IFS
11525  test -z "$as_dir" && as_dir=.
11526    for ac_exec_ext in '' $ac_executable_extensions; do
11527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11528    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11530    break 2
11531  fi
11532done
11533  done
11534IFS=$as_save_IFS
11535
11536  ;;
11537esac
11538fi
11539TR=$ac_cv_path_TR
11540if test -n "$TR"; then
11541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11542$as_echo "$TR" >&6; }
11543else
11544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11545$as_echo "no" >&6; }
11546fi
11547
11548
11549  test -n "$TR" && break
11550done
11551
11552    else
11553      # If it succeeded, then it was overridden by the user. We will use it
11554      # for the tool.
11555
11556      # First remove it from the list of overridden variables, so we can test
11557      # for unknown variables in the end.
11558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11559
11560      # Check if we try to supply an empty value
11561      if test "x$TR" = x; then
11562        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11563$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11565$as_echo_n "checking for TR... " >&6; }
11566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11567$as_echo "disabled" >&6; }
11568      else
11569        # Check if the provided tool contains a complete path.
11570        tool_specified="$TR"
11571        tool_basename="${tool_specified##*/}"
11572        if test "x$tool_basename" = "x$tool_specified"; then
11573          # A command without a complete path is provided, search $PATH.
11574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11575$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11576          # Extract the first word of "$tool_basename", so it can be a program name with args.
11577set dummy $tool_basename; ac_word=$2
11578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11579$as_echo_n "checking for $ac_word... " >&6; }
11580if ${ac_cv_path_TR+:} false; then :
11581  $as_echo_n "(cached) " >&6
11582else
11583  case $TR in
11584  [\\/]* | ?:[\\/]*)
11585  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11586  ;;
11587  *)
11588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11589for as_dir in $PATH
11590do
11591  IFS=$as_save_IFS
11592  test -z "$as_dir" && as_dir=.
11593    for ac_exec_ext in '' $ac_executable_extensions; do
11594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11595    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11597    break 2
11598  fi
11599done
11600  done
11601IFS=$as_save_IFS
11602
11603  ;;
11604esac
11605fi
11606TR=$ac_cv_path_TR
11607if test -n "$TR"; then
11608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11609$as_echo "$TR" >&6; }
11610else
11611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11612$as_echo "no" >&6; }
11613fi
11614
11615
11616          if test "x$TR" = x; then
11617            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11618          fi
11619        else
11620          # Otherwise we believe it is a complete path. Use it as it is.
11621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11622$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11623          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11624$as_echo_n "checking for TR... " >&6; }
11625          if test ! -x "$tool_specified"; then
11626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11627$as_echo "not found" >&6; }
11628            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11629          fi
11630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11631$as_echo "$tool_specified" >&6; }
11632        fi
11633      fi
11634    fi
11635
11636  fi
11637
11638
11639
11640  if test "x$TR" = x; then
11641    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11642  fi
11643
11644
11645
11646
11647
11648  # Publish this variable in the help.
11649
11650
11651  if [ -z "${UNAME+x}" ]; then
11652    # The variable is not set by user, try to locate tool using the code snippet
11653    for ac_prog in uname
11654do
11655  # Extract the first word of "$ac_prog", so it can be a program name with args.
11656set dummy $ac_prog; ac_word=$2
11657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11658$as_echo_n "checking for $ac_word... " >&6; }
11659if ${ac_cv_path_UNAME+:} false; then :
11660  $as_echo_n "(cached) " >&6
11661else
11662  case $UNAME in
11663  [\\/]* | ?:[\\/]*)
11664  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11665  ;;
11666  *)
11667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11668for as_dir in $PATH
11669do
11670  IFS=$as_save_IFS
11671  test -z "$as_dir" && as_dir=.
11672    for ac_exec_ext in '' $ac_executable_extensions; do
11673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11674    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11676    break 2
11677  fi
11678done
11679  done
11680IFS=$as_save_IFS
11681
11682  ;;
11683esac
11684fi
11685UNAME=$ac_cv_path_UNAME
11686if test -n "$UNAME"; then
11687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11688$as_echo "$UNAME" >&6; }
11689else
11690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11691$as_echo "no" >&6; }
11692fi
11693
11694
11695  test -n "$UNAME" && break
11696done
11697
11698  else
11699    # The variable is set, but is it from the command line or the environment?
11700
11701    # Try to remove the string !UNAME! from our list.
11702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11704      # If it failed, the variable was not from the command line. Ignore it,
11705      # but warn the user (except for BASH, which is always set by the calling BASH).
11706      if test "xUNAME" != xBASH; then
11707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11708$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11709      fi
11710      # Try to locate tool using the code snippet
11711      for ac_prog in uname
11712do
11713  # Extract the first word of "$ac_prog", so it can be a program name with args.
11714set dummy $ac_prog; ac_word=$2
11715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11716$as_echo_n "checking for $ac_word... " >&6; }
11717if ${ac_cv_path_UNAME+:} false; then :
11718  $as_echo_n "(cached) " >&6
11719else
11720  case $UNAME in
11721  [\\/]* | ?:[\\/]*)
11722  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11723  ;;
11724  *)
11725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11726for as_dir in $PATH
11727do
11728  IFS=$as_save_IFS
11729  test -z "$as_dir" && as_dir=.
11730    for ac_exec_ext in '' $ac_executable_extensions; do
11731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11732    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11734    break 2
11735  fi
11736done
11737  done
11738IFS=$as_save_IFS
11739
11740  ;;
11741esac
11742fi
11743UNAME=$ac_cv_path_UNAME
11744if test -n "$UNAME"; then
11745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11746$as_echo "$UNAME" >&6; }
11747else
11748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11749$as_echo "no" >&6; }
11750fi
11751
11752
11753  test -n "$UNAME" && break
11754done
11755
11756    else
11757      # If it succeeded, then it was overridden by the user. We will use it
11758      # for the tool.
11759
11760      # First remove it from the list of overridden variables, so we can test
11761      # for unknown variables in the end.
11762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11763
11764      # Check if we try to supply an empty value
11765      if test "x$UNAME" = x; then
11766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11767$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11769$as_echo_n "checking for UNAME... " >&6; }
11770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11771$as_echo "disabled" >&6; }
11772      else
11773        # Check if the provided tool contains a complete path.
11774        tool_specified="$UNAME"
11775        tool_basename="${tool_specified##*/}"
11776        if test "x$tool_basename" = "x$tool_specified"; then
11777          # A command without a complete path is provided, search $PATH.
11778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11779$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11780          # Extract the first word of "$tool_basename", so it can be a program name with args.
11781set dummy $tool_basename; ac_word=$2
11782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11783$as_echo_n "checking for $ac_word... " >&6; }
11784if ${ac_cv_path_UNAME+:} false; then :
11785  $as_echo_n "(cached) " >&6
11786else
11787  case $UNAME in
11788  [\\/]* | ?:[\\/]*)
11789  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11790  ;;
11791  *)
11792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11793for as_dir in $PATH
11794do
11795  IFS=$as_save_IFS
11796  test -z "$as_dir" && as_dir=.
11797    for ac_exec_ext in '' $ac_executable_extensions; do
11798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11799    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11801    break 2
11802  fi
11803done
11804  done
11805IFS=$as_save_IFS
11806
11807  ;;
11808esac
11809fi
11810UNAME=$ac_cv_path_UNAME
11811if test -n "$UNAME"; then
11812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11813$as_echo "$UNAME" >&6; }
11814else
11815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11816$as_echo "no" >&6; }
11817fi
11818
11819
11820          if test "x$UNAME" = x; then
11821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11822          fi
11823        else
11824          # Otherwise we believe it is a complete path. Use it as it is.
11825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11826$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11828$as_echo_n "checking for UNAME... " >&6; }
11829          if test ! -x "$tool_specified"; then
11830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11831$as_echo "not found" >&6; }
11832            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11833          fi
11834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11835$as_echo "$tool_specified" >&6; }
11836        fi
11837      fi
11838    fi
11839
11840  fi
11841
11842
11843
11844  if test "x$UNAME" = x; then
11845    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11846  fi
11847
11848
11849
11850
11851
11852  # Publish this variable in the help.
11853
11854
11855  if [ -z "${UNIQ+x}" ]; then
11856    # The variable is not set by user, try to locate tool using the code snippet
11857    for ac_prog in uniq
11858do
11859  # Extract the first word of "$ac_prog", so it can be a program name with args.
11860set dummy $ac_prog; ac_word=$2
11861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11862$as_echo_n "checking for $ac_word... " >&6; }
11863if ${ac_cv_path_UNIQ+:} false; then :
11864  $as_echo_n "(cached) " >&6
11865else
11866  case $UNIQ in
11867  [\\/]* | ?:[\\/]*)
11868  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11869  ;;
11870  *)
11871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11872for as_dir in $PATH
11873do
11874  IFS=$as_save_IFS
11875  test -z "$as_dir" && as_dir=.
11876    for ac_exec_ext in '' $ac_executable_extensions; do
11877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11878    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11880    break 2
11881  fi
11882done
11883  done
11884IFS=$as_save_IFS
11885
11886  ;;
11887esac
11888fi
11889UNIQ=$ac_cv_path_UNIQ
11890if test -n "$UNIQ"; then
11891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11892$as_echo "$UNIQ" >&6; }
11893else
11894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895$as_echo "no" >&6; }
11896fi
11897
11898
11899  test -n "$UNIQ" && break
11900done
11901
11902  else
11903    # The variable is set, but is it from the command line or the environment?
11904
11905    # Try to remove the string !UNIQ! from our list.
11906    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11907    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11908      # If it failed, the variable was not from the command line. Ignore it,
11909      # but warn the user (except for BASH, which is always set by the calling BASH).
11910      if test "xUNIQ" != xBASH; then
11911        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11912$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11913      fi
11914      # Try to locate tool using the code snippet
11915      for ac_prog in uniq
11916do
11917  # Extract the first word of "$ac_prog", so it can be a program name with args.
11918set dummy $ac_prog; ac_word=$2
11919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11920$as_echo_n "checking for $ac_word... " >&6; }
11921if ${ac_cv_path_UNIQ+:} false; then :
11922  $as_echo_n "(cached) " >&6
11923else
11924  case $UNIQ in
11925  [\\/]* | ?:[\\/]*)
11926  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11927  ;;
11928  *)
11929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11930for as_dir in $PATH
11931do
11932  IFS=$as_save_IFS
11933  test -z "$as_dir" && as_dir=.
11934    for ac_exec_ext in '' $ac_executable_extensions; do
11935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11936    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11938    break 2
11939  fi
11940done
11941  done
11942IFS=$as_save_IFS
11943
11944  ;;
11945esac
11946fi
11947UNIQ=$ac_cv_path_UNIQ
11948if test -n "$UNIQ"; then
11949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11950$as_echo "$UNIQ" >&6; }
11951else
11952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11953$as_echo "no" >&6; }
11954fi
11955
11956
11957  test -n "$UNIQ" && break
11958done
11959
11960    else
11961      # If it succeeded, then it was overridden by the user. We will use it
11962      # for the tool.
11963
11964      # First remove it from the list of overridden variables, so we can test
11965      # for unknown variables in the end.
11966      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11967
11968      # Check if we try to supply an empty value
11969      if test "x$UNIQ" = x; then
11970        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11971$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11973$as_echo_n "checking for UNIQ... " >&6; }
11974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11975$as_echo "disabled" >&6; }
11976      else
11977        # Check if the provided tool contains a complete path.
11978        tool_specified="$UNIQ"
11979        tool_basename="${tool_specified##*/}"
11980        if test "x$tool_basename" = "x$tool_specified"; then
11981          # A command without a complete path is provided, search $PATH.
11982          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11983$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11984          # Extract the first word of "$tool_basename", so it can be a program name with args.
11985set dummy $tool_basename; ac_word=$2
11986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11987$as_echo_n "checking for $ac_word... " >&6; }
11988if ${ac_cv_path_UNIQ+:} false; then :
11989  $as_echo_n "(cached) " >&6
11990else
11991  case $UNIQ in
11992  [\\/]* | ?:[\\/]*)
11993  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11994  ;;
11995  *)
11996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11997for as_dir in $PATH
11998do
11999  IFS=$as_save_IFS
12000  test -z "$as_dir" && as_dir=.
12001    for ac_exec_ext in '' $ac_executable_extensions; do
12002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12003    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12005    break 2
12006  fi
12007done
12008  done
12009IFS=$as_save_IFS
12010
12011  ;;
12012esac
12013fi
12014UNIQ=$ac_cv_path_UNIQ
12015if test -n "$UNIQ"; then
12016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12017$as_echo "$UNIQ" >&6; }
12018else
12019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12020$as_echo "no" >&6; }
12021fi
12022
12023
12024          if test "x$UNIQ" = x; then
12025            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12026          fi
12027        else
12028          # Otherwise we believe it is a complete path. Use it as it is.
12029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12030$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12031          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12032$as_echo_n "checking for UNIQ... " >&6; }
12033          if test ! -x "$tool_specified"; then
12034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12035$as_echo "not found" >&6; }
12036            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12037          fi
12038          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12039$as_echo "$tool_specified" >&6; }
12040        fi
12041      fi
12042    fi
12043
12044  fi
12045
12046
12047
12048  if test "x$UNIQ" = x; then
12049    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12050  fi
12051
12052
12053
12054
12055
12056  # Publish this variable in the help.
12057
12058
12059  if [ -z "${WC+x}" ]; then
12060    # The variable is not set by user, try to locate tool using the code snippet
12061    for ac_prog in wc
12062do
12063  # Extract the first word of "$ac_prog", so it can be a program name with args.
12064set dummy $ac_prog; ac_word=$2
12065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12066$as_echo_n "checking for $ac_word... " >&6; }
12067if ${ac_cv_path_WC+:} false; then :
12068  $as_echo_n "(cached) " >&6
12069else
12070  case $WC in
12071  [\\/]* | ?:[\\/]*)
12072  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12073  ;;
12074  *)
12075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12076for as_dir in $PATH
12077do
12078  IFS=$as_save_IFS
12079  test -z "$as_dir" && as_dir=.
12080    for ac_exec_ext in '' $ac_executable_extensions; do
12081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12082    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12084    break 2
12085  fi
12086done
12087  done
12088IFS=$as_save_IFS
12089
12090  ;;
12091esac
12092fi
12093WC=$ac_cv_path_WC
12094if test -n "$WC"; then
12095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12096$as_echo "$WC" >&6; }
12097else
12098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12099$as_echo "no" >&6; }
12100fi
12101
12102
12103  test -n "$WC" && break
12104done
12105
12106  else
12107    # The variable is set, but is it from the command line or the environment?
12108
12109    # Try to remove the string !WC! from our list.
12110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12112      # If it failed, the variable was not from the command line. Ignore it,
12113      # but warn the user (except for BASH, which is always set by the calling BASH).
12114      if test "xWC" != xBASH; then
12115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12116$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12117      fi
12118      # Try to locate tool using the code snippet
12119      for ac_prog in wc
12120do
12121  # Extract the first word of "$ac_prog", so it can be a program name with args.
12122set dummy $ac_prog; ac_word=$2
12123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12124$as_echo_n "checking for $ac_word... " >&6; }
12125if ${ac_cv_path_WC+:} false; then :
12126  $as_echo_n "(cached) " >&6
12127else
12128  case $WC in
12129  [\\/]* | ?:[\\/]*)
12130  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12131  ;;
12132  *)
12133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12134for as_dir in $PATH
12135do
12136  IFS=$as_save_IFS
12137  test -z "$as_dir" && as_dir=.
12138    for ac_exec_ext in '' $ac_executable_extensions; do
12139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12140    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12142    break 2
12143  fi
12144done
12145  done
12146IFS=$as_save_IFS
12147
12148  ;;
12149esac
12150fi
12151WC=$ac_cv_path_WC
12152if test -n "$WC"; then
12153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12154$as_echo "$WC" >&6; }
12155else
12156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12157$as_echo "no" >&6; }
12158fi
12159
12160
12161  test -n "$WC" && break
12162done
12163
12164    else
12165      # If it succeeded, then it was overridden by the user. We will use it
12166      # for the tool.
12167
12168      # First remove it from the list of overridden variables, so we can test
12169      # for unknown variables in the end.
12170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12171
12172      # Check if we try to supply an empty value
12173      if test "x$WC" = x; then
12174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12175$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12177$as_echo_n "checking for WC... " >&6; }
12178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12179$as_echo "disabled" >&6; }
12180      else
12181        # Check if the provided tool contains a complete path.
12182        tool_specified="$WC"
12183        tool_basename="${tool_specified##*/}"
12184        if test "x$tool_basename" = "x$tool_specified"; then
12185          # A command without a complete path is provided, search $PATH.
12186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12187$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12188          # Extract the first word of "$tool_basename", so it can be a program name with args.
12189set dummy $tool_basename; ac_word=$2
12190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12191$as_echo_n "checking for $ac_word... " >&6; }
12192if ${ac_cv_path_WC+:} false; then :
12193  $as_echo_n "(cached) " >&6
12194else
12195  case $WC in
12196  [\\/]* | ?:[\\/]*)
12197  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12198  ;;
12199  *)
12200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12201for as_dir in $PATH
12202do
12203  IFS=$as_save_IFS
12204  test -z "$as_dir" && as_dir=.
12205    for ac_exec_ext in '' $ac_executable_extensions; do
12206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12207    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12209    break 2
12210  fi
12211done
12212  done
12213IFS=$as_save_IFS
12214
12215  ;;
12216esac
12217fi
12218WC=$ac_cv_path_WC
12219if test -n "$WC"; then
12220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12221$as_echo "$WC" >&6; }
12222else
12223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12224$as_echo "no" >&6; }
12225fi
12226
12227
12228          if test "x$WC" = x; then
12229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12230          fi
12231        else
12232          # Otherwise we believe it is a complete path. Use it as it is.
12233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12234$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12236$as_echo_n "checking for WC... " >&6; }
12237          if test ! -x "$tool_specified"; then
12238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12239$as_echo "not found" >&6; }
12240            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12241          fi
12242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12243$as_echo "$tool_specified" >&6; }
12244        fi
12245      fi
12246    fi
12247
12248  fi
12249
12250
12251
12252  if test "x$WC" = x; then
12253    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12254  fi
12255
12256
12257
12258
12259
12260  # Publish this variable in the help.
12261
12262
12263  if [ -z "${WHICH+x}" ]; then
12264    # The variable is not set by user, try to locate tool using the code snippet
12265    for ac_prog in which
12266do
12267  # Extract the first word of "$ac_prog", so it can be a program name with args.
12268set dummy $ac_prog; ac_word=$2
12269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12270$as_echo_n "checking for $ac_word... " >&6; }
12271if ${ac_cv_path_WHICH+:} false; then :
12272  $as_echo_n "(cached) " >&6
12273else
12274  case $WHICH in
12275  [\\/]* | ?:[\\/]*)
12276  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12277  ;;
12278  *)
12279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12280for as_dir in $PATH
12281do
12282  IFS=$as_save_IFS
12283  test -z "$as_dir" && as_dir=.
12284    for ac_exec_ext in '' $ac_executable_extensions; do
12285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12286    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12288    break 2
12289  fi
12290done
12291  done
12292IFS=$as_save_IFS
12293
12294  ;;
12295esac
12296fi
12297WHICH=$ac_cv_path_WHICH
12298if test -n "$WHICH"; then
12299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12300$as_echo "$WHICH" >&6; }
12301else
12302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12303$as_echo "no" >&6; }
12304fi
12305
12306
12307  test -n "$WHICH" && break
12308done
12309
12310  else
12311    # The variable is set, but is it from the command line or the environment?
12312
12313    # Try to remove the string !WHICH! from our list.
12314    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12315    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12316      # If it failed, the variable was not from the command line. Ignore it,
12317      # but warn the user (except for BASH, which is always set by the calling BASH).
12318      if test "xWHICH" != xBASH; then
12319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12320$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12321      fi
12322      # Try to locate tool using the code snippet
12323      for ac_prog in which
12324do
12325  # Extract the first word of "$ac_prog", so it can be a program name with args.
12326set dummy $ac_prog; ac_word=$2
12327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12328$as_echo_n "checking for $ac_word... " >&6; }
12329if ${ac_cv_path_WHICH+:} false; then :
12330  $as_echo_n "(cached) " >&6
12331else
12332  case $WHICH in
12333  [\\/]* | ?:[\\/]*)
12334  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12335  ;;
12336  *)
12337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12338for as_dir in $PATH
12339do
12340  IFS=$as_save_IFS
12341  test -z "$as_dir" && as_dir=.
12342    for ac_exec_ext in '' $ac_executable_extensions; do
12343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12344    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12346    break 2
12347  fi
12348done
12349  done
12350IFS=$as_save_IFS
12351
12352  ;;
12353esac
12354fi
12355WHICH=$ac_cv_path_WHICH
12356if test -n "$WHICH"; then
12357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12358$as_echo "$WHICH" >&6; }
12359else
12360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12361$as_echo "no" >&6; }
12362fi
12363
12364
12365  test -n "$WHICH" && break
12366done
12367
12368    else
12369      # If it succeeded, then it was overridden by the user. We will use it
12370      # for the tool.
12371
12372      # First remove it from the list of overridden variables, so we can test
12373      # for unknown variables in the end.
12374      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12375
12376      # Check if we try to supply an empty value
12377      if test "x$WHICH" = x; then
12378        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12379$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12380        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12381$as_echo_n "checking for WHICH... " >&6; }
12382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12383$as_echo "disabled" >&6; }
12384      else
12385        # Check if the provided tool contains a complete path.
12386        tool_specified="$WHICH"
12387        tool_basename="${tool_specified##*/}"
12388        if test "x$tool_basename" = "x$tool_specified"; then
12389          # A command without a complete path is provided, search $PATH.
12390          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12391$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12392          # Extract the first word of "$tool_basename", so it can be a program name with args.
12393set dummy $tool_basename; ac_word=$2
12394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12395$as_echo_n "checking for $ac_word... " >&6; }
12396if ${ac_cv_path_WHICH+:} false; then :
12397  $as_echo_n "(cached) " >&6
12398else
12399  case $WHICH in
12400  [\\/]* | ?:[\\/]*)
12401  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12402  ;;
12403  *)
12404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12405for as_dir in $PATH
12406do
12407  IFS=$as_save_IFS
12408  test -z "$as_dir" && as_dir=.
12409    for ac_exec_ext in '' $ac_executable_extensions; do
12410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12411    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12413    break 2
12414  fi
12415done
12416  done
12417IFS=$as_save_IFS
12418
12419  ;;
12420esac
12421fi
12422WHICH=$ac_cv_path_WHICH
12423if test -n "$WHICH"; then
12424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12425$as_echo "$WHICH" >&6; }
12426else
12427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12428$as_echo "no" >&6; }
12429fi
12430
12431
12432          if test "x$WHICH" = x; then
12433            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12434          fi
12435        else
12436          # Otherwise we believe it is a complete path. Use it as it is.
12437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12438$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12439          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12440$as_echo_n "checking for WHICH... " >&6; }
12441          if test ! -x "$tool_specified"; then
12442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12443$as_echo "not found" >&6; }
12444            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12445          fi
12446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12447$as_echo "$tool_specified" >&6; }
12448        fi
12449      fi
12450    fi
12451
12452  fi
12453
12454
12455
12456  if test "x$WHICH" = x; then
12457    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12458  fi
12459
12460
12461
12462
12463
12464  # Publish this variable in the help.
12465
12466
12467  if [ -z "${XARGS+x}" ]; then
12468    # The variable is not set by user, try to locate tool using the code snippet
12469    for ac_prog in xargs
12470do
12471  # Extract the first word of "$ac_prog", so it can be a program name with args.
12472set dummy $ac_prog; ac_word=$2
12473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12474$as_echo_n "checking for $ac_word... " >&6; }
12475if ${ac_cv_path_XARGS+:} false; then :
12476  $as_echo_n "(cached) " >&6
12477else
12478  case $XARGS in
12479  [\\/]* | ?:[\\/]*)
12480  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12481  ;;
12482  *)
12483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12484for as_dir in $PATH
12485do
12486  IFS=$as_save_IFS
12487  test -z "$as_dir" && as_dir=.
12488    for ac_exec_ext in '' $ac_executable_extensions; do
12489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12490    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12492    break 2
12493  fi
12494done
12495  done
12496IFS=$as_save_IFS
12497
12498  ;;
12499esac
12500fi
12501XARGS=$ac_cv_path_XARGS
12502if test -n "$XARGS"; then
12503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12504$as_echo "$XARGS" >&6; }
12505else
12506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12507$as_echo "no" >&6; }
12508fi
12509
12510
12511  test -n "$XARGS" && break
12512done
12513
12514  else
12515    # The variable is set, but is it from the command line or the environment?
12516
12517    # Try to remove the string !XARGS! from our list.
12518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12520      # If it failed, the variable was not from the command line. Ignore it,
12521      # but warn the user (except for BASH, which is always set by the calling BASH).
12522      if test "xXARGS" != xBASH; then
12523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12524$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12525      fi
12526      # Try to locate tool using the code snippet
12527      for ac_prog in xargs
12528do
12529  # Extract the first word of "$ac_prog", so it can be a program name with args.
12530set dummy $ac_prog; ac_word=$2
12531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12532$as_echo_n "checking for $ac_word... " >&6; }
12533if ${ac_cv_path_XARGS+:} false; then :
12534  $as_echo_n "(cached) " >&6
12535else
12536  case $XARGS in
12537  [\\/]* | ?:[\\/]*)
12538  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12539  ;;
12540  *)
12541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12542for as_dir in $PATH
12543do
12544  IFS=$as_save_IFS
12545  test -z "$as_dir" && as_dir=.
12546    for ac_exec_ext in '' $ac_executable_extensions; do
12547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12548    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12550    break 2
12551  fi
12552done
12553  done
12554IFS=$as_save_IFS
12555
12556  ;;
12557esac
12558fi
12559XARGS=$ac_cv_path_XARGS
12560if test -n "$XARGS"; then
12561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12562$as_echo "$XARGS" >&6; }
12563else
12564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12565$as_echo "no" >&6; }
12566fi
12567
12568
12569  test -n "$XARGS" && break
12570done
12571
12572    else
12573      # If it succeeded, then it was overridden by the user. We will use it
12574      # for the tool.
12575
12576      # First remove it from the list of overridden variables, so we can test
12577      # for unknown variables in the end.
12578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12579
12580      # Check if we try to supply an empty value
12581      if test "x$XARGS" = x; then
12582        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12583$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12585$as_echo_n "checking for XARGS... " >&6; }
12586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12587$as_echo "disabled" >&6; }
12588      else
12589        # Check if the provided tool contains a complete path.
12590        tool_specified="$XARGS"
12591        tool_basename="${tool_specified##*/}"
12592        if test "x$tool_basename" = "x$tool_specified"; then
12593          # A command without a complete path is provided, search $PATH.
12594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12595$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12596          # Extract the first word of "$tool_basename", so it can be a program name with args.
12597set dummy $tool_basename; ac_word=$2
12598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12599$as_echo_n "checking for $ac_word... " >&6; }
12600if ${ac_cv_path_XARGS+:} false; then :
12601  $as_echo_n "(cached) " >&6
12602else
12603  case $XARGS in
12604  [\\/]* | ?:[\\/]*)
12605  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12606  ;;
12607  *)
12608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12609for as_dir in $PATH
12610do
12611  IFS=$as_save_IFS
12612  test -z "$as_dir" && as_dir=.
12613    for ac_exec_ext in '' $ac_executable_extensions; do
12614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12615    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12617    break 2
12618  fi
12619done
12620  done
12621IFS=$as_save_IFS
12622
12623  ;;
12624esac
12625fi
12626XARGS=$ac_cv_path_XARGS
12627if test -n "$XARGS"; then
12628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12629$as_echo "$XARGS" >&6; }
12630else
12631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12632$as_echo "no" >&6; }
12633fi
12634
12635
12636          if test "x$XARGS" = x; then
12637            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12638          fi
12639        else
12640          # Otherwise we believe it is a complete path. Use it as it is.
12641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12642$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12643          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12644$as_echo_n "checking for XARGS... " >&6; }
12645          if test ! -x "$tool_specified"; then
12646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12647$as_echo "not found" >&6; }
12648            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12649          fi
12650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12651$as_echo "$tool_specified" >&6; }
12652        fi
12653      fi
12654    fi
12655
12656  fi
12657
12658
12659
12660  if test "x$XARGS" = x; then
12661    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12662  fi
12663
12664
12665
12666  # Then required tools that require some special treatment.
12667
12668
12669  # Publish this variable in the help.
12670
12671
12672  if [ -z "${AWK+x}" ]; then
12673    # The variable is not set by user, try to locate tool using the code snippet
12674    for ac_prog in gawk mawk nawk awk
12675do
12676  # Extract the first word of "$ac_prog", so it can be a program name with args.
12677set dummy $ac_prog; ac_word=$2
12678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12679$as_echo_n "checking for $ac_word... " >&6; }
12680if ${ac_cv_prog_AWK+:} false; then :
12681  $as_echo_n "(cached) " >&6
12682else
12683  if test -n "$AWK"; then
12684  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12685else
12686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12687for as_dir in $PATH
12688do
12689  IFS=$as_save_IFS
12690  test -z "$as_dir" && as_dir=.
12691    for ac_exec_ext in '' $ac_executable_extensions; do
12692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12693    ac_cv_prog_AWK="$ac_prog"
12694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12695    break 2
12696  fi
12697done
12698  done
12699IFS=$as_save_IFS
12700
12701fi
12702fi
12703AWK=$ac_cv_prog_AWK
12704if test -n "$AWK"; then
12705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12706$as_echo "$AWK" >&6; }
12707else
12708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12709$as_echo "no" >&6; }
12710fi
12711
12712
12713  test -n "$AWK" && break
12714done
12715
12716  else
12717    # The variable is set, but is it from the command line or the environment?
12718
12719    # Try to remove the string !AWK! from our list.
12720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12722      # If it failed, the variable was not from the command line. Ignore it,
12723      # but warn the user (except for BASH, which is always set by the calling BASH).
12724      if test "xAWK" != xBASH; then
12725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12726$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12727      fi
12728      # Try to locate tool using the code snippet
12729      for ac_prog in gawk mawk nawk awk
12730do
12731  # Extract the first word of "$ac_prog", so it can be a program name with args.
12732set dummy $ac_prog; ac_word=$2
12733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12734$as_echo_n "checking for $ac_word... " >&6; }
12735if ${ac_cv_prog_AWK+:} false; then :
12736  $as_echo_n "(cached) " >&6
12737else
12738  if test -n "$AWK"; then
12739  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12740else
12741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12742for as_dir in $PATH
12743do
12744  IFS=$as_save_IFS
12745  test -z "$as_dir" && as_dir=.
12746    for ac_exec_ext in '' $ac_executable_extensions; do
12747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12748    ac_cv_prog_AWK="$ac_prog"
12749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12750    break 2
12751  fi
12752done
12753  done
12754IFS=$as_save_IFS
12755
12756fi
12757fi
12758AWK=$ac_cv_prog_AWK
12759if test -n "$AWK"; then
12760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12761$as_echo "$AWK" >&6; }
12762else
12763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12764$as_echo "no" >&6; }
12765fi
12766
12767
12768  test -n "$AWK" && break
12769done
12770
12771    else
12772      # If it succeeded, then it was overridden by the user. We will use it
12773      # for the tool.
12774
12775      # First remove it from the list of overridden variables, so we can test
12776      # for unknown variables in the end.
12777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12778
12779      # Check if we try to supply an empty value
12780      if test "x$AWK" = x; then
12781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12782$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12784$as_echo_n "checking for AWK... " >&6; }
12785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12786$as_echo "disabled" >&6; }
12787      else
12788        # Check if the provided tool contains a complete path.
12789        tool_specified="$AWK"
12790        tool_basename="${tool_specified##*/}"
12791        if test "x$tool_basename" = "x$tool_specified"; then
12792          # A command without a complete path is provided, search $PATH.
12793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12794$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12795          # Extract the first word of "$tool_basename", so it can be a program name with args.
12796set dummy $tool_basename; ac_word=$2
12797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12798$as_echo_n "checking for $ac_word... " >&6; }
12799if ${ac_cv_path_AWK+:} false; then :
12800  $as_echo_n "(cached) " >&6
12801else
12802  case $AWK in
12803  [\\/]* | ?:[\\/]*)
12804  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12805  ;;
12806  *)
12807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12808for as_dir in $PATH
12809do
12810  IFS=$as_save_IFS
12811  test -z "$as_dir" && as_dir=.
12812    for ac_exec_ext in '' $ac_executable_extensions; do
12813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12814    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12816    break 2
12817  fi
12818done
12819  done
12820IFS=$as_save_IFS
12821
12822  ;;
12823esac
12824fi
12825AWK=$ac_cv_path_AWK
12826if test -n "$AWK"; then
12827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12828$as_echo "$AWK" >&6; }
12829else
12830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12831$as_echo "no" >&6; }
12832fi
12833
12834
12835          if test "x$AWK" = x; then
12836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12837          fi
12838        else
12839          # Otherwise we believe it is a complete path. Use it as it is.
12840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12841$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12843$as_echo_n "checking for AWK... " >&6; }
12844          if test ! -x "$tool_specified"; then
12845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12846$as_echo "not found" >&6; }
12847            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12848          fi
12849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12850$as_echo "$tool_specified" >&6; }
12851        fi
12852      fi
12853    fi
12854
12855  fi
12856
12857
12858  if test "x$AWK" = x; then
12859    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12860  fi
12861
12862
12863
12864
12865  # Publish this variable in the help.
12866
12867
12868  if [ -z "${GREP+x}" ]; then
12869    # The variable is not set by user, try to locate tool using the code snippet
12870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12871$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12872if ${ac_cv_path_GREP+:} false; then :
12873  $as_echo_n "(cached) " >&6
12874else
12875  if test -z "$GREP"; then
12876  ac_path_GREP_found=false
12877  # Loop through the user's path and test for each of PROGNAME-LIST
12878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12879for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12880do
12881  IFS=$as_save_IFS
12882  test -z "$as_dir" && as_dir=.
12883    for ac_prog in grep ggrep; do
12884    for ac_exec_ext in '' $ac_executable_extensions; do
12885      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12886      as_fn_executable_p "$ac_path_GREP" || continue
12887# Check for GNU ac_path_GREP and select it if it is found.
12888  # Check for GNU $ac_path_GREP
12889case `"$ac_path_GREP" --version 2>&1` in
12890*GNU*)
12891  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12892*)
12893  ac_count=0
12894  $as_echo_n 0123456789 >"conftest.in"
12895  while :
12896  do
12897    cat "conftest.in" "conftest.in" >"conftest.tmp"
12898    mv "conftest.tmp" "conftest.in"
12899    cp "conftest.in" "conftest.nl"
12900    $as_echo 'GREP' >> "conftest.nl"
12901    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12902    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12903    as_fn_arith $ac_count + 1 && ac_count=$as_val
12904    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12905      # Best one so far, save it but keep looking for a better one
12906      ac_cv_path_GREP="$ac_path_GREP"
12907      ac_path_GREP_max=$ac_count
12908    fi
12909    # 10*(2^10) chars as input seems more than enough
12910    test $ac_count -gt 10 && break
12911  done
12912  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12913esac
12914
12915      $ac_path_GREP_found && break 3
12916    done
12917  done
12918  done
12919IFS=$as_save_IFS
12920  if test -z "$ac_cv_path_GREP"; then
12921    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12922  fi
12923else
12924  ac_cv_path_GREP=$GREP
12925fi
12926
12927fi
12928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12929$as_echo "$ac_cv_path_GREP" >&6; }
12930 GREP="$ac_cv_path_GREP"
12931
12932
12933  else
12934    # The variable is set, but is it from the command line or the environment?
12935
12936    # Try to remove the string !GREP! from our list.
12937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12939      # If it failed, the variable was not from the command line. Ignore it,
12940      # but warn the user (except for BASH, which is always set by the calling BASH).
12941      if test "xGREP" != xBASH; then
12942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12943$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12944      fi
12945      # Try to locate tool using the code snippet
12946      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12947$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12948if ${ac_cv_path_GREP+:} false; then :
12949  $as_echo_n "(cached) " >&6
12950else
12951  if test -z "$GREP"; then
12952  ac_path_GREP_found=false
12953  # Loop through the user's path and test for each of PROGNAME-LIST
12954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12955for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12956do
12957  IFS=$as_save_IFS
12958  test -z "$as_dir" && as_dir=.
12959    for ac_prog in grep ggrep; do
12960    for ac_exec_ext in '' $ac_executable_extensions; do
12961      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12962      as_fn_executable_p "$ac_path_GREP" || continue
12963# Check for GNU ac_path_GREP and select it if it is found.
12964  # Check for GNU $ac_path_GREP
12965case `"$ac_path_GREP" --version 2>&1` in
12966*GNU*)
12967  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12968*)
12969  ac_count=0
12970  $as_echo_n 0123456789 >"conftest.in"
12971  while :
12972  do
12973    cat "conftest.in" "conftest.in" >"conftest.tmp"
12974    mv "conftest.tmp" "conftest.in"
12975    cp "conftest.in" "conftest.nl"
12976    $as_echo 'GREP' >> "conftest.nl"
12977    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12978    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12979    as_fn_arith $ac_count + 1 && ac_count=$as_val
12980    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12981      # Best one so far, save it but keep looking for a better one
12982      ac_cv_path_GREP="$ac_path_GREP"
12983      ac_path_GREP_max=$ac_count
12984    fi
12985    # 10*(2^10) chars as input seems more than enough
12986    test $ac_count -gt 10 && break
12987  done
12988  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12989esac
12990
12991      $ac_path_GREP_found && break 3
12992    done
12993  done
12994  done
12995IFS=$as_save_IFS
12996  if test -z "$ac_cv_path_GREP"; then
12997    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12998  fi
12999else
13000  ac_cv_path_GREP=$GREP
13001fi
13002
13003fi
13004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13005$as_echo "$ac_cv_path_GREP" >&6; }
13006 GREP="$ac_cv_path_GREP"
13007
13008
13009    else
13010      # If it succeeded, then it was overridden by the user. We will use it
13011      # for the tool.
13012
13013      # First remove it from the list of overridden variables, so we can test
13014      # for unknown variables in the end.
13015      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13016
13017      # Check if we try to supply an empty value
13018      if test "x$GREP" = x; then
13019        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13020$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13021        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13022$as_echo_n "checking for GREP... " >&6; }
13023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13024$as_echo "disabled" >&6; }
13025      else
13026        # Check if the provided tool contains a complete path.
13027        tool_specified="$GREP"
13028        tool_basename="${tool_specified##*/}"
13029        if test "x$tool_basename" = "x$tool_specified"; then
13030          # A command without a complete path is provided, search $PATH.
13031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13032$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13033          # Extract the first word of "$tool_basename", so it can be a program name with args.
13034set dummy $tool_basename; ac_word=$2
13035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13036$as_echo_n "checking for $ac_word... " >&6; }
13037if ${ac_cv_path_GREP+:} false; then :
13038  $as_echo_n "(cached) " >&6
13039else
13040  case $GREP in
13041  [\\/]* | ?:[\\/]*)
13042  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13043  ;;
13044  *)
13045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13046for as_dir in $PATH
13047do
13048  IFS=$as_save_IFS
13049  test -z "$as_dir" && as_dir=.
13050    for ac_exec_ext in '' $ac_executable_extensions; do
13051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13052    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13054    break 2
13055  fi
13056done
13057  done
13058IFS=$as_save_IFS
13059
13060  ;;
13061esac
13062fi
13063GREP=$ac_cv_path_GREP
13064if test -n "$GREP"; then
13065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13066$as_echo "$GREP" >&6; }
13067else
13068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13069$as_echo "no" >&6; }
13070fi
13071
13072
13073          if test "x$GREP" = x; then
13074            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13075          fi
13076        else
13077          # Otherwise we believe it is a complete path. Use it as it is.
13078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13079$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13080          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13081$as_echo_n "checking for GREP... " >&6; }
13082          if test ! -x "$tool_specified"; then
13083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13084$as_echo "not found" >&6; }
13085            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13086          fi
13087          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13088$as_echo "$tool_specified" >&6; }
13089        fi
13090      fi
13091    fi
13092
13093  fi
13094
13095
13096  if test "x$GREP" = x; then
13097    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13098  fi
13099
13100
13101
13102
13103  # Publish this variable in the help.
13104
13105
13106  if [ -z "${EGREP+x}" ]; then
13107    # The variable is not set by user, try to locate tool using the code snippet
13108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13109$as_echo_n "checking for egrep... " >&6; }
13110if ${ac_cv_path_EGREP+:} false; then :
13111  $as_echo_n "(cached) " >&6
13112else
13113  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13114   then ac_cv_path_EGREP="$GREP -E"
13115   else
13116     if test -z "$EGREP"; then
13117  ac_path_EGREP_found=false
13118  # Loop through the user's path and test for each of PROGNAME-LIST
13119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13120for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13121do
13122  IFS=$as_save_IFS
13123  test -z "$as_dir" && as_dir=.
13124    for ac_prog in egrep; do
13125    for ac_exec_ext in '' $ac_executable_extensions; do
13126      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13127      as_fn_executable_p "$ac_path_EGREP" || continue
13128# Check for GNU ac_path_EGREP and select it if it is found.
13129  # Check for GNU $ac_path_EGREP
13130case `"$ac_path_EGREP" --version 2>&1` in
13131*GNU*)
13132  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13133*)
13134  ac_count=0
13135  $as_echo_n 0123456789 >"conftest.in"
13136  while :
13137  do
13138    cat "conftest.in" "conftest.in" >"conftest.tmp"
13139    mv "conftest.tmp" "conftest.in"
13140    cp "conftest.in" "conftest.nl"
13141    $as_echo 'EGREP' >> "conftest.nl"
13142    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13143    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13144    as_fn_arith $ac_count + 1 && ac_count=$as_val
13145    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13146      # Best one so far, save it but keep looking for a better one
13147      ac_cv_path_EGREP="$ac_path_EGREP"
13148      ac_path_EGREP_max=$ac_count
13149    fi
13150    # 10*(2^10) chars as input seems more than enough
13151    test $ac_count -gt 10 && break
13152  done
13153  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13154esac
13155
13156      $ac_path_EGREP_found && break 3
13157    done
13158  done
13159  done
13160IFS=$as_save_IFS
13161  if test -z "$ac_cv_path_EGREP"; then
13162    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13163  fi
13164else
13165  ac_cv_path_EGREP=$EGREP
13166fi
13167
13168   fi
13169fi
13170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13171$as_echo "$ac_cv_path_EGREP" >&6; }
13172 EGREP="$ac_cv_path_EGREP"
13173
13174
13175  else
13176    # The variable is set, but is it from the command line or the environment?
13177
13178    # Try to remove the string !EGREP! from our list.
13179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13181      # If it failed, the variable was not from the command line. Ignore it,
13182      # but warn the user (except for BASH, which is always set by the calling BASH).
13183      if test "xEGREP" != xBASH; then
13184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13185$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13186      fi
13187      # Try to locate tool using the code snippet
13188      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13189$as_echo_n "checking for egrep... " >&6; }
13190if ${ac_cv_path_EGREP+:} false; then :
13191  $as_echo_n "(cached) " >&6
13192else
13193  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13194   then ac_cv_path_EGREP="$GREP -E"
13195   else
13196     if test -z "$EGREP"; then
13197  ac_path_EGREP_found=false
13198  # Loop through the user's path and test for each of PROGNAME-LIST
13199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13200for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13201do
13202  IFS=$as_save_IFS
13203  test -z "$as_dir" && as_dir=.
13204    for ac_prog in egrep; do
13205    for ac_exec_ext in '' $ac_executable_extensions; do
13206      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13207      as_fn_executable_p "$ac_path_EGREP" || continue
13208# Check for GNU ac_path_EGREP and select it if it is found.
13209  # Check for GNU $ac_path_EGREP
13210case `"$ac_path_EGREP" --version 2>&1` in
13211*GNU*)
13212  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13213*)
13214  ac_count=0
13215  $as_echo_n 0123456789 >"conftest.in"
13216  while :
13217  do
13218    cat "conftest.in" "conftest.in" >"conftest.tmp"
13219    mv "conftest.tmp" "conftest.in"
13220    cp "conftest.in" "conftest.nl"
13221    $as_echo 'EGREP' >> "conftest.nl"
13222    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13223    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13224    as_fn_arith $ac_count + 1 && ac_count=$as_val
13225    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13226      # Best one so far, save it but keep looking for a better one
13227      ac_cv_path_EGREP="$ac_path_EGREP"
13228      ac_path_EGREP_max=$ac_count
13229    fi
13230    # 10*(2^10) chars as input seems more than enough
13231    test $ac_count -gt 10 && break
13232  done
13233  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13234esac
13235
13236      $ac_path_EGREP_found && break 3
13237    done
13238  done
13239  done
13240IFS=$as_save_IFS
13241  if test -z "$ac_cv_path_EGREP"; then
13242    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13243  fi
13244else
13245  ac_cv_path_EGREP=$EGREP
13246fi
13247
13248   fi
13249fi
13250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13251$as_echo "$ac_cv_path_EGREP" >&6; }
13252 EGREP="$ac_cv_path_EGREP"
13253
13254
13255    else
13256      # If it succeeded, then it was overridden by the user. We will use it
13257      # for the tool.
13258
13259      # First remove it from the list of overridden variables, so we can test
13260      # for unknown variables in the end.
13261      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13262
13263      # Check if we try to supply an empty value
13264      if test "x$EGREP" = x; then
13265        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13266$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13267        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13268$as_echo_n "checking for EGREP... " >&6; }
13269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13270$as_echo "disabled" >&6; }
13271      else
13272        # Check if the provided tool contains a complete path.
13273        tool_specified="$EGREP"
13274        tool_basename="${tool_specified##*/}"
13275        if test "x$tool_basename" = "x$tool_specified"; then
13276          # A command without a complete path is provided, search $PATH.
13277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13278$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13279          # Extract the first word of "$tool_basename", so it can be a program name with args.
13280set dummy $tool_basename; ac_word=$2
13281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13282$as_echo_n "checking for $ac_word... " >&6; }
13283if ${ac_cv_path_EGREP+:} false; then :
13284  $as_echo_n "(cached) " >&6
13285else
13286  case $EGREP in
13287  [\\/]* | ?:[\\/]*)
13288  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13289  ;;
13290  *)
13291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13292for as_dir in $PATH
13293do
13294  IFS=$as_save_IFS
13295  test -z "$as_dir" && as_dir=.
13296    for ac_exec_ext in '' $ac_executable_extensions; do
13297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13298    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13300    break 2
13301  fi
13302done
13303  done
13304IFS=$as_save_IFS
13305
13306  ;;
13307esac
13308fi
13309EGREP=$ac_cv_path_EGREP
13310if test -n "$EGREP"; then
13311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13312$as_echo "$EGREP" >&6; }
13313else
13314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13315$as_echo "no" >&6; }
13316fi
13317
13318
13319          if test "x$EGREP" = x; then
13320            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13321          fi
13322        else
13323          # Otherwise we believe it is a complete path. Use it as it is.
13324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13325$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13326          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13327$as_echo_n "checking for EGREP... " >&6; }
13328          if test ! -x "$tool_specified"; then
13329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13330$as_echo "not found" >&6; }
13331            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13332          fi
13333          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13334$as_echo "$tool_specified" >&6; }
13335        fi
13336      fi
13337    fi
13338
13339  fi
13340
13341
13342  if test "x$EGREP" = x; then
13343    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13344  fi
13345
13346
13347
13348
13349  # Publish this variable in the help.
13350
13351
13352  if [ -z "${FGREP+x}" ]; then
13353    # The variable is not set by user, try to locate tool using the code snippet
13354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13355$as_echo_n "checking for fgrep... " >&6; }
13356if ${ac_cv_path_FGREP+:} false; then :
13357  $as_echo_n "(cached) " >&6
13358else
13359  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13360   then ac_cv_path_FGREP="$GREP -F"
13361   else
13362     if test -z "$FGREP"; then
13363  ac_path_FGREP_found=false
13364  # Loop through the user's path and test for each of PROGNAME-LIST
13365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13366for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13367do
13368  IFS=$as_save_IFS
13369  test -z "$as_dir" && as_dir=.
13370    for ac_prog in fgrep; do
13371    for ac_exec_ext in '' $ac_executable_extensions; do
13372      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13373      as_fn_executable_p "$ac_path_FGREP" || continue
13374# Check for GNU ac_path_FGREP and select it if it is found.
13375  # Check for GNU $ac_path_FGREP
13376case `"$ac_path_FGREP" --version 2>&1` in
13377*GNU*)
13378  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13379*)
13380  ac_count=0
13381  $as_echo_n 0123456789 >"conftest.in"
13382  while :
13383  do
13384    cat "conftest.in" "conftest.in" >"conftest.tmp"
13385    mv "conftest.tmp" "conftest.in"
13386    cp "conftest.in" "conftest.nl"
13387    $as_echo 'FGREP' >> "conftest.nl"
13388    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13389    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13390    as_fn_arith $ac_count + 1 && ac_count=$as_val
13391    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13392      # Best one so far, save it but keep looking for a better one
13393      ac_cv_path_FGREP="$ac_path_FGREP"
13394      ac_path_FGREP_max=$ac_count
13395    fi
13396    # 10*(2^10) chars as input seems more than enough
13397    test $ac_count -gt 10 && break
13398  done
13399  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13400esac
13401
13402      $ac_path_FGREP_found && break 3
13403    done
13404  done
13405  done
13406IFS=$as_save_IFS
13407  if test -z "$ac_cv_path_FGREP"; then
13408    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13409  fi
13410else
13411  ac_cv_path_FGREP=$FGREP
13412fi
13413
13414   fi
13415fi
13416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13417$as_echo "$ac_cv_path_FGREP" >&6; }
13418 FGREP="$ac_cv_path_FGREP"
13419
13420
13421  else
13422    # The variable is set, but is it from the command line or the environment?
13423
13424    # Try to remove the string !FGREP! from our list.
13425    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13426    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13427      # If it failed, the variable was not from the command line. Ignore it,
13428      # but warn the user (except for BASH, which is always set by the calling BASH).
13429      if test "xFGREP" != xBASH; then
13430        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13431$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13432      fi
13433      # Try to locate tool using the code snippet
13434      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13435$as_echo_n "checking for fgrep... " >&6; }
13436if ${ac_cv_path_FGREP+:} false; then :
13437  $as_echo_n "(cached) " >&6
13438else
13439  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13440   then ac_cv_path_FGREP="$GREP -F"
13441   else
13442     if test -z "$FGREP"; then
13443  ac_path_FGREP_found=false
13444  # Loop through the user's path and test for each of PROGNAME-LIST
13445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13446for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13447do
13448  IFS=$as_save_IFS
13449  test -z "$as_dir" && as_dir=.
13450    for ac_prog in fgrep; do
13451    for ac_exec_ext in '' $ac_executable_extensions; do
13452      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13453      as_fn_executable_p "$ac_path_FGREP" || continue
13454# Check for GNU ac_path_FGREP and select it if it is found.
13455  # Check for GNU $ac_path_FGREP
13456case `"$ac_path_FGREP" --version 2>&1` in
13457*GNU*)
13458  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13459*)
13460  ac_count=0
13461  $as_echo_n 0123456789 >"conftest.in"
13462  while :
13463  do
13464    cat "conftest.in" "conftest.in" >"conftest.tmp"
13465    mv "conftest.tmp" "conftest.in"
13466    cp "conftest.in" "conftest.nl"
13467    $as_echo 'FGREP' >> "conftest.nl"
13468    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13469    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13470    as_fn_arith $ac_count + 1 && ac_count=$as_val
13471    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13472      # Best one so far, save it but keep looking for a better one
13473      ac_cv_path_FGREP="$ac_path_FGREP"
13474      ac_path_FGREP_max=$ac_count
13475    fi
13476    # 10*(2^10) chars as input seems more than enough
13477    test $ac_count -gt 10 && break
13478  done
13479  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13480esac
13481
13482      $ac_path_FGREP_found && break 3
13483    done
13484  done
13485  done
13486IFS=$as_save_IFS
13487  if test -z "$ac_cv_path_FGREP"; then
13488    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13489  fi
13490else
13491  ac_cv_path_FGREP=$FGREP
13492fi
13493
13494   fi
13495fi
13496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13497$as_echo "$ac_cv_path_FGREP" >&6; }
13498 FGREP="$ac_cv_path_FGREP"
13499
13500
13501    else
13502      # If it succeeded, then it was overridden by the user. We will use it
13503      # for the tool.
13504
13505      # First remove it from the list of overridden variables, so we can test
13506      # for unknown variables in the end.
13507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13508
13509      # Check if we try to supply an empty value
13510      if test "x$FGREP" = x; then
13511        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13512$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13514$as_echo_n "checking for FGREP... " >&6; }
13515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13516$as_echo "disabled" >&6; }
13517      else
13518        # Check if the provided tool contains a complete path.
13519        tool_specified="$FGREP"
13520        tool_basename="${tool_specified##*/}"
13521        if test "x$tool_basename" = "x$tool_specified"; then
13522          # A command without a complete path is provided, search $PATH.
13523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13524$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13525          # Extract the first word of "$tool_basename", so it can be a program name with args.
13526set dummy $tool_basename; ac_word=$2
13527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13528$as_echo_n "checking for $ac_word... " >&6; }
13529if ${ac_cv_path_FGREP+:} false; then :
13530  $as_echo_n "(cached) " >&6
13531else
13532  case $FGREP in
13533  [\\/]* | ?:[\\/]*)
13534  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13535  ;;
13536  *)
13537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13538for as_dir in $PATH
13539do
13540  IFS=$as_save_IFS
13541  test -z "$as_dir" && as_dir=.
13542    for ac_exec_ext in '' $ac_executable_extensions; do
13543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13544    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13546    break 2
13547  fi
13548done
13549  done
13550IFS=$as_save_IFS
13551
13552  ;;
13553esac
13554fi
13555FGREP=$ac_cv_path_FGREP
13556if test -n "$FGREP"; then
13557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13558$as_echo "$FGREP" >&6; }
13559else
13560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13561$as_echo "no" >&6; }
13562fi
13563
13564
13565          if test "x$FGREP" = x; then
13566            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13567          fi
13568        else
13569          # Otherwise we believe it is a complete path. Use it as it is.
13570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13571$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13572          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13573$as_echo_n "checking for FGREP... " >&6; }
13574          if test ! -x "$tool_specified"; then
13575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13576$as_echo "not found" >&6; }
13577            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13578          fi
13579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13580$as_echo "$tool_specified" >&6; }
13581        fi
13582      fi
13583    fi
13584
13585  fi
13586
13587
13588  if test "x$FGREP" = x; then
13589    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13590  fi
13591
13592
13593
13594
13595  # Publish this variable in the help.
13596
13597
13598  if [ -z "${SED+x}" ]; then
13599    # The variable is not set by user, try to locate tool using the code snippet
13600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13601$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13602if ${ac_cv_path_SED+:} false; then :
13603  $as_echo_n "(cached) " >&6
13604else
13605            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13606     for ac_i in 1 2 3 4 5 6 7; do
13607       ac_script="$ac_script$as_nl$ac_script"
13608     done
13609     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13610     { ac_script=; unset ac_script;}
13611     if test -z "$SED"; then
13612  ac_path_SED_found=false
13613  # Loop through the user's path and test for each of PROGNAME-LIST
13614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13615for as_dir in $PATH
13616do
13617  IFS=$as_save_IFS
13618  test -z "$as_dir" && as_dir=.
13619    for ac_prog in sed gsed; do
13620    for ac_exec_ext in '' $ac_executable_extensions; do
13621      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13622      as_fn_executable_p "$ac_path_SED" || continue
13623# Check for GNU ac_path_SED and select it if it is found.
13624  # Check for GNU $ac_path_SED
13625case `"$ac_path_SED" --version 2>&1` in
13626*GNU*)
13627  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13628*)
13629  ac_count=0
13630  $as_echo_n 0123456789 >"conftest.in"
13631  while :
13632  do
13633    cat "conftest.in" "conftest.in" >"conftest.tmp"
13634    mv "conftest.tmp" "conftest.in"
13635    cp "conftest.in" "conftest.nl"
13636    $as_echo '' >> "conftest.nl"
13637    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13638    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13639    as_fn_arith $ac_count + 1 && ac_count=$as_val
13640    if test $ac_count -gt ${ac_path_SED_max-0}; then
13641      # Best one so far, save it but keep looking for a better one
13642      ac_cv_path_SED="$ac_path_SED"
13643      ac_path_SED_max=$ac_count
13644    fi
13645    # 10*(2^10) chars as input seems more than enough
13646    test $ac_count -gt 10 && break
13647  done
13648  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13649esac
13650
13651      $ac_path_SED_found && break 3
13652    done
13653  done
13654  done
13655IFS=$as_save_IFS
13656  if test -z "$ac_cv_path_SED"; then
13657    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13658  fi
13659else
13660  ac_cv_path_SED=$SED
13661fi
13662
13663fi
13664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13665$as_echo "$ac_cv_path_SED" >&6; }
13666 SED="$ac_cv_path_SED"
13667  rm -f conftest.sed
13668
13669  else
13670    # The variable is set, but is it from the command line or the environment?
13671
13672    # Try to remove the string !SED! from our list.
13673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13675      # If it failed, the variable was not from the command line. Ignore it,
13676      # but warn the user (except for BASH, which is always set by the calling BASH).
13677      if test "xSED" != xBASH; then
13678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13679$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13680      fi
13681      # Try to locate tool using the code snippet
13682      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13683$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13684if ${ac_cv_path_SED+:} false; then :
13685  $as_echo_n "(cached) " >&6
13686else
13687            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13688     for ac_i in 1 2 3 4 5 6 7; do
13689       ac_script="$ac_script$as_nl$ac_script"
13690     done
13691     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13692     { ac_script=; unset ac_script;}
13693     if test -z "$SED"; then
13694  ac_path_SED_found=false
13695  # Loop through the user's path and test for each of PROGNAME-LIST
13696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13697for as_dir in $PATH
13698do
13699  IFS=$as_save_IFS
13700  test -z "$as_dir" && as_dir=.
13701    for ac_prog in sed gsed; do
13702    for ac_exec_ext in '' $ac_executable_extensions; do
13703      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13704      as_fn_executable_p "$ac_path_SED" || continue
13705# Check for GNU ac_path_SED and select it if it is found.
13706  # Check for GNU $ac_path_SED
13707case `"$ac_path_SED" --version 2>&1` in
13708*GNU*)
13709  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13710*)
13711  ac_count=0
13712  $as_echo_n 0123456789 >"conftest.in"
13713  while :
13714  do
13715    cat "conftest.in" "conftest.in" >"conftest.tmp"
13716    mv "conftest.tmp" "conftest.in"
13717    cp "conftest.in" "conftest.nl"
13718    $as_echo '' >> "conftest.nl"
13719    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13720    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13721    as_fn_arith $ac_count + 1 && ac_count=$as_val
13722    if test $ac_count -gt ${ac_path_SED_max-0}; then
13723      # Best one so far, save it but keep looking for a better one
13724      ac_cv_path_SED="$ac_path_SED"
13725      ac_path_SED_max=$ac_count
13726    fi
13727    # 10*(2^10) chars as input seems more than enough
13728    test $ac_count -gt 10 && break
13729  done
13730  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13731esac
13732
13733      $ac_path_SED_found && break 3
13734    done
13735  done
13736  done
13737IFS=$as_save_IFS
13738  if test -z "$ac_cv_path_SED"; then
13739    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13740  fi
13741else
13742  ac_cv_path_SED=$SED
13743fi
13744
13745fi
13746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13747$as_echo "$ac_cv_path_SED" >&6; }
13748 SED="$ac_cv_path_SED"
13749  rm -f conftest.sed
13750
13751    else
13752      # If it succeeded, then it was overridden by the user. We will use it
13753      # for the tool.
13754
13755      # First remove it from the list of overridden variables, so we can test
13756      # for unknown variables in the end.
13757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13758
13759      # Check if we try to supply an empty value
13760      if test "x$SED" = x; then
13761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13762$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13764$as_echo_n "checking for SED... " >&6; }
13765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13766$as_echo "disabled" >&6; }
13767      else
13768        # Check if the provided tool contains a complete path.
13769        tool_specified="$SED"
13770        tool_basename="${tool_specified##*/}"
13771        if test "x$tool_basename" = "x$tool_specified"; then
13772          # A command without a complete path is provided, search $PATH.
13773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13774$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13775          # Extract the first word of "$tool_basename", so it can be a program name with args.
13776set dummy $tool_basename; ac_word=$2
13777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13778$as_echo_n "checking for $ac_word... " >&6; }
13779if ${ac_cv_path_SED+:} false; then :
13780  $as_echo_n "(cached) " >&6
13781else
13782  case $SED in
13783  [\\/]* | ?:[\\/]*)
13784  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13785  ;;
13786  *)
13787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13788for as_dir in $PATH
13789do
13790  IFS=$as_save_IFS
13791  test -z "$as_dir" && as_dir=.
13792    for ac_exec_ext in '' $ac_executable_extensions; do
13793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13794    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13796    break 2
13797  fi
13798done
13799  done
13800IFS=$as_save_IFS
13801
13802  ;;
13803esac
13804fi
13805SED=$ac_cv_path_SED
13806if test -n "$SED"; then
13807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13808$as_echo "$SED" >&6; }
13809else
13810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13811$as_echo "no" >&6; }
13812fi
13813
13814
13815          if test "x$SED" = x; then
13816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13817          fi
13818        else
13819          # Otherwise we believe it is a complete path. Use it as it is.
13820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13821$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13823$as_echo_n "checking for SED... " >&6; }
13824          if test ! -x "$tool_specified"; then
13825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13826$as_echo "not found" >&6; }
13827            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13828          fi
13829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13830$as_echo "$tool_specified" >&6; }
13831        fi
13832      fi
13833    fi
13834
13835  fi
13836
13837
13838  if test "x$SED" = x; then
13839    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13840  fi
13841
13842
13843
13844  # Always force rm.
13845  RM="$RM -f"
13846
13847  # pwd behaves differently on various platforms and some don't support the -L flag.
13848  # Always use the bash builtin pwd to get uniform behavior.
13849  THEPWDCMD=pwd
13850
13851  # These are not required on all platforms
13852
13853
13854  # Publish this variable in the help.
13855
13856
13857  if [ -z "${CYGPATH+x}" ]; then
13858    # The variable is not set by user, try to locate tool using the code snippet
13859    for ac_prog in cygpath
13860do
13861  # Extract the first word of "$ac_prog", so it can be a program name with args.
13862set dummy $ac_prog; ac_word=$2
13863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13864$as_echo_n "checking for $ac_word... " >&6; }
13865if ${ac_cv_path_CYGPATH+:} false; then :
13866  $as_echo_n "(cached) " >&6
13867else
13868  case $CYGPATH in
13869  [\\/]* | ?:[\\/]*)
13870  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13871  ;;
13872  *)
13873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13874for as_dir in $PATH
13875do
13876  IFS=$as_save_IFS
13877  test -z "$as_dir" && as_dir=.
13878    for ac_exec_ext in '' $ac_executable_extensions; do
13879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13880    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13882    break 2
13883  fi
13884done
13885  done
13886IFS=$as_save_IFS
13887
13888  ;;
13889esac
13890fi
13891CYGPATH=$ac_cv_path_CYGPATH
13892if test -n "$CYGPATH"; then
13893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13894$as_echo "$CYGPATH" >&6; }
13895else
13896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13897$as_echo "no" >&6; }
13898fi
13899
13900
13901  test -n "$CYGPATH" && break
13902done
13903
13904  else
13905    # The variable is set, but is it from the command line or the environment?
13906
13907    # Try to remove the string !CYGPATH! from our list.
13908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13910      # If it failed, the variable was not from the command line. Ignore it,
13911      # but warn the user (except for BASH, which is always set by the calling BASH).
13912      if test "xCYGPATH" != xBASH; then
13913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13914$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13915      fi
13916      # Try to locate tool using the code snippet
13917      for ac_prog in cygpath
13918do
13919  # Extract the first word of "$ac_prog", so it can be a program name with args.
13920set dummy $ac_prog; ac_word=$2
13921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13922$as_echo_n "checking for $ac_word... " >&6; }
13923if ${ac_cv_path_CYGPATH+:} false; then :
13924  $as_echo_n "(cached) " >&6
13925else
13926  case $CYGPATH in
13927  [\\/]* | ?:[\\/]*)
13928  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13929  ;;
13930  *)
13931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13932for as_dir in $PATH
13933do
13934  IFS=$as_save_IFS
13935  test -z "$as_dir" && as_dir=.
13936    for ac_exec_ext in '' $ac_executable_extensions; do
13937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13938    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13940    break 2
13941  fi
13942done
13943  done
13944IFS=$as_save_IFS
13945
13946  ;;
13947esac
13948fi
13949CYGPATH=$ac_cv_path_CYGPATH
13950if test -n "$CYGPATH"; then
13951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13952$as_echo "$CYGPATH" >&6; }
13953else
13954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13955$as_echo "no" >&6; }
13956fi
13957
13958
13959  test -n "$CYGPATH" && break
13960done
13961
13962    else
13963      # If it succeeded, then it was overridden by the user. We will use it
13964      # for the tool.
13965
13966      # First remove it from the list of overridden variables, so we can test
13967      # for unknown variables in the end.
13968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13969
13970      # Check if we try to supply an empty value
13971      if test "x$CYGPATH" = x; then
13972        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13973$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13975$as_echo_n "checking for CYGPATH... " >&6; }
13976        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13977$as_echo "disabled" >&6; }
13978      else
13979        # Check if the provided tool contains a complete path.
13980        tool_specified="$CYGPATH"
13981        tool_basename="${tool_specified##*/}"
13982        if test "x$tool_basename" = "x$tool_specified"; then
13983          # A command without a complete path is provided, search $PATH.
13984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13985$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13986          # Extract the first word of "$tool_basename", so it can be a program name with args.
13987set dummy $tool_basename; ac_word=$2
13988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13989$as_echo_n "checking for $ac_word... " >&6; }
13990if ${ac_cv_path_CYGPATH+:} false; then :
13991  $as_echo_n "(cached) " >&6
13992else
13993  case $CYGPATH in
13994  [\\/]* | ?:[\\/]*)
13995  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13996  ;;
13997  *)
13998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13999for as_dir in $PATH
14000do
14001  IFS=$as_save_IFS
14002  test -z "$as_dir" && as_dir=.
14003    for ac_exec_ext in '' $ac_executable_extensions; do
14004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14005    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14007    break 2
14008  fi
14009done
14010  done
14011IFS=$as_save_IFS
14012
14013  ;;
14014esac
14015fi
14016CYGPATH=$ac_cv_path_CYGPATH
14017if test -n "$CYGPATH"; then
14018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14019$as_echo "$CYGPATH" >&6; }
14020else
14021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14022$as_echo "no" >&6; }
14023fi
14024
14025
14026          if test "x$CYGPATH" = x; then
14027            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14028          fi
14029        else
14030          # Otherwise we believe it is a complete path. Use it as it is.
14031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14032$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14033          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14034$as_echo_n "checking for CYGPATH... " >&6; }
14035          if test ! -x "$tool_specified"; then
14036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14037$as_echo "not found" >&6; }
14038            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14039          fi
14040          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14041$as_echo "$tool_specified" >&6; }
14042        fi
14043      fi
14044    fi
14045
14046  fi
14047
14048
14049
14050
14051  # Publish this variable in the help.
14052
14053
14054  if [ -z "${READLINK+x}" ]; then
14055    # The variable is not set by user, try to locate tool using the code snippet
14056    for ac_prog in greadlink readlink
14057do
14058  # Extract the first word of "$ac_prog", so it can be a program name with args.
14059set dummy $ac_prog; ac_word=$2
14060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14061$as_echo_n "checking for $ac_word... " >&6; }
14062if ${ac_cv_path_READLINK+:} false; then :
14063  $as_echo_n "(cached) " >&6
14064else
14065  case $READLINK in
14066  [\\/]* | ?:[\\/]*)
14067  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14068  ;;
14069  *)
14070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14071for as_dir in $PATH
14072do
14073  IFS=$as_save_IFS
14074  test -z "$as_dir" && as_dir=.
14075    for ac_exec_ext in '' $ac_executable_extensions; do
14076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14077    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14079    break 2
14080  fi
14081done
14082  done
14083IFS=$as_save_IFS
14084
14085  ;;
14086esac
14087fi
14088READLINK=$ac_cv_path_READLINK
14089if test -n "$READLINK"; then
14090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14091$as_echo "$READLINK" >&6; }
14092else
14093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14094$as_echo "no" >&6; }
14095fi
14096
14097
14098  test -n "$READLINK" && break
14099done
14100
14101  else
14102    # The variable is set, but is it from the command line or the environment?
14103
14104    # Try to remove the string !READLINK! from our list.
14105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14107      # If it failed, the variable was not from the command line. Ignore it,
14108      # but warn the user (except for BASH, which is always set by the calling BASH).
14109      if test "xREADLINK" != xBASH; then
14110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14111$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14112      fi
14113      # Try to locate tool using the code snippet
14114      for ac_prog in greadlink readlink
14115do
14116  # Extract the first word of "$ac_prog", so it can be a program name with args.
14117set dummy $ac_prog; ac_word=$2
14118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14119$as_echo_n "checking for $ac_word... " >&6; }
14120if ${ac_cv_path_READLINK+:} false; then :
14121  $as_echo_n "(cached) " >&6
14122else
14123  case $READLINK in
14124  [\\/]* | ?:[\\/]*)
14125  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14126  ;;
14127  *)
14128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14129for as_dir in $PATH
14130do
14131  IFS=$as_save_IFS
14132  test -z "$as_dir" && as_dir=.
14133    for ac_exec_ext in '' $ac_executable_extensions; do
14134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14135    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14137    break 2
14138  fi
14139done
14140  done
14141IFS=$as_save_IFS
14142
14143  ;;
14144esac
14145fi
14146READLINK=$ac_cv_path_READLINK
14147if test -n "$READLINK"; then
14148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14149$as_echo "$READLINK" >&6; }
14150else
14151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14152$as_echo "no" >&6; }
14153fi
14154
14155
14156  test -n "$READLINK" && break
14157done
14158
14159    else
14160      # If it succeeded, then it was overridden by the user. We will use it
14161      # for the tool.
14162
14163      # First remove it from the list of overridden variables, so we can test
14164      # for unknown variables in the end.
14165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14166
14167      # Check if we try to supply an empty value
14168      if test "x$READLINK" = x; then
14169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14170$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14172$as_echo_n "checking for READLINK... " >&6; }
14173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14174$as_echo "disabled" >&6; }
14175      else
14176        # Check if the provided tool contains a complete path.
14177        tool_specified="$READLINK"
14178        tool_basename="${tool_specified##*/}"
14179        if test "x$tool_basename" = "x$tool_specified"; then
14180          # A command without a complete path is provided, search $PATH.
14181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14182$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14183          # Extract the first word of "$tool_basename", so it can be a program name with args.
14184set dummy $tool_basename; ac_word=$2
14185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14186$as_echo_n "checking for $ac_word... " >&6; }
14187if ${ac_cv_path_READLINK+:} false; then :
14188  $as_echo_n "(cached) " >&6
14189else
14190  case $READLINK in
14191  [\\/]* | ?:[\\/]*)
14192  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14193  ;;
14194  *)
14195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14196for as_dir in $PATH
14197do
14198  IFS=$as_save_IFS
14199  test -z "$as_dir" && as_dir=.
14200    for ac_exec_ext in '' $ac_executable_extensions; do
14201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14202    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14204    break 2
14205  fi
14206done
14207  done
14208IFS=$as_save_IFS
14209
14210  ;;
14211esac
14212fi
14213READLINK=$ac_cv_path_READLINK
14214if test -n "$READLINK"; then
14215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14216$as_echo "$READLINK" >&6; }
14217else
14218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14219$as_echo "no" >&6; }
14220fi
14221
14222
14223          if test "x$READLINK" = x; then
14224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14225          fi
14226        else
14227          # Otherwise we believe it is a complete path. Use it as it is.
14228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14229$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14231$as_echo_n "checking for READLINK... " >&6; }
14232          if test ! -x "$tool_specified"; then
14233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14234$as_echo "not found" >&6; }
14235            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14236          fi
14237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14238$as_echo "$tool_specified" >&6; }
14239        fi
14240      fi
14241    fi
14242
14243  fi
14244
14245
14246
14247
14248  # Publish this variable in the help.
14249
14250
14251  if [ -z "${DF+x}" ]; then
14252    # The variable is not set by user, try to locate tool using the code snippet
14253    for ac_prog in df
14254do
14255  # Extract the first word of "$ac_prog", so it can be a program name with args.
14256set dummy $ac_prog; ac_word=$2
14257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14258$as_echo_n "checking for $ac_word... " >&6; }
14259if ${ac_cv_path_DF+:} false; then :
14260  $as_echo_n "(cached) " >&6
14261else
14262  case $DF in
14263  [\\/]* | ?:[\\/]*)
14264  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14265  ;;
14266  *)
14267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14268for as_dir in $PATH
14269do
14270  IFS=$as_save_IFS
14271  test -z "$as_dir" && as_dir=.
14272    for ac_exec_ext in '' $ac_executable_extensions; do
14273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14274    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14276    break 2
14277  fi
14278done
14279  done
14280IFS=$as_save_IFS
14281
14282  ;;
14283esac
14284fi
14285DF=$ac_cv_path_DF
14286if test -n "$DF"; then
14287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14288$as_echo "$DF" >&6; }
14289else
14290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14291$as_echo "no" >&6; }
14292fi
14293
14294
14295  test -n "$DF" && break
14296done
14297
14298  else
14299    # The variable is set, but is it from the command line or the environment?
14300
14301    # Try to remove the string !DF! from our list.
14302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14304      # If it failed, the variable was not from the command line. Ignore it,
14305      # but warn the user (except for BASH, which is always set by the calling BASH).
14306      if test "xDF" != xBASH; then
14307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14308$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14309      fi
14310      # Try to locate tool using the code snippet
14311      for ac_prog in df
14312do
14313  # Extract the first word of "$ac_prog", so it can be a program name with args.
14314set dummy $ac_prog; ac_word=$2
14315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14316$as_echo_n "checking for $ac_word... " >&6; }
14317if ${ac_cv_path_DF+:} false; then :
14318  $as_echo_n "(cached) " >&6
14319else
14320  case $DF in
14321  [\\/]* | ?:[\\/]*)
14322  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14323  ;;
14324  *)
14325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14326for as_dir in $PATH
14327do
14328  IFS=$as_save_IFS
14329  test -z "$as_dir" && as_dir=.
14330    for ac_exec_ext in '' $ac_executable_extensions; do
14331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14332    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14334    break 2
14335  fi
14336done
14337  done
14338IFS=$as_save_IFS
14339
14340  ;;
14341esac
14342fi
14343DF=$ac_cv_path_DF
14344if test -n "$DF"; then
14345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14346$as_echo "$DF" >&6; }
14347else
14348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14349$as_echo "no" >&6; }
14350fi
14351
14352
14353  test -n "$DF" && break
14354done
14355
14356    else
14357      # If it succeeded, then it was overridden by the user. We will use it
14358      # for the tool.
14359
14360      # First remove it from the list of overridden variables, so we can test
14361      # for unknown variables in the end.
14362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14363
14364      # Check if we try to supply an empty value
14365      if test "x$DF" = x; then
14366        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14367$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14369$as_echo_n "checking for DF... " >&6; }
14370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14371$as_echo "disabled" >&6; }
14372      else
14373        # Check if the provided tool contains a complete path.
14374        tool_specified="$DF"
14375        tool_basename="${tool_specified##*/}"
14376        if test "x$tool_basename" = "x$tool_specified"; then
14377          # A command without a complete path is provided, search $PATH.
14378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14379$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14380          # Extract the first word of "$tool_basename", so it can be a program name with args.
14381set dummy $tool_basename; ac_word=$2
14382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14383$as_echo_n "checking for $ac_word... " >&6; }
14384if ${ac_cv_path_DF+:} false; then :
14385  $as_echo_n "(cached) " >&6
14386else
14387  case $DF in
14388  [\\/]* | ?:[\\/]*)
14389  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14390  ;;
14391  *)
14392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14393for as_dir in $PATH
14394do
14395  IFS=$as_save_IFS
14396  test -z "$as_dir" && as_dir=.
14397    for ac_exec_ext in '' $ac_executable_extensions; do
14398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14399    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14401    break 2
14402  fi
14403done
14404  done
14405IFS=$as_save_IFS
14406
14407  ;;
14408esac
14409fi
14410DF=$ac_cv_path_DF
14411if test -n "$DF"; then
14412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14413$as_echo "$DF" >&6; }
14414else
14415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14416$as_echo "no" >&6; }
14417fi
14418
14419
14420          if test "x$DF" = x; then
14421            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14422          fi
14423        else
14424          # Otherwise we believe it is a complete path. Use it as it is.
14425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14426$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14427          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14428$as_echo_n "checking for DF... " >&6; }
14429          if test ! -x "$tool_specified"; then
14430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14431$as_echo "not found" >&6; }
14432            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14433          fi
14434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14435$as_echo "$tool_specified" >&6; }
14436        fi
14437      fi
14438    fi
14439
14440  fi
14441
14442
14443
14444
14445  # Publish this variable in the help.
14446
14447
14448  if [ -z "${CPIO+x}" ]; then
14449    # The variable is not set by user, try to locate tool using the code snippet
14450    for ac_prog in cpio bsdcpio
14451do
14452  # Extract the first word of "$ac_prog", so it can be a program name with args.
14453set dummy $ac_prog; ac_word=$2
14454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14455$as_echo_n "checking for $ac_word... " >&6; }
14456if ${ac_cv_path_CPIO+:} false; then :
14457  $as_echo_n "(cached) " >&6
14458else
14459  case $CPIO in
14460  [\\/]* | ?:[\\/]*)
14461  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14462  ;;
14463  *)
14464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14465for as_dir in $PATH
14466do
14467  IFS=$as_save_IFS
14468  test -z "$as_dir" && as_dir=.
14469    for ac_exec_ext in '' $ac_executable_extensions; do
14470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14471    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14473    break 2
14474  fi
14475done
14476  done
14477IFS=$as_save_IFS
14478
14479  ;;
14480esac
14481fi
14482CPIO=$ac_cv_path_CPIO
14483if test -n "$CPIO"; then
14484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14485$as_echo "$CPIO" >&6; }
14486else
14487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14488$as_echo "no" >&6; }
14489fi
14490
14491
14492  test -n "$CPIO" && break
14493done
14494
14495  else
14496    # The variable is set, but is it from the command line or the environment?
14497
14498    # Try to remove the string !CPIO! from our list.
14499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14501      # If it failed, the variable was not from the command line. Ignore it,
14502      # but warn the user (except for BASH, which is always set by the calling BASH).
14503      if test "xCPIO" != xBASH; then
14504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14505$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14506      fi
14507      # Try to locate tool using the code snippet
14508      for ac_prog in cpio bsdcpio
14509do
14510  # Extract the first word of "$ac_prog", so it can be a program name with args.
14511set dummy $ac_prog; ac_word=$2
14512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14513$as_echo_n "checking for $ac_word... " >&6; }
14514if ${ac_cv_path_CPIO+:} false; then :
14515  $as_echo_n "(cached) " >&6
14516else
14517  case $CPIO in
14518  [\\/]* | ?:[\\/]*)
14519  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14520  ;;
14521  *)
14522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14523for as_dir in $PATH
14524do
14525  IFS=$as_save_IFS
14526  test -z "$as_dir" && as_dir=.
14527    for ac_exec_ext in '' $ac_executable_extensions; do
14528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14529    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14531    break 2
14532  fi
14533done
14534  done
14535IFS=$as_save_IFS
14536
14537  ;;
14538esac
14539fi
14540CPIO=$ac_cv_path_CPIO
14541if test -n "$CPIO"; then
14542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14543$as_echo "$CPIO" >&6; }
14544else
14545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14546$as_echo "no" >&6; }
14547fi
14548
14549
14550  test -n "$CPIO" && break
14551done
14552
14553    else
14554      # If it succeeded, then it was overridden by the user. We will use it
14555      # for the tool.
14556
14557      # First remove it from the list of overridden variables, so we can test
14558      # for unknown variables in the end.
14559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14560
14561      # Check if we try to supply an empty value
14562      if test "x$CPIO" = x; then
14563        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14564$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14566$as_echo_n "checking for CPIO... " >&6; }
14567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14568$as_echo "disabled" >&6; }
14569      else
14570        # Check if the provided tool contains a complete path.
14571        tool_specified="$CPIO"
14572        tool_basename="${tool_specified##*/}"
14573        if test "x$tool_basename" = "x$tool_specified"; then
14574          # A command without a complete path is provided, search $PATH.
14575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14576$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14577          # Extract the first word of "$tool_basename", so it can be a program name with args.
14578set dummy $tool_basename; ac_word=$2
14579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14580$as_echo_n "checking for $ac_word... " >&6; }
14581if ${ac_cv_path_CPIO+:} false; then :
14582  $as_echo_n "(cached) " >&6
14583else
14584  case $CPIO in
14585  [\\/]* | ?:[\\/]*)
14586  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14587  ;;
14588  *)
14589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14590for as_dir in $PATH
14591do
14592  IFS=$as_save_IFS
14593  test -z "$as_dir" && as_dir=.
14594    for ac_exec_ext in '' $ac_executable_extensions; do
14595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14596    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14598    break 2
14599  fi
14600done
14601  done
14602IFS=$as_save_IFS
14603
14604  ;;
14605esac
14606fi
14607CPIO=$ac_cv_path_CPIO
14608if test -n "$CPIO"; then
14609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14610$as_echo "$CPIO" >&6; }
14611else
14612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14613$as_echo "no" >&6; }
14614fi
14615
14616
14617          if test "x$CPIO" = x; then
14618            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14619          fi
14620        else
14621          # Otherwise we believe it is a complete path. Use it as it is.
14622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14623$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14624          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14625$as_echo_n "checking for CPIO... " >&6; }
14626          if test ! -x "$tool_specified"; then
14627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14628$as_echo "not found" >&6; }
14629            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14630          fi
14631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14632$as_echo "$tool_specified" >&6; }
14633        fi
14634      fi
14635    fi
14636
14637  fi
14638
14639
14640
14641
14642  # Publish this variable in the help.
14643
14644
14645  if [ -z "${NICE+x}" ]; then
14646    # The variable is not set by user, try to locate tool using the code snippet
14647    for ac_prog in nice
14648do
14649  # Extract the first word of "$ac_prog", so it can be a program name with args.
14650set dummy $ac_prog; ac_word=$2
14651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14652$as_echo_n "checking for $ac_word... " >&6; }
14653if ${ac_cv_path_NICE+:} false; then :
14654  $as_echo_n "(cached) " >&6
14655else
14656  case $NICE in
14657  [\\/]* | ?:[\\/]*)
14658  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14659  ;;
14660  *)
14661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14662for as_dir in $PATH
14663do
14664  IFS=$as_save_IFS
14665  test -z "$as_dir" && as_dir=.
14666    for ac_exec_ext in '' $ac_executable_extensions; do
14667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14668    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14670    break 2
14671  fi
14672done
14673  done
14674IFS=$as_save_IFS
14675
14676  ;;
14677esac
14678fi
14679NICE=$ac_cv_path_NICE
14680if test -n "$NICE"; then
14681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14682$as_echo "$NICE" >&6; }
14683else
14684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14685$as_echo "no" >&6; }
14686fi
14687
14688
14689  test -n "$NICE" && break
14690done
14691
14692  else
14693    # The variable is set, but is it from the command line or the environment?
14694
14695    # Try to remove the string !NICE! from our list.
14696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14698      # If it failed, the variable was not from the command line. Ignore it,
14699      # but warn the user (except for BASH, which is always set by the calling BASH).
14700      if test "xNICE" != xBASH; then
14701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14702$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14703      fi
14704      # Try to locate tool using the code snippet
14705      for ac_prog in nice
14706do
14707  # Extract the first word of "$ac_prog", so it can be a program name with args.
14708set dummy $ac_prog; ac_word=$2
14709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14710$as_echo_n "checking for $ac_word... " >&6; }
14711if ${ac_cv_path_NICE+:} false; then :
14712  $as_echo_n "(cached) " >&6
14713else
14714  case $NICE in
14715  [\\/]* | ?:[\\/]*)
14716  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14717  ;;
14718  *)
14719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14720for as_dir in $PATH
14721do
14722  IFS=$as_save_IFS
14723  test -z "$as_dir" && as_dir=.
14724    for ac_exec_ext in '' $ac_executable_extensions; do
14725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14726    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14728    break 2
14729  fi
14730done
14731  done
14732IFS=$as_save_IFS
14733
14734  ;;
14735esac
14736fi
14737NICE=$ac_cv_path_NICE
14738if test -n "$NICE"; then
14739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14740$as_echo "$NICE" >&6; }
14741else
14742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14743$as_echo "no" >&6; }
14744fi
14745
14746
14747  test -n "$NICE" && break
14748done
14749
14750    else
14751      # If it succeeded, then it was overridden by the user. We will use it
14752      # for the tool.
14753
14754      # First remove it from the list of overridden variables, so we can test
14755      # for unknown variables in the end.
14756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14757
14758      # Check if we try to supply an empty value
14759      if test "x$NICE" = x; then
14760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14761$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14763$as_echo_n "checking for NICE... " >&6; }
14764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14765$as_echo "disabled" >&6; }
14766      else
14767        # Check if the provided tool contains a complete path.
14768        tool_specified="$NICE"
14769        tool_basename="${tool_specified##*/}"
14770        if test "x$tool_basename" = "x$tool_specified"; then
14771          # A command without a complete path is provided, search $PATH.
14772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14773$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14774          # Extract the first word of "$tool_basename", so it can be a program name with args.
14775set dummy $tool_basename; ac_word=$2
14776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14777$as_echo_n "checking for $ac_word... " >&6; }
14778if ${ac_cv_path_NICE+:} false; then :
14779  $as_echo_n "(cached) " >&6
14780else
14781  case $NICE in
14782  [\\/]* | ?:[\\/]*)
14783  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14784  ;;
14785  *)
14786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14787for as_dir in $PATH
14788do
14789  IFS=$as_save_IFS
14790  test -z "$as_dir" && as_dir=.
14791    for ac_exec_ext in '' $ac_executable_extensions; do
14792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14793    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14795    break 2
14796  fi
14797done
14798  done
14799IFS=$as_save_IFS
14800
14801  ;;
14802esac
14803fi
14804NICE=$ac_cv_path_NICE
14805if test -n "$NICE"; then
14806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14807$as_echo "$NICE" >&6; }
14808else
14809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14810$as_echo "no" >&6; }
14811fi
14812
14813
14814          if test "x$NICE" = x; then
14815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14816          fi
14817        else
14818          # Otherwise we believe it is a complete path. Use it as it is.
14819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14820$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14822$as_echo_n "checking for NICE... " >&6; }
14823          if test ! -x "$tool_specified"; then
14824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14825$as_echo "not found" >&6; }
14826            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14827          fi
14828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14829$as_echo "$tool_specified" >&6; }
14830        fi
14831      fi
14832    fi
14833
14834  fi
14835
14836
14837
14838
14839# Now we can determine OpenJDK build and target platforms. This is required to
14840# have early on.
14841# Make sure we can run config.sub.
14842$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14843  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14844
14845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14846$as_echo_n "checking build system type... " >&6; }
14847if ${ac_cv_build+:} false; then :
14848  $as_echo_n "(cached) " >&6
14849else
14850  ac_build_alias=$build_alias
14851test "x$ac_build_alias" = x &&
14852  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14853test "x$ac_build_alias" = x &&
14854  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14855ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14856  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14857
14858fi
14859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14860$as_echo "$ac_cv_build" >&6; }
14861case $ac_cv_build in
14862*-*-*) ;;
14863*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14864esac
14865build=$ac_cv_build
14866ac_save_IFS=$IFS; IFS='-'
14867set x $ac_cv_build
14868shift
14869build_cpu=$1
14870build_vendor=$2
14871shift; shift
14872# Remember, the first character of IFS is used to create $*,
14873# except with old shells:
14874build_os=$*
14875IFS=$ac_save_IFS
14876case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14877
14878
14879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14880$as_echo_n "checking host system type... " >&6; }
14881if ${ac_cv_host+:} false; then :
14882  $as_echo_n "(cached) " >&6
14883else
14884  if test "x$host_alias" = x; then
14885  ac_cv_host=$ac_cv_build
14886else
14887  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14888    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14889fi
14890
14891fi
14892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14893$as_echo "$ac_cv_host" >&6; }
14894case $ac_cv_host in
14895*-*-*) ;;
14896*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14897esac
14898host=$ac_cv_host
14899ac_save_IFS=$IFS; IFS='-'
14900set x $ac_cv_host
14901shift
14902host_cpu=$1
14903host_vendor=$2
14904shift; shift
14905# Remember, the first character of IFS is used to create $*,
14906# except with old shells:
14907host_os=$*
14908IFS=$ac_save_IFS
14909case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14910
14911
14912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14913$as_echo_n "checking target system type... " >&6; }
14914if ${ac_cv_target+:} false; then :
14915  $as_echo_n "(cached) " >&6
14916else
14917  if test "x$target_alias" = x; then
14918  ac_cv_target=$ac_cv_host
14919else
14920  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14921    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14922fi
14923
14924fi
14925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14926$as_echo "$ac_cv_target" >&6; }
14927case $ac_cv_target in
14928*-*-*) ;;
14929*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14930esac
14931target=$ac_cv_target
14932ac_save_IFS=$IFS; IFS='-'
14933set x $ac_cv_target
14934shift
14935target_cpu=$1
14936target_vendor=$2
14937shift; shift
14938# Remember, the first character of IFS is used to create $*,
14939# except with old shells:
14940target_os=$*
14941IFS=$ac_save_IFS
14942case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14943
14944
14945# The aliases save the names the user supplied, while $host etc.
14946# will get canonicalized.
14947test -n "$target_alias" &&
14948  test "$program_prefix$program_suffix$program_transform_name" = \
14949    NONENONEs,x,x, &&
14950  program_prefix=${target_alias}-
14951
14952  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14953  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14954  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14955  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14956  # to use the configure naming style.
14957
14958
14959
14960
14961
14962  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14963  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14964  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14965  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14966  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14967  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14968
14969
14970
14971  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14972
14973  case "$build_os" in
14974    *linux*)
14975      VAR_OS=linux
14976      VAR_OS_TYPE=unix
14977      ;;
14978    *solaris*)
14979      VAR_OS=solaris
14980      VAR_OS_TYPE=unix
14981      ;;
14982    *darwin*)
14983      VAR_OS=macosx
14984      VAR_OS_TYPE=unix
14985      ;;
14986    *bsd*)
14987      VAR_OS=bsd
14988      VAR_OS_TYPE=unix
14989      ;;
14990    *cygwin*)
14991      VAR_OS=windows
14992      VAR_OS_ENV=windows.cygwin
14993      ;;
14994    *mingw*)
14995      VAR_OS=windows
14996      VAR_OS_ENV=windows.msys
14997      ;;
14998    *aix*)
14999      VAR_OS=aix
15000      VAR_OS_TYPE=unix
15001      ;;
15002    *)
15003      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15004      ;;
15005  esac
15006
15007
15008  # First argument is the cpu name from the trip/quad
15009  case "$build_cpu" in
15010    x86_64)
15011      VAR_CPU=x86_64
15012      VAR_CPU_ARCH=x86
15013      VAR_CPU_BITS=64
15014      VAR_CPU_ENDIAN=little
15015      ;;
15016    i?86)
15017      VAR_CPU=x86
15018      VAR_CPU_ARCH=x86
15019      VAR_CPU_BITS=32
15020      VAR_CPU_ENDIAN=little
15021      ;;
15022    arm*)
15023      VAR_CPU=arm
15024      VAR_CPU_ARCH=arm
15025      VAR_CPU_BITS=32
15026      VAR_CPU_ENDIAN=little
15027      ;;
15028    aarch64)
15029      VAR_CPU=aarch64
15030      VAR_CPU_ARCH=aarch64
15031      VAR_CPU_BITS=64
15032      VAR_CPU_ENDIAN=little
15033      ;;
15034    powerpc)
15035      VAR_CPU=ppc
15036      VAR_CPU_ARCH=ppc
15037      VAR_CPU_BITS=32
15038      VAR_CPU_ENDIAN=big
15039      ;;
15040    powerpc64)
15041      VAR_CPU=ppc64
15042      VAR_CPU_ARCH=ppc
15043      VAR_CPU_BITS=64
15044      VAR_CPU_ENDIAN=big
15045      ;;
15046    powerpc64le)
15047      VAR_CPU=ppc64le
15048      VAR_CPU_ARCH=ppc
15049      VAR_CPU_BITS=64
15050      VAR_CPU_ENDIAN=little
15051      ;;
15052    s390)
15053      VAR_CPU=s390
15054      VAR_CPU_ARCH=s390
15055      VAR_CPU_BITS=32
15056      VAR_CPU_ENDIAN=big
15057      ;;
15058    s390x)
15059      VAR_CPU=s390x
15060      VAR_CPU_ARCH=s390
15061      VAR_CPU_BITS=64
15062      VAR_CPU_ENDIAN=big
15063      ;;
15064    sparc)
15065      VAR_CPU=sparc
15066      VAR_CPU_ARCH=sparc
15067      VAR_CPU_BITS=32
15068      VAR_CPU_ENDIAN=big
15069      ;;
15070    sparcv9|sparc64)
15071      VAR_CPU=sparcv9
15072      VAR_CPU_ARCH=sparc
15073      VAR_CPU_BITS=64
15074      VAR_CPU_ENDIAN=big
15075      ;;
15076    *)
15077      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15078      ;;
15079  esac
15080
15081  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15082  OPENJDK_BUILD_OS="$VAR_OS"
15083  if test "x$VAR_OS_TYPE" != x; then
15084    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15085  else
15086    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15087  fi
15088  if test "x$VAR_OS_ENV" != x; then
15089    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15090  else
15091    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15092  fi
15093  OPENJDK_BUILD_CPU="$VAR_CPU"
15094  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15095  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15096  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15097
15098
15099
15100
15101
15102
15103
15104
15105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15106$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15108$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15109
15110  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15111
15112  case "$host_os" in
15113    *linux*)
15114      VAR_OS=linux
15115      VAR_OS_TYPE=unix
15116      ;;
15117    *solaris*)
15118      VAR_OS=solaris
15119      VAR_OS_TYPE=unix
15120      ;;
15121    *darwin*)
15122      VAR_OS=macosx
15123      VAR_OS_TYPE=unix
15124      ;;
15125    *bsd*)
15126      VAR_OS=bsd
15127      VAR_OS_TYPE=unix
15128      ;;
15129    *cygwin*)
15130      VAR_OS=windows
15131      VAR_OS_ENV=windows.cygwin
15132      ;;
15133    *mingw*)
15134      VAR_OS=windows
15135      VAR_OS_ENV=windows.msys
15136      ;;
15137    *aix*)
15138      VAR_OS=aix
15139      VAR_OS_TYPE=unix
15140      ;;
15141    *)
15142      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15143      ;;
15144  esac
15145
15146
15147  # First argument is the cpu name from the trip/quad
15148  case "$host_cpu" in
15149    x86_64)
15150      VAR_CPU=x86_64
15151      VAR_CPU_ARCH=x86
15152      VAR_CPU_BITS=64
15153      VAR_CPU_ENDIAN=little
15154      ;;
15155    i?86)
15156      VAR_CPU=x86
15157      VAR_CPU_ARCH=x86
15158      VAR_CPU_BITS=32
15159      VAR_CPU_ENDIAN=little
15160      ;;
15161    arm*)
15162      VAR_CPU=arm
15163      VAR_CPU_ARCH=arm
15164      VAR_CPU_BITS=32
15165      VAR_CPU_ENDIAN=little
15166      ;;
15167    aarch64)
15168      VAR_CPU=aarch64
15169      VAR_CPU_ARCH=aarch64
15170      VAR_CPU_BITS=64
15171      VAR_CPU_ENDIAN=little
15172      ;;
15173    powerpc)
15174      VAR_CPU=ppc
15175      VAR_CPU_ARCH=ppc
15176      VAR_CPU_BITS=32
15177      VAR_CPU_ENDIAN=big
15178      ;;
15179    powerpc64)
15180      VAR_CPU=ppc64
15181      VAR_CPU_ARCH=ppc
15182      VAR_CPU_BITS=64
15183      VAR_CPU_ENDIAN=big
15184      ;;
15185    powerpc64le)
15186      VAR_CPU=ppc64le
15187      VAR_CPU_ARCH=ppc
15188      VAR_CPU_BITS=64
15189      VAR_CPU_ENDIAN=little
15190      ;;
15191    s390)
15192      VAR_CPU=s390
15193      VAR_CPU_ARCH=s390
15194      VAR_CPU_BITS=32
15195      VAR_CPU_ENDIAN=big
15196      ;;
15197    s390x)
15198      VAR_CPU=s390x
15199      VAR_CPU_ARCH=s390
15200      VAR_CPU_BITS=64
15201      VAR_CPU_ENDIAN=big
15202      ;;
15203    sparc)
15204      VAR_CPU=sparc
15205      VAR_CPU_ARCH=sparc
15206      VAR_CPU_BITS=32
15207      VAR_CPU_ENDIAN=big
15208      ;;
15209    sparcv9|sparc64)
15210      VAR_CPU=sparcv9
15211      VAR_CPU_ARCH=sparc
15212      VAR_CPU_BITS=64
15213      VAR_CPU_ENDIAN=big
15214      ;;
15215    *)
15216      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15217      ;;
15218  esac
15219
15220  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15221  OPENJDK_TARGET_OS="$VAR_OS"
15222  if test "x$VAR_OS_TYPE" != x; then
15223    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15224  else
15225    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15226  fi
15227  if test "x$VAR_OS_ENV" != x; then
15228    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15229  else
15230    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15231  fi
15232  OPENJDK_TARGET_CPU="$VAR_CPU"
15233  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15234  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15235  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15236
15237
15238
15239
15240
15241
15242
15243
15244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15245$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15247$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15248
15249
15250
15251# Check whether --with-target-bits was given.
15252if test "${with_target_bits+set}" = set; then :
15253  withval=$with_target_bits;
15254fi
15255
15256
15257  # We have three types of compiles:
15258  # native  == normal compilation, target system == build system
15259  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15260  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15261  #
15262  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15263    # We're doing a proper cross-compilation
15264    COMPILE_TYPE="cross"
15265  else
15266    COMPILE_TYPE="native"
15267  fi
15268
15269  if test "x$with_target_bits" != x; then
15270    if test "x$COMPILE_TYPE" = "xcross"; then
15271      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15272    fi
15273
15274    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15275      # A reduced build is requested
15276      COMPILE_TYPE="reduced"
15277      OPENJDK_TARGET_CPU_BITS=32
15278      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15279        OPENJDK_TARGET_CPU=x86
15280      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15281        OPENJDK_TARGET_CPU=sparc
15282      else
15283        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15284      fi
15285    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15286      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
15287    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15288      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15289$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15290    else
15291      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15292    fi
15293  fi
15294
15295
15296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15297$as_echo_n "checking compilation type... " >&6; }
15298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15299$as_echo "$COMPILE_TYPE" >&6; }
15300
15301
15302  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15303    REQUIRED_OS_NAME=SunOS
15304    REQUIRED_OS_VERSION=5.10
15305  fi
15306  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15307    REQUIRED_OS_NAME=Linux
15308    REQUIRED_OS_VERSION=2.6
15309  fi
15310  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15311    REQUIRED_OS_NAME=Windows
15312    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15313      REQUIRED_OS_VERSION=5.2
15314    else
15315      REQUIRED_OS_VERSION=5.1
15316    fi
15317  fi
15318  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15319    REQUIRED_OS_NAME=Darwin
15320    REQUIRED_OS_VERSION=11.2
15321  fi
15322  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15323    REQUIRED_OS_NAME=AIX
15324    REQUIRED_OS_VERSION=7.1
15325  fi
15326
15327
15328
15329
15330
15331
15332  # Also store the legacy naming of the cpu.
15333  # Ie i586 and amd64 instead of x86 and x86_64
15334  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15335  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15336    OPENJDK_TARGET_CPU_LEGACY="i586"
15337  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15338    # On all platforms except MacOSX replace x86_64 with amd64.
15339    OPENJDK_TARGET_CPU_LEGACY="amd64"
15340  fi
15341
15342
15343  # And the second legacy naming of the cpu.
15344  # Ie i386 and amd64 instead of x86 and x86_64.
15345  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15346  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15347    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15348  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15349    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15350  fi
15351
15352
15353  # This is the name of the cpu (but using i386 and amd64 instead of
15354  # x86 and x86_64, respectively), preceeded by a /, to be used when
15355  # locating libraries. On macosx, it's empty, though.
15356  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15357  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15358    OPENJDK_TARGET_CPU_LIBDIR=""
15359  fi
15360
15361
15362  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15363  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15364  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15365  OPENJDK_TARGET_CPU_ISADIR=""
15366  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15367    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15368      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15369    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15370      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15371    fi
15372  fi
15373
15374
15375  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15376  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15377  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15378    # On linux only, we replace x86 with i386.
15379    OPENJDK_TARGET_CPU_OSARCH="i386"
15380  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15381    # On all platforms except macosx, we replace x86_64 with amd64.
15382    OPENJDK_TARGET_CPU_OSARCH="amd64"
15383  fi
15384
15385
15386  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15387  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15388    OPENJDK_TARGET_CPU_JLI="i386"
15389  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15390    # On all platforms except macosx, we replace x86_64 with amd64.
15391    OPENJDK_TARGET_CPU_JLI="amd64"
15392  fi
15393  # Now setup the -D flags for building libjli.
15394  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15395  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15396    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15397      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15398    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15399      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15400    fi
15401  fi
15402
15403
15404  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15405      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15406  else
15407      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15408  fi
15409
15410
15411  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15412    A_LP64="LP64:="
15413    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15414    # unpack200.exe
15415    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15416      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15417    fi
15418  fi
15419  LP64=$A_LP64
15420
15421
15422  if test "x$COMPILE_TYPE" = "xcross"; then
15423    # FIXME: ... or should this include reduced builds..?
15424    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15425  else
15426    DEFINE_CROSS_COMPILE_ARCH=""
15427  fi
15428
15429
15430  # Convert openjdk platform names to hotspot names
15431
15432  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15433  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15434    HOTSPOT_TARGET_OS=bsd
15435  fi
15436
15437
15438  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15439  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15440    HOTSPOT_TARGET_OS_TYPE=posix
15441  fi
15442
15443
15444  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15445  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15446    HOTSPOT_TARGET_CPU=x86_32
15447  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15448    HOTSPOT_TARGET_CPU=sparc
15449  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15450    HOTSPOT_TARGET_CPU=ppc_64
15451  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15452    HOTSPOT_TARGET_CPU=ppc_64
15453  fi
15454
15455
15456  # This is identical with OPENJDK_*, but define anyway for consistency.
15457  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15458
15459
15460  # Setup HOTSPOT_TARGET_CPU_DEFINE
15461  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15462    HOTSPOT_TARGET_CPU_DEFINE=IA32
15463  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15464    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15465  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15466    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15467  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15468    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15469  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15470    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15471  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15472    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15473
15474  # The cpu defines below are for zero, we don't support them directly.
15475  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15476    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15477  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15478    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15479  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15480    HOTSPOT_TARGET_CPU_DEFINE=S390
15481  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15482    HOTSPOT_TARGET_CPU_DEFINE=S390
15483  fi
15484
15485
15486
15487
15488  # Also store the legacy naming of the cpu.
15489  # Ie i586 and amd64 instead of x86 and x86_64
15490  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15491  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15492    OPENJDK_BUILD_CPU_LEGACY="i586"
15493  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15494    # On all platforms except MacOSX replace x86_64 with amd64.
15495    OPENJDK_BUILD_CPU_LEGACY="amd64"
15496  fi
15497
15498
15499  # And the second legacy naming of the cpu.
15500  # Ie i386 and amd64 instead of x86 and x86_64.
15501  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15502  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15503    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15504  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15505    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15506  fi
15507
15508
15509  # This is the name of the cpu (but using i386 and amd64 instead of
15510  # x86 and x86_64, respectively), preceeded by a /, to be used when
15511  # locating libraries. On macosx, it's empty, though.
15512  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15513  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15514    OPENJDK_BUILD_CPU_LIBDIR=""
15515  fi
15516
15517
15518  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15519  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15520  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15521  OPENJDK_BUILD_CPU_ISADIR=""
15522  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15523    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15524      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15525    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15526      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15527    fi
15528  fi
15529
15530
15531  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15532  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15533  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15534    # On linux only, we replace x86 with i386.
15535    OPENJDK_BUILD_CPU_OSARCH="i386"
15536  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15537    # On all platforms except macosx, we replace x86_64 with amd64.
15538    OPENJDK_BUILD_CPU_OSARCH="amd64"
15539  fi
15540
15541
15542  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15543  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15544    OPENJDK_BUILD_CPU_JLI="i386"
15545  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15546    # On all platforms except macosx, we replace x86_64 with amd64.
15547    OPENJDK_BUILD_CPU_JLI="amd64"
15548  fi
15549  # Now setup the -D flags for building libjli.
15550  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15551  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15552    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15553      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15554    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15555      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15556    fi
15557  fi
15558
15559
15560  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15561      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15562  else
15563      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15564  fi
15565
15566
15567  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15568    A_LP64="LP64:="
15569    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15570    # unpack200.exe
15571    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15572      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15573    fi
15574  fi
15575  LP64=$A_LP64
15576
15577
15578  if test "x$COMPILE_TYPE" = "xcross"; then
15579    # FIXME: ... or should this include reduced builds..?
15580    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
15581  else
15582    DEFINE_CROSS_COMPILE_ARCH=""
15583  fi
15584
15585
15586  # Convert openjdk platform names to hotspot names
15587
15588  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
15589  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15590    HOTSPOT_BUILD_OS=bsd
15591  fi
15592
15593
15594  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
15595  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
15596    HOTSPOT_BUILD_OS_TYPE=posix
15597  fi
15598
15599
15600  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
15601  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15602    HOTSPOT_BUILD_CPU=x86_32
15603  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15604    HOTSPOT_BUILD_CPU=sparc
15605  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15606    HOTSPOT_BUILD_CPU=ppc_64
15607  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15608    HOTSPOT_BUILD_CPU=ppc_64
15609  fi
15610
15611
15612  # This is identical with OPENJDK_*, but define anyway for consistency.
15613  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
15614
15615
15616  # Setup HOTSPOT_BUILD_CPU_DEFINE
15617  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15618    HOTSPOT_BUILD_CPU_DEFINE=IA32
15619  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15620    HOTSPOT_BUILD_CPU_DEFINE=AMD64
15621  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15622    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15623  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
15624    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
15625  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15626    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15627  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15628    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15629
15630  # The cpu defines below are for zero, we don't support them directly.
15631  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
15632    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15633  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
15634    HOTSPOT_BUILD_CPU_DEFINE=PPC32
15635  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
15636    HOTSPOT_BUILD_CPU_DEFINE=S390
15637  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
15638    HOTSPOT_BUILD_CPU_DEFINE=S390
15639  fi
15640
15641
15642
15643
15644  # ZERO_ARCHDEF is used to enable architecture-specific code.
15645  # This is used in legacy hotspot build.
15646  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
15647
15648
15649
15650
15651
15652# Continue setting up basic stuff. Most remaining code require fundamental tools.
15653
15654  # Save the current directory this script was started from
15655  CURDIR="$PWD"
15656
15657  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15658  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15659  # was not available at that time.
15660  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15661  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15662    ORIGINAL_PATH="$REWRITTEN_PATH"
15663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15664$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15665  fi
15666
15667  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15668    PATH_SEP=";"
15669
15670  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15671  if test $SRC_ROOT_LENGTH -gt 100; then
15672    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15673  fi
15674
15675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15677$as_echo_n "checking cygwin release... " >&6; }
15678    CYGWIN_VERSION=`$UNAME -r`
15679    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15680$as_echo "$CYGWIN_VERSION" >&6; }
15681    WINDOWS_ENV_VENDOR='cygwin'
15682    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15683
15684    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15685    if test "x$CYGWIN_VERSION_OLD" != x; then
15686      { $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
15687$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;}
15688      as_fn_error $? "Cannot continue" "$LINENO" 5
15689    fi
15690    if test "x$CYGPATH" = x; then
15691      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15692    fi
15693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15694$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15695    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15696    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15697    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15698    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15700$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15701    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15702    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15703    if test "x$test_cygdrive_prefix" = x; then
15704      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15705    fi
15706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15707    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15708$as_echo_n "checking msys release... " >&6; }
15709    MSYS_VERSION=`$UNAME -r`
15710    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15711$as_echo "$MSYS_VERSION" >&6; }
15712
15713    WINDOWS_ENV_VENDOR='msys'
15714    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15715
15716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15717$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15718    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15719    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15720
15721  windows_path="$MSYS_ROOT_PATH"
15722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15723    unix_path=`$CYGPATH -u "$windows_path"`
15724    MSYS_ROOT_PATH="$unix_path"
15725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15727    MSYS_ROOT_PATH="$unix_path"
15728  fi
15729
15730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15731$as_echo "$MSYS_ROOT_PATH" >&6; }
15732    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15733  else
15734    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15735  fi
15736
15737  # Test if windows or unix (cygwin/msys) find is first in path.
15738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15739$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15740  FIND_BINARY_OUTPUT=`find --version 2>&1`
15741  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15743$as_echo "unix style" >&6; }
15744  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15746$as_echo "Windows" >&6; }
15747    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15748$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15749    { $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
15750$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15751    as_fn_error $? "Cannot continue" "$LINENO" 5
15752  else
15753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15754$as_echo "unknown" >&6; }
15755    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15756$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15757  fi
15758
15759  else
15760    PATH_SEP=":"
15761  fi
15762
15763
15764  # We get the top-level directory from the supporting wrappers.
15765  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15766$as_echo_n "checking for top-level directory... " >&6; }
15767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15768$as_echo "$TOPDIR" >&6; }
15769
15770
15771  # Save the original version of TOPDIR for string comparisons
15772  ORIGINAL_TOPDIR="$TOPDIR"
15773
15774
15775  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15776
15777  # Only process if variable expands to non-empty
15778
15779  if test "x$CURDIR" != x; then
15780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15781
15782  # Input might be given as Windows format, start by converting to
15783  # unix format.
15784  path="$CURDIR"
15785  new_path=`$CYGPATH -u "$path"`
15786
15787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15790  # "foo.exe" is OK but "foo" is an error.
15791  #
15792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15793  # It is also a way to make sure we got the proper file name for the real test later on.
15794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15795  if test "x$test_shortpath" = x; then
15796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15797$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15798    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15799  fi
15800
15801  # Call helper function which possibly converts this using DOS-style short mode.
15802  # If so, the updated path is stored in $new_path.
15803
15804  input_path="$new_path"
15805  # Check if we need to convert this using DOS-style short mode. If the path
15806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15807  # take no chances and rewrite it.
15808  # Note: m4 eats our [], so we need to use [ and ] instead.
15809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15810  if test "x$has_forbidden_chars" != x; then
15811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15815      # Going to short mode and back again did indeed matter. Since short mode is
15816      # case insensitive, let's make it lowercase to improve readability.
15817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15818      # Now convert it back to Unix-style (cygpath)
15819      input_path=`$CYGPATH -u "$shortmode_path"`
15820      new_path="$input_path"
15821    fi
15822  fi
15823
15824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15825  if test "x$test_cygdrive_prefix" = x; then
15826    # As a simple fix, exclude /usr/bin since it's not a real path.
15827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15829      # a path prefixed by /cygdrive for fixpath to work.
15830      new_path="$CYGWIN_ROOT_PATH$input_path"
15831    fi
15832  fi
15833
15834
15835  if test "x$path" != "x$new_path"; then
15836    CURDIR="$new_path"
15837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15838$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15839  fi
15840
15841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15842
15843  path="$CURDIR"
15844  has_colon=`$ECHO $path | $GREP ^.:`
15845  new_path="$path"
15846  if test "x$has_colon" = x; then
15847    # Not in mixed or Windows style, start by that.
15848    new_path=`cmd //c echo $path`
15849  fi
15850
15851
15852  input_path="$new_path"
15853  # Check if we need to convert this using DOS-style short mode. If the path
15854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15855  # take no chances and rewrite it.
15856  # Note: m4 eats our [], so we need to use [ and ] instead.
15857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15858  if test "x$has_forbidden_chars" != x; then
15859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15861  fi
15862
15863
15864  windows_path="$new_path"
15865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15866    unix_path=`$CYGPATH -u "$windows_path"`
15867    new_path="$unix_path"
15868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15870    new_path="$unix_path"
15871  fi
15872
15873  if test "x$path" != "x$new_path"; then
15874    CURDIR="$new_path"
15875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15876$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15877  fi
15878
15879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15881
15882    else
15883      # We're on a unix platform. Hooray! :)
15884      path="$CURDIR"
15885      has_space=`$ECHO "$path" | $GREP " "`
15886      if test "x$has_space" != x; then
15887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15888$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15890      fi
15891
15892      # Use eval to expand a potential ~
15893      eval path="$path"
15894      if test ! -f "$path" && test ! -d "$path"; then
15895        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15896      fi
15897
15898      if test -d "$path"; then
15899        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15900      else
15901        dir="`$DIRNAME "$path"`"
15902        base="`$BASENAME "$path"`"
15903        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15904      fi
15905    fi
15906  fi
15907
15908
15909  # Only process if variable expands to non-empty
15910
15911  if test "x$TOPDIR" != x; then
15912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15913
15914  # Input might be given as Windows format, start by converting to
15915  # unix format.
15916  path="$TOPDIR"
15917  new_path=`$CYGPATH -u "$path"`
15918
15919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15922  # "foo.exe" is OK but "foo" is an error.
15923  #
15924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15925  # It is also a way to make sure we got the proper file name for the real test later on.
15926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15927  if test "x$test_shortpath" = x; then
15928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15929$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15930    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15931  fi
15932
15933  # Call helper function which possibly converts this using DOS-style short mode.
15934  # If so, the updated path is stored in $new_path.
15935
15936  input_path="$new_path"
15937  # Check if we need to convert this using DOS-style short mode. If the path
15938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15939  # take no chances and rewrite it.
15940  # Note: m4 eats our [], so we need to use [ and ] instead.
15941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15942  if test "x$has_forbidden_chars" != x; then
15943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15947      # Going to short mode and back again did indeed matter. Since short mode is
15948      # case insensitive, let's make it lowercase to improve readability.
15949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15950      # Now convert it back to Unix-style (cygpath)
15951      input_path=`$CYGPATH -u "$shortmode_path"`
15952      new_path="$input_path"
15953    fi
15954  fi
15955
15956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15957  if test "x$test_cygdrive_prefix" = x; then
15958    # As a simple fix, exclude /usr/bin since it's not a real path.
15959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15961      # a path prefixed by /cygdrive for fixpath to work.
15962      new_path="$CYGWIN_ROOT_PATH$input_path"
15963    fi
15964  fi
15965
15966
15967  if test "x$path" != "x$new_path"; then
15968    TOPDIR="$new_path"
15969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15970$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15971  fi
15972
15973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15974
15975  path="$TOPDIR"
15976  has_colon=`$ECHO $path | $GREP ^.:`
15977  new_path="$path"
15978  if test "x$has_colon" = x; then
15979    # Not in mixed or Windows style, start by that.
15980    new_path=`cmd //c echo $path`
15981  fi
15982
15983
15984  input_path="$new_path"
15985  # Check if we need to convert this using DOS-style short mode. If the path
15986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15987  # take no chances and rewrite it.
15988  # Note: m4 eats our [], so we need to use [ and ] instead.
15989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15990  if test "x$has_forbidden_chars" != x; then
15991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15993  fi
15994
15995
15996  windows_path="$new_path"
15997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15998    unix_path=`$CYGPATH -u "$windows_path"`
15999    new_path="$unix_path"
16000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16002    new_path="$unix_path"
16003  fi
16004
16005  if test "x$path" != "x$new_path"; then
16006    TOPDIR="$new_path"
16007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16008$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16009  fi
16010
16011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16013
16014    else
16015      # We're on a unix platform. Hooray! :)
16016      path="$TOPDIR"
16017      has_space=`$ECHO "$path" | $GREP " "`
16018      if test "x$has_space" != x; then
16019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16020$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16021        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16022      fi
16023
16024      # Use eval to expand a potential ~
16025      eval path="$path"
16026      if test ! -f "$path" && test ! -d "$path"; then
16027        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16028      fi
16029
16030      if test -d "$path"; then
16031        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16032      else
16033        dir="`$DIRNAME "$path"`"
16034        base="`$BASENAME "$path"`"
16035        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16036      fi
16037    fi
16038  fi
16039
16040  # SRC_ROOT is a traditional alias for TOPDIR.
16041  SRC_ROOT=$TOPDIR
16042
16043  # Calculate a canonical version of TOPDIR for string comparisons
16044  CANONICAL_TOPDIR=$TOPDIR
16045
16046  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16047    # Follow a chain of symbolic links. Use readlink
16048    # where it exists, else fall back to horribly
16049    # complicated shell code.
16050    if test "x$READLINK_TESTED" != yes; then
16051      # On MacOSX there is a readlink tool with a different
16052      # purpose than the GNU readlink tool. Check the found readlink.
16053      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16054      if test "x$ISGNU" = x; then
16055        # A readlink that we do not know how to use.
16056        # Are there other non-GNU readlinks out there?
16057        READLINK_TESTED=yes
16058        READLINK=
16059      fi
16060    fi
16061
16062    if test "x$READLINK" != x; then
16063      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16064    else
16065      # Save the current directory for restoring afterwards
16066      STARTDIR=$PWD
16067      COUNTER=0
16068      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16069      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16070      cd $sym_link_dir
16071      # Use -P flag to resolve symlinks in directories.
16072      cd `$THEPWDCMD -P`
16073      sym_link_dir=`$THEPWDCMD -P`
16074      # Resolve file symlinks
16075      while test $COUNTER -lt 20; do
16076        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16077        if test "x$ISLINK" == x; then
16078          # This is not a symbolic link! We are done!
16079          break
16080        fi
16081        # Again resolve directory symlinks since the target of the just found
16082        # link could be in a different directory
16083        cd `$DIRNAME $ISLINK`
16084        sym_link_dir=`$THEPWDCMD -P`
16085        sym_link_file=`$BASENAME $ISLINK`
16086        let COUNTER=COUNTER+1
16087      done
16088      cd $STARTDIR
16089      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16090    fi
16091  fi
16092
16093
16094
16095  # Locate the directory of this script.
16096  AUTOCONF_DIR=$TOPDIR/common/autoconf
16097
16098  # Setup username (for use in adhoc version strings etc)
16099  # Outer [ ] to quote m4.
16100   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16101
16102
16103
16104# Check if it's a pure open build or if custom sources are to be used.
16105
16106  # Check whether --enable-openjdk-only was given.
16107if test "${enable_openjdk_only+set}" = set; then :
16108  enableval=$enable_openjdk_only;
16109else
16110  enable_openjdk_only="no"
16111fi
16112
16113
16114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16115$as_echo_n "checking for presence of closed sources... " >&6; }
16116  if test -d "$SRC_ROOT/jdk/src/closed"; then
16117    CLOSED_SOURCE_PRESENT=yes
16118  else
16119    CLOSED_SOURCE_PRESENT=no
16120  fi
16121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16122$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16123
16124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16125$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16126  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16128$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16129
16130  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16131    OPENJDK=true
16132    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16133      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16134$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16135    fi
16136  else
16137    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16138      OPENJDK=true
16139    else
16140      OPENJDK=false
16141    fi
16142  fi
16143
16144  if test "x$OPENJDK" = "xtrue"; then
16145    SET_OPENJDK="OPENJDK=true"
16146  fi
16147
16148
16149
16150  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16151  # the IncludeCustomExtension macro.
16152
16153
16154# Check whether --with-custom-make-dir was given.
16155if test "${with_custom_make_dir+set}" = set; then :
16156  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
16157$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16158fi
16159
16160
16161
16162
16163# These are needed to be able to create a configuration name (and thus the output directory)
16164
16165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16166$as_echo_n "checking which variant of the JDK to build... " >&6; }
16167
16168# Check whether --with-jdk-variant was given.
16169if test "${with_jdk_variant+set}" = set; then :
16170  withval=$with_jdk_variant;
16171fi
16172
16173
16174  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16175    JDK_VARIANT="normal"
16176  else
16177    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16178  fi
16179
16180
16181
16182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16183$as_echo "$JDK_VARIANT" >&6; }
16184
16185
16186  DEBUG_LEVEL="release"
16187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16188$as_echo_n "checking which debug level to use... " >&6; }
16189  # Check whether --enable-debug was given.
16190if test "${enable_debug+set}" = set; then :
16191  enableval=$enable_debug;
16192        ENABLE_DEBUG="${enableval}"
16193        DEBUG_LEVEL="fastdebug"
16194
16195else
16196  ENABLE_DEBUG="no"
16197fi
16198
16199
16200
16201# Check whether --with-debug-level was given.
16202if test "${with_debug_level+set}" = set; then :
16203  withval=$with_debug_level;
16204        DEBUG_LEVEL="${withval}"
16205        if test "x$ENABLE_DEBUG" = xyes; then
16206          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16207        fi
16208
16209fi
16210
16211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16212$as_echo "$DEBUG_LEVEL" >&6; }
16213
16214  if test "x$DEBUG_LEVEL" != xrelease && \
16215      test "x$DEBUG_LEVEL" != xoptimized && \
16216      test "x$DEBUG_LEVEL" != xfastdebug && \
16217      test "x$DEBUG_LEVEL" != xslowdebug; then
16218    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16219  fi
16220
16221  # Translate DEBUG_LEVEL to debug level used by Hotspot
16222  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16223  if test "x$DEBUG_LEVEL" = xrelease; then
16224    HOTSPOT_DEBUG_LEVEL="product"
16225  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16226    HOTSPOT_DEBUG_LEVEL="debug"
16227  fi
16228
16229  if test "x$DEBUG_LEVEL" = xoptimized; then
16230    # The debug level 'optimized' is a little special because it is currently only
16231    # applicable to the HotSpot build where it means to build a completely
16232    # optimized version of the VM without any debugging code (like for the
16233    # 'release' debug level which is called 'product' in the HotSpot build) but
16234    # with the exception that it can contain additional code which is otherwise
16235    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16236    # test new and/or experimental features which are not intended for customer
16237    # shipment. Because these new features need to be tested and benchmarked in
16238    # real world scenarios, we want to build the containing JDK at the 'release'
16239    # debug level.
16240    DEBUG_LEVEL="release"
16241  fi
16242
16243
16244
16245
16246
16247
16248# Check whether --with-jvm-variants was given.
16249if test "${with_jvm_variants+set}" = set; then :
16250  withval=$with_jvm_variants;
16251fi
16252
16253
16254  if test "x$with_jvm_variants" = x; then
16255    with_jvm_variants="server"
16256  fi
16257  JVM_VARIANTS_OPT="$with_jvm_variants"
16258
16259  # Has the user listed more than one variant?
16260  # Additional [] needed to keep m4 from mangling shell constructs.
16261  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16262    BUILDING_MULTIPLE_JVM_VARIANTS=true
16263  else
16264    BUILDING_MULTIPLE_JVM_VARIANTS=false
16265  fi
16266  # Replace the commas with AND for use in the build directory name.
16267  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16268
16269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16270$as_echo_n "checking which variants of the JVM to build... " >&6; }
16271  # JVM_VARIANTS is a space-separated list.
16272  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16273  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16275$as_echo "$JVM_VARIANTS" >&6; }
16276
16277  # Check that the selected variants are valid
16278
16279  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16280  # Notice that the original variant failes on SLES 10 and 11
16281  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16282  STACK=${JVM_VARIANTS// /$'\n'}
16283  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16284  if test "x$INVALID_VARIANTS" != x; then
16285    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16286$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16287    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16288  fi
16289
16290  # All "special" variants share the same output directory ("server")
16291  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16292  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16293  STACK=${JVM_VARIANTS// /$'\n'}
16294  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16295  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16296    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16297  fi
16298
16299
16300
16301
16302  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16303    # zero behaves as a platform and rewrites these values. This is really weird. :(
16304    # We are guaranteed that we do not build any other variants when building zero.
16305    HOTSPOT_TARGET_CPU=zero
16306    HOTSPOT_TARGET_CPU_ARCH=zero
16307  fi
16308
16309
16310# With basic setup done, call the custom early hook.
16311
16312
16313# Check if we have devkits, extra paths or sysroot set.
16314
16315
16316# Check whether --with-devkit was given.
16317if test "${with_devkit+set}" = set; then :
16318  withval=$with_devkit;
16319
16320  # Only process if variable expands to non-empty
16321
16322  if test "x$with_devkit" != x; then
16323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16324
16325  # Input might be given as Windows format, start by converting to
16326  # unix format.
16327  path="$with_devkit"
16328  new_path=`$CYGPATH -u "$path"`
16329
16330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16333  # "foo.exe" is OK but "foo" is an error.
16334  #
16335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16336  # It is also a way to make sure we got the proper file name for the real test later on.
16337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16338  if test "x$test_shortpath" = x; then
16339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16340$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16341    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16342  fi
16343
16344  # Call helper function which possibly converts this using DOS-style short mode.
16345  # If so, the updated path is stored in $new_path.
16346
16347  input_path="$new_path"
16348  # Check if we need to convert this using DOS-style short mode. If the path
16349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16350  # take no chances and rewrite it.
16351  # Note: m4 eats our [], so we need to use [ and ] instead.
16352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16353  if test "x$has_forbidden_chars" != x; then
16354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16358      # Going to short mode and back again did indeed matter. Since short mode is
16359      # case insensitive, let's make it lowercase to improve readability.
16360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16361      # Now convert it back to Unix-style (cygpath)
16362      input_path=`$CYGPATH -u "$shortmode_path"`
16363      new_path="$input_path"
16364    fi
16365  fi
16366
16367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16368  if test "x$test_cygdrive_prefix" = x; then
16369    # As a simple fix, exclude /usr/bin since it's not a real path.
16370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16372      # a path prefixed by /cygdrive for fixpath to work.
16373      new_path="$CYGWIN_ROOT_PATH$input_path"
16374    fi
16375  fi
16376
16377
16378  if test "x$path" != "x$new_path"; then
16379    with_devkit="$new_path"
16380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16381$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16382  fi
16383
16384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16385
16386  path="$with_devkit"
16387  has_colon=`$ECHO $path | $GREP ^.:`
16388  new_path="$path"
16389  if test "x$has_colon" = x; then
16390    # Not in mixed or Windows style, start by that.
16391    new_path=`cmd //c echo $path`
16392  fi
16393
16394
16395  input_path="$new_path"
16396  # Check if we need to convert this using DOS-style short mode. If the path
16397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16398  # take no chances and rewrite it.
16399  # Note: m4 eats our [], so we need to use [ and ] instead.
16400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16401  if test "x$has_forbidden_chars" != x; then
16402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16404  fi
16405
16406
16407  windows_path="$new_path"
16408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16409    unix_path=`$CYGPATH -u "$windows_path"`
16410    new_path="$unix_path"
16411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16413    new_path="$unix_path"
16414  fi
16415
16416  if test "x$path" != "x$new_path"; then
16417    with_devkit="$new_path"
16418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16419$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16420  fi
16421
16422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16424
16425    else
16426      # We're on a unix platform. Hooray! :)
16427      path="$with_devkit"
16428      has_space=`$ECHO "$path" | $GREP " "`
16429      if test "x$has_space" != x; then
16430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16431$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16432        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16433      fi
16434
16435      # Use eval to expand a potential ~
16436      eval path="$path"
16437      if test ! -f "$path" && test ! -d "$path"; then
16438        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16439      fi
16440
16441      if test -d "$path"; then
16442        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16443      else
16444        dir="`$DIRNAME "$path"`"
16445        base="`$BASENAME "$path"`"
16446        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16447      fi
16448    fi
16449  fi
16450
16451        DEVKIT_ROOT="$with_devkit"
16452        # Check for a meta data info file in the root of the devkit
16453        if test -f "$DEVKIT_ROOT/devkit.info"; then
16454          . $DEVKIT_ROOT/devkit.info
16455          # This potentially sets the following:
16456          # A descriptive name of the devkit
16457
16458  if test "x$DEVKIT_NAME" = x; then
16459    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16460  fi
16461
16462          # Corresponds to --with-extra-path
16463
16464  if test "x$DEVKIT_EXTRA_PATH" = x; then
16465    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16466  fi
16467
16468          # Corresponds to --with-toolchain-path
16469
16470  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16471    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16472  fi
16473
16474          # Corresponds to --with-sysroot
16475
16476  if test "x$DEVKIT_SYSROOT" = x; then
16477    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16478  fi
16479
16480
16481          # Identifies the Visual Studio version in the devkit
16482
16483  if test "x$DEVKIT_VS_VERSION" = x; then
16484    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16485  fi
16486
16487          # The Visual Studio include environment variable
16488
16489  if test "x$DEVKIT_VS_INCLUDE" = x; then
16490    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16491  fi
16492
16493          # The Visual Studio lib environment variable
16494
16495  if test "x$DEVKIT_VS_LIB" = x; then
16496    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16497  fi
16498
16499          # Corresponds to --with-msvcr-dll
16500
16501  if test "x$DEVKIT_MSVCR_DLL" = x; then
16502    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16503  fi
16504
16505          # Corresponds to --with-msvcp-dll
16506
16507  if test "x$DEVKIT_MSVCP_DLL" = x; then
16508    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16509  fi
16510
16511        fi
16512
16513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16514$as_echo_n "checking for devkit... " >&6; }
16515        if test "x$DEVKIT_NAME" != x; then
16516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16517$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16518        else
16519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16520$as_echo "$DEVKIT_ROOT" >&6; }
16521        fi
16522
16523
16524  if test "x$DEVKIT_EXTRA_PATH" != x; then
16525    if test "x$EXTRA_PATH" = x; then
16526      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16527    else
16528      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16529    fi
16530  fi
16531
16532
16533        # Fallback default of just /bin if DEVKIT_PATH is not defined
16534        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16535          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16536        fi
16537
16538  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16539    if test "x$TOOLCHAIN_PATH" = x; then
16540      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16541    else
16542      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16543    fi
16544  fi
16545
16546
16547        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16548        # places for backwards compatiblity.
16549        if test "x$DEVKIT_SYSROOT" != x; then
16550          SYSROOT="$DEVKIT_SYSROOT"
16551        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16552          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16553        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16554          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16555        fi
16556
16557
16558fi
16559
16560
16561  # You can force the sysroot if the sysroot encoded into the compiler tools
16562  # is not correct.
16563
16564# Check whether --with-sys-root was given.
16565if test "${with_sys_root+set}" = set; then :
16566  withval=$with_sys_root; SYSROOT=$with_sys_root
16567
16568fi
16569
16570
16571
16572# Check whether --with-sysroot was given.
16573if test "${with_sysroot+set}" = set; then :
16574  withval=$with_sysroot; SYSROOT=$with_sysroot
16575
16576fi
16577
16578
16579
16580# Check whether --with-tools-dir was given.
16581if test "${with_tools_dir+set}" = set; then :
16582  withval=$with_tools_dir;
16583  if test "x$with_tools_dir" != x; then
16584    if test "x$TOOLCHAIN_PATH" = x; then
16585      TOOLCHAIN_PATH="$with_tools_dir"
16586    else
16587      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16588    fi
16589  fi
16590
16591
16592fi
16593
16594
16595
16596# Check whether --with-toolchain-path was given.
16597if test "${with_toolchain_path+set}" = set; then :
16598  withval=$with_toolchain_path;
16599  if test "x$with_toolchain_path" != x; then
16600    if test "x$TOOLCHAIN_PATH" = x; then
16601      TOOLCHAIN_PATH="$with_toolchain_path"
16602    else
16603      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16604    fi
16605  fi
16606
16607
16608fi
16609
16610
16611
16612# Check whether --with-extra-path was given.
16613if test "${with_extra_path+set}" = set; then :
16614  withval=$with_extra_path;
16615  if test "x$with_extra_path" != x; then
16616    if test "x$EXTRA_PATH" = x; then
16617      EXTRA_PATH="$with_extra_path"
16618    else
16619      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16620    fi
16621  fi
16622
16623
16624fi
16625
16626
16627  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16628    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16629    # If not, detect if Xcode is installed by running xcodebuild -version
16630    # if no Xcode installed, xcodebuild exits with 1
16631    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16632    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16633      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16634      # fall back on the stub binary in /usr/bin/xcodebuild
16635      # Extract the first word of "xcodebuild", so it can be a program name with args.
16636set dummy xcodebuild; ac_word=$2
16637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16638$as_echo_n "checking for $ac_word... " >&6; }
16639if ${ac_cv_path_XCODEBUILD+:} false; then :
16640  $as_echo_n "(cached) " >&6
16641else
16642  case $XCODEBUILD in
16643  [\\/]* | ?:[\\/]*)
16644  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16645  ;;
16646  *)
16647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16648for as_dir in $TOOLCHAIN_PATH
16649do
16650  IFS=$as_save_IFS
16651  test -z "$as_dir" && as_dir=.
16652    for ac_exec_ext in '' $ac_executable_extensions; do
16653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16654    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16656    break 2
16657  fi
16658done
16659  done
16660IFS=$as_save_IFS
16661
16662  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16663  ;;
16664esac
16665fi
16666XCODEBUILD=$ac_cv_path_XCODEBUILD
16667if test -n "$XCODEBUILD"; then
16668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16669$as_echo "$XCODEBUILD" >&6; }
16670else
16671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16672$as_echo "no" >&6; }
16673fi
16674
16675
16676    else
16677      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16678      # when only the command line tools are installed there are no SDKs, so headers
16679      # are copied into the system frameworks
16680      XCODEBUILD=
16681
16682    fi
16683
16684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16685$as_echo_n "checking for sdk name... " >&6; }
16686
16687# Check whether --with-sdk-name was given.
16688if test "${with_sdk_name+set}" = set; then :
16689  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16690
16691fi
16692
16693    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16694$as_echo "$SDKNAME" >&6; }
16695
16696    # if toolchain path is specified then don't rely on system headers, they may not compile
16697    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16698    test -z "$TOOLCHAIN_PATH" && \
16699      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16700
16701    if test -z "$SYSROOT"; then
16702      if test -n "$XCODEBUILD"; then
16703        # if we don't have system headers, use default SDK name (last resort)
16704        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16705          SDKNAME=${SDKNAME:-macosx}
16706        fi
16707
16708        if test -n "$SDKNAME"; then
16709          # Call xcodebuild to determine SYSROOT
16710          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16711        fi
16712      else
16713        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16714          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
16715        fi
16716      fi
16717    else
16718      # warn user if --with-sdk-name was also set
16719      if test -n "$with_sdk_name"; then
16720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16721$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16722      fi
16723    fi
16724
16725    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16726      # If no system framework headers, then SYSROOT must be set, or we won't build
16727      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
16728    fi
16729
16730    # Perform a basic sanity test
16731    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16732      if test -z "$SYSROOT"; then
16733        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
16734      else
16735        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16736      fi
16737    fi
16738
16739    # set SDKROOT too, Xcode tools will pick it up
16740    SDKROOT=$SYSROOT
16741
16742  fi
16743
16744  # Prepend the extra path to the global path
16745
16746  if test "x$EXTRA_PATH" != x; then
16747    if test "x$PATH" = x; then
16748      PATH="$EXTRA_PATH"
16749    else
16750      PATH="$EXTRA_PATH:$PATH"
16751    fi
16752  fi
16753
16754
16755  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16756    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
16757    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
16758  fi
16759
16760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16761$as_echo_n "checking for sysroot... " >&6; }
16762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16763$as_echo "$SYSROOT" >&6; }
16764  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16765$as_echo_n "checking for toolchain path... " >&6; }
16766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16767$as_echo "$TOOLCHAIN_PATH" >&6; }
16768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16769$as_echo_n "checking for extra path... " >&6; }
16770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16771$as_echo "$EXTRA_PATH" >&6; }
16772
16773
16774# To properly create a configuration name, we need to have the OpenJDK target
16775# and options (variants and debug level) parsed.
16776
16777
16778
16779# Check whether --with-conf-name was given.
16780if test "${with_conf_name+set}" = set; then :
16781  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16782fi
16783
16784
16785  # Test from where we are running configure, in or outside of src root.
16786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16787$as_echo_n "checking where to store configuration... " >&6; }
16788  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16789      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16790      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16791    # We are running configure from the src root.
16792    # Create a default ./build/target-variant-debuglevel output root.
16793    if test "x${CONF_NAME}" = x; then
16794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16795$as_echo "in default location" >&6; }
16796      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
16797    else
16798      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16799$as_echo "in build directory with custom name" >&6; }
16800    fi
16801    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16802    $MKDIR -p "$OUTPUT_ROOT"
16803    if test ! -d "$OUTPUT_ROOT"; then
16804      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16805    fi
16806  else
16807    # We are running configure from outside of the src dir.
16808    # Then use the current directory as output dir!
16809    # If configuration is situated in normal build directory, just use the build
16810    # directory name as configuration name, otherwise use the complete path.
16811    if test "x${CONF_NAME}" = x; then
16812      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16813    fi
16814    OUTPUT_ROOT="$CURDIR"
16815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16816$as_echo "in current directory" >&6; }
16817
16818    # WARNING: This might be a bad thing to do. You need to be sure you want to
16819    # have a configuration in this directory. Do some sanity checks!
16820
16821    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16822      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16823      # other files
16824      files_present=`$LS $OUTPUT_ROOT`
16825      # Configure has already touched config.log and confdefs.h in the current dir when this check
16826      # is performed.
16827      filtered_files=`$ECHO "$files_present" \
16828          | $SED -e 's/config.log//g' \
16829              -e 's/configure.log//g' \
16830              -e 's/confdefs.h//g' \
16831              -e 's/ //g' \
16832          | $TR -d '\n'`
16833      if test "x$filtered_files" != x; then
16834        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16835$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16836        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16837$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16838        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16839$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16840        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16841$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16842        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16843$as_echo "$as_me: seriously mess up just about everything." >&6;}
16844        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16845$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16846        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16847$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16848        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16849      fi
16850    fi
16851  fi
16852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16853$as_echo_n "checking what configuration name to use... " >&6; }
16854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16855$as_echo "$CONF_NAME" >&6; }
16856
16857
16858  # Only process if variable expands to non-empty
16859
16860  if test "x$OUTPUT_ROOT" != x; then
16861    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16862
16863  # Input might be given as Windows format, start by converting to
16864  # unix format.
16865  path="$OUTPUT_ROOT"
16866  new_path=`$CYGPATH -u "$path"`
16867
16868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16871  # "foo.exe" is OK but "foo" is an error.
16872  #
16873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16874  # It is also a way to make sure we got the proper file name for the real test later on.
16875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16876  if test "x$test_shortpath" = x; then
16877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16878$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16879    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16880  fi
16881
16882  # Call helper function which possibly converts this using DOS-style short mode.
16883  # If so, the updated path is stored in $new_path.
16884
16885  input_path="$new_path"
16886  # Check if we need to convert this using DOS-style short mode. If the path
16887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16888  # take no chances and rewrite it.
16889  # Note: m4 eats our [], so we need to use [ and ] instead.
16890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16891  if test "x$has_forbidden_chars" != x; then
16892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16896      # Going to short mode and back again did indeed matter. Since short mode is
16897      # case insensitive, let's make it lowercase to improve readability.
16898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16899      # Now convert it back to Unix-style (cygpath)
16900      input_path=`$CYGPATH -u "$shortmode_path"`
16901      new_path="$input_path"
16902    fi
16903  fi
16904
16905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16906  if test "x$test_cygdrive_prefix" = x; then
16907    # As a simple fix, exclude /usr/bin since it's not a real path.
16908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16910      # a path prefixed by /cygdrive for fixpath to work.
16911      new_path="$CYGWIN_ROOT_PATH$input_path"
16912    fi
16913  fi
16914
16915
16916  if test "x$path" != "x$new_path"; then
16917    OUTPUT_ROOT="$new_path"
16918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16919$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16920  fi
16921
16922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16923
16924  path="$OUTPUT_ROOT"
16925  has_colon=`$ECHO $path | $GREP ^.:`
16926  new_path="$path"
16927  if test "x$has_colon" = x; then
16928    # Not in mixed or Windows style, start by that.
16929    new_path=`cmd //c echo $path`
16930  fi
16931
16932
16933  input_path="$new_path"
16934  # Check if we need to convert this using DOS-style short mode. If the path
16935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16936  # take no chances and rewrite it.
16937  # Note: m4 eats our [], so we need to use [ and ] instead.
16938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16939  if test "x$has_forbidden_chars" != x; then
16940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16942  fi
16943
16944
16945  windows_path="$new_path"
16946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16947    unix_path=`$CYGPATH -u "$windows_path"`
16948    new_path="$unix_path"
16949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16951    new_path="$unix_path"
16952  fi
16953
16954  if test "x$path" != "x$new_path"; then
16955    OUTPUT_ROOT="$new_path"
16956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16957$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16958  fi
16959
16960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16962
16963    else
16964      # We're on a unix platform. Hooray! :)
16965      path="$OUTPUT_ROOT"
16966      has_space=`$ECHO "$path" | $GREP " "`
16967      if test "x$has_space" != x; then
16968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16969$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16970        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16971      fi
16972
16973      # Use eval to expand a potential ~
16974      eval path="$path"
16975      if test ! -f "$path" && test ! -d "$path"; then
16976        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16977      fi
16978
16979      if test -d "$path"; then
16980        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16981      else
16982        dir="`$DIRNAME "$path"`"
16983        base="`$BASENAME "$path"`"
16984        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16985      fi
16986    fi
16987  fi
16988
16989
16990  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16991  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16992
16993  SPEC=$OUTPUT_ROOT/spec.gmk
16994
16995  CONF_NAME=$CONF_NAME
16996
16997  OUTPUT_ROOT=$OUTPUT_ROOT
16998
16999
17000
17001  # The spec.gmk file contains all variables for the make system.
17002  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17003
17004  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17005  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17006
17007  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17008  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17009
17010  # The compare.sh is used to compare the build output to other builds.
17011  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17012
17013  # The generated Makefile knows where the spec.gmk is and where the source is.
17014  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17015  # which will look for generated configurations
17016  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17017
17018
17019
17020# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17021
17022  for ac_prog in apt-get yum port pkgutil pkgadd
17023do
17024  # Extract the first word of "$ac_prog", so it can be a program name with args.
17025set dummy $ac_prog; ac_word=$2
17026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17027$as_echo_n "checking for $ac_word... " >&6; }
17028if ${ac_cv_prog_PKGHANDLER+:} false; then :
17029  $as_echo_n "(cached) " >&6
17030else
17031  if test -n "$PKGHANDLER"; then
17032  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17033else
17034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17035for as_dir in $PATH
17036do
17037  IFS=$as_save_IFS
17038  test -z "$as_dir" && as_dir=.
17039    for ac_exec_ext in '' $ac_executable_extensions; do
17040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17041    ac_cv_prog_PKGHANDLER="$ac_prog"
17042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17043    break 2
17044  fi
17045done
17046  done
17047IFS=$as_save_IFS
17048
17049fi
17050fi
17051PKGHANDLER=$ac_cv_prog_PKGHANDLER
17052if test -n "$PKGHANDLER"; then
17053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17054$as_echo "$PKGHANDLER" >&6; }
17055else
17056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17057$as_echo "no" >&6; }
17058fi
17059
17060
17061  test -n "$PKGHANDLER" && break
17062done
17063
17064
17065
17066# Setup tools that requires more complex handling, or that is not needed by the configure script.
17067
17068
17069
17070  # Publish this variable in the help.
17071
17072
17073  if [ -z "${MAKE+x}" ]; then
17074    # The variable is not set by user, try to locate tool using the code snippet
17075
17076    # Try our hardest to locate a correct version of GNU make
17077    for ac_prog in gmake
17078do
17079  # Extract the first word of "$ac_prog", so it can be a program name with args.
17080set dummy $ac_prog; ac_word=$2
17081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17082$as_echo_n "checking for $ac_word... " >&6; }
17083if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17084  $as_echo_n "(cached) " >&6
17085else
17086  case $CHECK_GMAKE in
17087  [\\/]* | ?:[\\/]*)
17088  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17089  ;;
17090  *)
17091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17092for as_dir in $PATH
17093do
17094  IFS=$as_save_IFS
17095  test -z "$as_dir" && as_dir=.
17096    for ac_exec_ext in '' $ac_executable_extensions; do
17097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17098    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17100    break 2
17101  fi
17102done
17103  done
17104IFS=$as_save_IFS
17105
17106  ;;
17107esac
17108fi
17109CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17110if test -n "$CHECK_GMAKE"; then
17111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17112$as_echo "$CHECK_GMAKE" >&6; }
17113else
17114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17115$as_echo "no" >&6; }
17116fi
17117
17118
17119  test -n "$CHECK_GMAKE" && break
17120done
17121
17122
17123  MAKE_CANDIDATE=""$CHECK_GMAKE""
17124  DESCRIPTION="gmake in PATH"
17125
17126  # On Cygwin, we require a newer version of make than on other platforms
17127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17128    MAKE_VERSION_EXPR="-e 4\."
17129    MAKE_REQUIRED_VERSION="4.0"
17130   else
17131    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17132    MAKE_REQUIRED_VERSION="3.81"
17133  fi
17134
17135  if test "x$MAKE_CANDIDATE" != x; then
17136    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17137$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17138    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17139    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17140    if test "x$IS_GNU_MAKE" = x; then
17141      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17142$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17143    else
17144      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17145      if test "x$IS_MODERN_MAKE" = x; then
17146        { $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
17147$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;}
17148      else
17149        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17150          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17151            MAKE_EXPECTED_ENV='cygwin'
17152          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17153            MAKE_EXPECTED_ENV='msys'
17154          else
17155            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17156          fi
17157          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17158          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17159        else
17160          # Not relevant for non-Windows
17161          IS_MAKE_CORRECT_ENV=true
17162        fi
17163        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17164          { $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
17165$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;}
17166        else
17167          FOUND_MAKE=$MAKE_CANDIDATE
17168
17169  # Only process if variable expands to non-empty
17170
17171  if test "x$FOUND_MAKE" != x; then
17172    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17173
17174  # First separate the path from the arguments. This will split at the first
17175  # space.
17176  complete="$FOUND_MAKE"
17177  path="${complete%% *}"
17178  tmp="$complete EOL"
17179  arguments="${tmp#* }"
17180
17181  # Input might be given as Windows format, start by converting to
17182  # unix format.
17183  new_path=`$CYGPATH -u "$path"`
17184
17185  # Now try to locate executable using which
17186  new_path=`$WHICH "$new_path" 2> /dev/null`
17187  # bat and cmd files are not always considered executable in cygwin causing which
17188  # to not find them
17189  if test "x$new_path" = x \
17190      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17191      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17192    new_path=`$CYGPATH -u "$path"`
17193  fi
17194  if test "x$new_path" = x; then
17195    # Oops. Which didn't find the executable.
17196    # The splitting of arguments from the executable at a space might have been incorrect,
17197    # since paths with space are more likely in Windows. Give it another try with the whole
17198    # argument.
17199    path="$complete"
17200    arguments="EOL"
17201    new_path=`$CYGPATH -u "$path"`
17202    new_path=`$WHICH "$new_path" 2> /dev/null`
17203    # bat and cmd files are not always considered executable in cygwin causing which
17204    # to not find them
17205    if test "x$new_path" = x \
17206        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17207        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17208      new_path=`$CYGPATH -u "$path"`
17209    fi
17210    if test "x$new_path" = x; then
17211      # It's still not found. Now this is an unrecoverable error.
17212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17213$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17214      has_space=`$ECHO "$complete" | $GREP " "`
17215      if test "x$has_space" != x; then
17216        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17217$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17218      fi
17219      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17220    fi
17221  fi
17222
17223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17226  # "foo.exe" is OK but "foo" is an error.
17227  #
17228  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17229  # It is also a way to make sure we got the proper file name for the real test later on.
17230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17231  if test "x$test_shortpath" = x; then
17232    # Short path failed, file does not exist as specified.
17233    # Try adding .exe or .cmd
17234    if test -f "${new_path}.exe"; then
17235      input_to_shortpath="${new_path}.exe"
17236    elif test -f "${new_path}.cmd"; then
17237      input_to_shortpath="${new_path}.cmd"
17238    else
17239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17240$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17241      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17242$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17243      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17244    fi
17245  else
17246    input_to_shortpath="$new_path"
17247  fi
17248
17249  # Call helper function which possibly converts this using DOS-style short mode.
17250  # If so, the updated path is stored in $new_path.
17251  new_path="$input_to_shortpath"
17252
17253  input_path="$input_to_shortpath"
17254  # Check if we need to convert this using DOS-style short mode. If the path
17255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17256  # take no chances and rewrite it.
17257  # Note: m4 eats our [], so we need to use [ and ] instead.
17258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17259  if test "x$has_forbidden_chars" != x; then
17260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17264      # Going to short mode and back again did indeed matter. Since short mode is
17265      # case insensitive, let's make it lowercase to improve readability.
17266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17267      # Now convert it back to Unix-style (cygpath)
17268      input_path=`$CYGPATH -u "$shortmode_path"`
17269      new_path="$input_path"
17270    fi
17271  fi
17272
17273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17274  if test "x$test_cygdrive_prefix" = x; then
17275    # As a simple fix, exclude /usr/bin since it's not a real path.
17276    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17278      # a path prefixed by /cygdrive for fixpath to work.
17279      new_path="$CYGWIN_ROOT_PATH$input_path"
17280    fi
17281  fi
17282
17283  # remove trailing .exe if any
17284  new_path="${new_path/%.exe/}"
17285
17286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17287
17288  # First separate the path from the arguments. This will split at the first
17289  # space.
17290  complete="$FOUND_MAKE"
17291  path="${complete%% *}"
17292  tmp="$complete EOL"
17293  arguments="${tmp#* }"
17294
17295  # Input might be given as Windows format, start by converting to
17296  # unix format.
17297  new_path="$path"
17298
17299  windows_path="$new_path"
17300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17301    unix_path=`$CYGPATH -u "$windows_path"`
17302    new_path="$unix_path"
17303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17305    new_path="$unix_path"
17306  fi
17307
17308
17309  # Now try to locate executable using which
17310  new_path=`$WHICH "$new_path" 2> /dev/null`
17311
17312  if test "x$new_path" = x; then
17313    # Oops. Which didn't find the executable.
17314    # The splitting of arguments from the executable at a space might have been incorrect,
17315    # since paths with space are more likely in Windows. Give it another try with the whole
17316    # argument.
17317    path="$complete"
17318    arguments="EOL"
17319    new_path="$path"
17320
17321  windows_path="$new_path"
17322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17323    unix_path=`$CYGPATH -u "$windows_path"`
17324    new_path="$unix_path"
17325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17327    new_path="$unix_path"
17328  fi
17329
17330
17331    new_path=`$WHICH "$new_path" 2> /dev/null`
17332    # bat and cmd files are not always considered executable in MSYS causing which
17333    # to not find them
17334    if test "x$new_path" = x \
17335        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17336        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
17349
17350    if test "x$new_path" = x; then
17351      # It's still not found. Now this is an unrecoverable error.
17352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17353$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17354      has_space=`$ECHO "$complete" | $GREP " "`
17355      if test "x$has_space" != x; then
17356        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17357$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17358      fi
17359      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17360    fi
17361  fi
17362
17363  # Now new_path has a complete unix path to the binary
17364  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17365    # Keep paths in /bin as-is, but remove trailing .exe if any
17366    new_path="${new_path/%.exe/}"
17367    # Do not save /bin paths to all_fixpath_prefixes!
17368  else
17369    # Not in mixed or Windows style, start by that.
17370    new_path=`cmd //c echo $new_path`
17371
17372  input_path="$new_path"
17373  # Check if we need to convert this using DOS-style short mode. If the path
17374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17375  # take no chances and rewrite it.
17376  # Note: m4 eats our [], so we need to use [ and ] instead.
17377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17378  if test "x$has_forbidden_chars" != x; then
17379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17381  fi
17382
17383    # Output is in $new_path
17384
17385  windows_path="$new_path"
17386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17387    unix_path=`$CYGPATH -u "$windows_path"`
17388    new_path="$unix_path"
17389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17391    new_path="$unix_path"
17392  fi
17393
17394    # remove trailing .exe if any
17395    new_path="${new_path/%.exe/}"
17396
17397    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17398    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17399  fi
17400
17401    else
17402      # We're on a unix platform. Hooray! :)
17403      # First separate the path from the arguments. This will split at the first
17404      # space.
17405      complete="$FOUND_MAKE"
17406      path="${complete%% *}"
17407      tmp="$complete EOL"
17408      arguments="${tmp#* }"
17409
17410      # Cannot rely on the command "which" here since it doesn't always work.
17411      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17412      if test -z "$is_absolute_path"; then
17413        # Path to executable is not absolute. Find it.
17414        IFS_save="$IFS"
17415        IFS=:
17416        for p in $PATH; do
17417          if test -f "$p/$path" && test -x "$p/$path"; then
17418            new_path="$p/$path"
17419            break
17420          fi
17421        done
17422        IFS="$IFS_save"
17423      else
17424        # This is an absolute path, we can use it without further modifications.
17425        new_path="$path"
17426      fi
17427
17428      if test "x$new_path" = x; then
17429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17430$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17431        has_space=`$ECHO "$complete" | $GREP " "`
17432        if test "x$has_space" != x; then
17433          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17434$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17435        fi
17436        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17437      fi
17438    fi
17439
17440    # Now join together the path and the arguments once again
17441    if test "x$arguments" != xEOL; then
17442      new_complete="$new_path ${arguments% *}"
17443    else
17444      new_complete="$new_path"
17445    fi
17446
17447    if test "x$complete" != "x$new_complete"; then
17448      FOUND_MAKE="$new_complete"
17449      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17450$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17451    fi
17452  fi
17453
17454        fi
17455      fi
17456    fi
17457  fi
17458
17459
17460    if test "x$FOUND_MAKE" = x; then
17461      for ac_prog in make
17462do
17463  # Extract the first word of "$ac_prog", so it can be a program name with args.
17464set dummy $ac_prog; ac_word=$2
17465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17466$as_echo_n "checking for $ac_word... " >&6; }
17467if ${ac_cv_path_CHECK_MAKE+:} false; then :
17468  $as_echo_n "(cached) " >&6
17469else
17470  case $CHECK_MAKE in
17471  [\\/]* | ?:[\\/]*)
17472  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17473  ;;
17474  *)
17475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17476for as_dir in $PATH
17477do
17478  IFS=$as_save_IFS
17479  test -z "$as_dir" && as_dir=.
17480    for ac_exec_ext in '' $ac_executable_extensions; do
17481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17482    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17484    break 2
17485  fi
17486done
17487  done
17488IFS=$as_save_IFS
17489
17490  ;;
17491esac
17492fi
17493CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17494if test -n "$CHECK_MAKE"; then
17495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17496$as_echo "$CHECK_MAKE" >&6; }
17497else
17498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17499$as_echo "no" >&6; }
17500fi
17501
17502
17503  test -n "$CHECK_MAKE" && break
17504done
17505
17506
17507  MAKE_CANDIDATE=""$CHECK_MAKE""
17508  DESCRIPTION="make in PATH"
17509
17510  # On Cygwin, we require a newer version of make than on other platforms
17511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17512    MAKE_VERSION_EXPR="-e 4\."
17513    MAKE_REQUIRED_VERSION="4.0"
17514   else
17515    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17516    MAKE_REQUIRED_VERSION="3.81"
17517  fi
17518
17519  if test "x$MAKE_CANDIDATE" != x; then
17520    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17521$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17522    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17523    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17524    if test "x$IS_GNU_MAKE" = x; then
17525      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17526$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17527    else
17528      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17529      if test "x$IS_MODERN_MAKE" = x; then
17530        { $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
17531$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;}
17532      else
17533        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17534          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17535            MAKE_EXPECTED_ENV='cygwin'
17536          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17537            MAKE_EXPECTED_ENV='msys'
17538          else
17539            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17540          fi
17541          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17542          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17543        else
17544          # Not relevant for non-Windows
17545          IS_MAKE_CORRECT_ENV=true
17546        fi
17547        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17548          { $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
17549$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;}
17550        else
17551          FOUND_MAKE=$MAKE_CANDIDATE
17552
17553  # Only process if variable expands to non-empty
17554
17555  if test "x$FOUND_MAKE" != x; then
17556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17557
17558  # First separate the path from the arguments. This will split at the first
17559  # space.
17560  complete="$FOUND_MAKE"
17561  path="${complete%% *}"
17562  tmp="$complete EOL"
17563  arguments="${tmp#* }"
17564
17565  # Input might be given as Windows format, start by converting to
17566  # unix format.
17567  new_path=`$CYGPATH -u "$path"`
17568
17569  # Now try to locate executable using which
17570  new_path=`$WHICH "$new_path" 2> /dev/null`
17571  # bat and cmd files are not always considered executable in cygwin causing which
17572  # to not find them
17573  if test "x$new_path" = x \
17574      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17575      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17576    new_path=`$CYGPATH -u "$path"`
17577  fi
17578  if test "x$new_path" = x; then
17579    # Oops. Which didn't find the executable.
17580    # The splitting of arguments from the executable at a space might have been incorrect,
17581    # since paths with space are more likely in Windows. Give it another try with the whole
17582    # argument.
17583    path="$complete"
17584    arguments="EOL"
17585    new_path=`$CYGPATH -u "$path"`
17586    new_path=`$WHICH "$new_path" 2> /dev/null`
17587    # bat and cmd files are not always considered executable in cygwin causing which
17588    # to not find them
17589    if test "x$new_path" = x \
17590        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17591        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17592      new_path=`$CYGPATH -u "$path"`
17593    fi
17594    if test "x$new_path" = x; then
17595      # It's still not found. Now this is an unrecoverable error.
17596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17597$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17598      has_space=`$ECHO "$complete" | $GREP " "`
17599      if test "x$has_space" != x; then
17600        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17601$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17602      fi
17603      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17604    fi
17605  fi
17606
17607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17610  # "foo.exe" is OK but "foo" is an error.
17611  #
17612  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17613  # It is also a way to make sure we got the proper file name for the real test later on.
17614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17615  if test "x$test_shortpath" = x; then
17616    # Short path failed, file does not exist as specified.
17617    # Try adding .exe or .cmd
17618    if test -f "${new_path}.exe"; then
17619      input_to_shortpath="${new_path}.exe"
17620    elif test -f "${new_path}.cmd"; then
17621      input_to_shortpath="${new_path}.cmd"
17622    else
17623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17624$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17625      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17626$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17627      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17628    fi
17629  else
17630    input_to_shortpath="$new_path"
17631  fi
17632
17633  # Call helper function which possibly converts this using DOS-style short mode.
17634  # If so, the updated path is stored in $new_path.
17635  new_path="$input_to_shortpath"
17636
17637  input_path="$input_to_shortpath"
17638  # Check if we need to convert this using DOS-style short mode. If the path
17639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17640  # take no chances and rewrite it.
17641  # Note: m4 eats our [], so we need to use [ and ] instead.
17642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17643  if test "x$has_forbidden_chars" != x; then
17644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17648      # Going to short mode and back again did indeed matter. Since short mode is
17649      # case insensitive, let's make it lowercase to improve readability.
17650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17651      # Now convert it back to Unix-style (cygpath)
17652      input_path=`$CYGPATH -u "$shortmode_path"`
17653      new_path="$input_path"
17654    fi
17655  fi
17656
17657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17658  if test "x$test_cygdrive_prefix" = x; then
17659    # As a simple fix, exclude /usr/bin since it's not a real path.
17660    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17662      # a path prefixed by /cygdrive for fixpath to work.
17663      new_path="$CYGWIN_ROOT_PATH$input_path"
17664    fi
17665  fi
17666
17667  # remove trailing .exe if any
17668  new_path="${new_path/%.exe/}"
17669
17670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17671
17672  # First separate the path from the arguments. This will split at the first
17673  # space.
17674  complete="$FOUND_MAKE"
17675  path="${complete%% *}"
17676  tmp="$complete EOL"
17677  arguments="${tmp#* }"
17678
17679  # Input might be given as Windows format, start by converting to
17680  # unix format.
17681  new_path="$path"
17682
17683  windows_path="$new_path"
17684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17685    unix_path=`$CYGPATH -u "$windows_path"`
17686    new_path="$unix_path"
17687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17689    new_path="$unix_path"
17690  fi
17691
17692
17693  # Now try to locate executable using which
17694  new_path=`$WHICH "$new_path" 2> /dev/null`
17695
17696  if test "x$new_path" = x; then
17697    # Oops. Which didn't find the executable.
17698    # The splitting of arguments from the executable at a space might have been incorrect,
17699    # since paths with space are more likely in Windows. Give it another try with the whole
17700    # argument.
17701    path="$complete"
17702    arguments="EOL"
17703    new_path="$path"
17704
17705  windows_path="$new_path"
17706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17707    unix_path=`$CYGPATH -u "$windows_path"`
17708    new_path="$unix_path"
17709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17711    new_path="$unix_path"
17712  fi
17713
17714
17715    new_path=`$WHICH "$new_path" 2> /dev/null`
17716    # bat and cmd files are not always considered executable in MSYS causing which
17717    # to not find them
17718    if test "x$new_path" = x \
17719        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17720        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
17733
17734    if test "x$new_path" = x; then
17735      # It's still not found. Now this is an unrecoverable error.
17736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17737$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17738      has_space=`$ECHO "$complete" | $GREP " "`
17739      if test "x$has_space" != x; then
17740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17742      fi
17743      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17744    fi
17745  fi
17746
17747  # Now new_path has a complete unix path to the binary
17748  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17749    # Keep paths in /bin as-is, but remove trailing .exe if any
17750    new_path="${new_path/%.exe/}"
17751    # Do not save /bin paths to all_fixpath_prefixes!
17752  else
17753    # Not in mixed or Windows style, start by that.
17754    new_path=`cmd //c echo $new_path`
17755
17756  input_path="$new_path"
17757  # Check if we need to convert this using DOS-style short mode. If the path
17758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17759  # take no chances and rewrite it.
17760  # Note: m4 eats our [], so we need to use [ and ] instead.
17761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17762  if test "x$has_forbidden_chars" != x; then
17763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17765  fi
17766
17767    # Output is in $new_path
17768
17769  windows_path="$new_path"
17770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17771    unix_path=`$CYGPATH -u "$windows_path"`
17772    new_path="$unix_path"
17773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17775    new_path="$unix_path"
17776  fi
17777
17778    # remove trailing .exe if any
17779    new_path="${new_path/%.exe/}"
17780
17781    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17782    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17783  fi
17784
17785    else
17786      # We're on a unix platform. Hooray! :)
17787      # First separate the path from the arguments. This will split at the first
17788      # space.
17789      complete="$FOUND_MAKE"
17790      path="${complete%% *}"
17791      tmp="$complete EOL"
17792      arguments="${tmp#* }"
17793
17794      # Cannot rely on the command "which" here since it doesn't always work.
17795      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17796      if test -z "$is_absolute_path"; then
17797        # Path to executable is not absolute. Find it.
17798        IFS_save="$IFS"
17799        IFS=:
17800        for p in $PATH; do
17801          if test -f "$p/$path" && test -x "$p/$path"; then
17802            new_path="$p/$path"
17803            break
17804          fi
17805        done
17806        IFS="$IFS_save"
17807      else
17808        # This is an absolute path, we can use it without further modifications.
17809        new_path="$path"
17810      fi
17811
17812      if test "x$new_path" = x; then
17813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17814$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17815        has_space=`$ECHO "$complete" | $GREP " "`
17816        if test "x$has_space" != x; then
17817          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17818$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17819        fi
17820        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17821      fi
17822    fi
17823
17824    # Now join together the path and the arguments once again
17825    if test "x$arguments" != xEOL; then
17826      new_complete="$new_path ${arguments% *}"
17827    else
17828      new_complete="$new_path"
17829    fi
17830
17831    if test "x$complete" != "x$new_complete"; then
17832      FOUND_MAKE="$new_complete"
17833      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17834$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17835    fi
17836  fi
17837
17838        fi
17839      fi
17840    fi
17841  fi
17842
17843    fi
17844
17845    if test "x$FOUND_MAKE" = x; then
17846      if test "x$TOOLCHAIN_PATH" != x; then
17847        # We have a toolchain path, check that as well before giving up.
17848        OLD_PATH=$PATH
17849        PATH=$TOOLCHAIN_PATH:$PATH
17850        for ac_prog in gmake
17851do
17852  # Extract the first word of "$ac_prog", so it can be a program name with args.
17853set dummy $ac_prog; ac_word=$2
17854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17855$as_echo_n "checking for $ac_word... " >&6; }
17856if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17857  $as_echo_n "(cached) " >&6
17858else
17859  case $CHECK_TOOLSDIR_GMAKE in
17860  [\\/]* | ?:[\\/]*)
17861  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17862  ;;
17863  *)
17864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17865for as_dir in $PATH
17866do
17867  IFS=$as_save_IFS
17868  test -z "$as_dir" && as_dir=.
17869    for ac_exec_ext in '' $ac_executable_extensions; do
17870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17871    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17873    break 2
17874  fi
17875done
17876  done
17877IFS=$as_save_IFS
17878
17879  ;;
17880esac
17881fi
17882CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17883if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17885$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17886else
17887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17888$as_echo "no" >&6; }
17889fi
17890
17891
17892  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17893done
17894
17895
17896  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17897  DESCRIPTION="gmake in tools-dir"
17898
17899  # On Cygwin, we require a newer version of make than on other platforms
17900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17901    MAKE_VERSION_EXPR="-e 4\."
17902    MAKE_REQUIRED_VERSION="4.0"
17903   else
17904    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17905    MAKE_REQUIRED_VERSION="3.81"
17906  fi
17907
17908  if test "x$MAKE_CANDIDATE" != x; then
17909    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17910$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17911    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17912    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17913    if test "x$IS_GNU_MAKE" = x; then
17914      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17915$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17916    else
17917      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17918      if test "x$IS_MODERN_MAKE" = x; then
17919        { $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
17920$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;}
17921      else
17922        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17923          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17924            MAKE_EXPECTED_ENV='cygwin'
17925          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17926            MAKE_EXPECTED_ENV='msys'
17927          else
17928            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17929          fi
17930          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17931          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17932        else
17933          # Not relevant for non-Windows
17934          IS_MAKE_CORRECT_ENV=true
17935        fi
17936        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17937          { $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
17938$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;}
17939        else
17940          FOUND_MAKE=$MAKE_CANDIDATE
17941
17942  # Only process if variable expands to non-empty
17943
17944  if test "x$FOUND_MAKE" != x; then
17945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17946
17947  # First separate the path from the arguments. This will split at the first
17948  # space.
17949  complete="$FOUND_MAKE"
17950  path="${complete%% *}"
17951  tmp="$complete EOL"
17952  arguments="${tmp#* }"
17953
17954  # Input might be given as Windows format, start by converting to
17955  # unix format.
17956  new_path=`$CYGPATH -u "$path"`
17957
17958  # Now try to locate executable using which
17959  new_path=`$WHICH "$new_path" 2> /dev/null`
17960  # bat and cmd files are not always considered executable in cygwin causing which
17961  # to not find them
17962  if test "x$new_path" = x \
17963      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17964      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17965    new_path=`$CYGPATH -u "$path"`
17966  fi
17967  if test "x$new_path" = x; then
17968    # Oops. Which didn't find the executable.
17969    # The splitting of arguments from the executable at a space might have been incorrect,
17970    # since paths with space are more likely in Windows. Give it another try with the whole
17971    # argument.
17972    path="$complete"
17973    arguments="EOL"
17974    new_path=`$CYGPATH -u "$path"`
17975    new_path=`$WHICH "$new_path" 2> /dev/null`
17976    # bat and cmd files are not always considered executable in cygwin causing which
17977    # to not find them
17978    if test "x$new_path" = x \
17979        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17980        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17981      new_path=`$CYGPATH -u "$path"`
17982    fi
17983    if test "x$new_path" = x; then
17984      # It's still not found. Now this is an unrecoverable error.
17985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17986$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17987      has_space=`$ECHO "$complete" | $GREP " "`
17988      if test "x$has_space" != x; then
17989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17991      fi
17992      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17993    fi
17994  fi
17995
17996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17999  # "foo.exe" is OK but "foo" is an error.
18000  #
18001  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18002  # It is also a way to make sure we got the proper file name for the real test later on.
18003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18004  if test "x$test_shortpath" = x; then
18005    # Short path failed, file does not exist as specified.
18006    # Try adding .exe or .cmd
18007    if test -f "${new_path}.exe"; then
18008      input_to_shortpath="${new_path}.exe"
18009    elif test -f "${new_path}.cmd"; then
18010      input_to_shortpath="${new_path}.cmd"
18011    else
18012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18013$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18014      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18015$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18016      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18017    fi
18018  else
18019    input_to_shortpath="$new_path"
18020  fi
18021
18022  # Call helper function which possibly converts this using DOS-style short mode.
18023  # If so, the updated path is stored in $new_path.
18024  new_path="$input_to_shortpath"
18025
18026  input_path="$input_to_shortpath"
18027  # Check if we need to convert this using DOS-style short mode. If the path
18028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18029  # take no chances and rewrite it.
18030  # Note: m4 eats our [], so we need to use [ and ] instead.
18031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18032  if test "x$has_forbidden_chars" != x; then
18033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18037      # Going to short mode and back again did indeed matter. Since short mode is
18038      # case insensitive, let's make it lowercase to improve readability.
18039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18040      # Now convert it back to Unix-style (cygpath)
18041      input_path=`$CYGPATH -u "$shortmode_path"`
18042      new_path="$input_path"
18043    fi
18044  fi
18045
18046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18047  if test "x$test_cygdrive_prefix" = x; then
18048    # As a simple fix, exclude /usr/bin since it's not a real path.
18049    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18051      # a path prefixed by /cygdrive for fixpath to work.
18052      new_path="$CYGWIN_ROOT_PATH$input_path"
18053    fi
18054  fi
18055
18056  # remove trailing .exe if any
18057  new_path="${new_path/%.exe/}"
18058
18059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18060
18061  # First separate the path from the arguments. This will split at the first
18062  # space.
18063  complete="$FOUND_MAKE"
18064  path="${complete%% *}"
18065  tmp="$complete EOL"
18066  arguments="${tmp#* }"
18067
18068  # Input might be given as Windows format, start by converting to
18069  # unix format.
18070  new_path="$path"
18071
18072  windows_path="$new_path"
18073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18074    unix_path=`$CYGPATH -u "$windows_path"`
18075    new_path="$unix_path"
18076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18078    new_path="$unix_path"
18079  fi
18080
18081
18082  # Now try to locate executable using which
18083  new_path=`$WHICH "$new_path" 2> /dev/null`
18084
18085  if test "x$new_path" = x; then
18086    # Oops. Which didn't find the executable.
18087    # The splitting of arguments from the executable at a space might have been incorrect,
18088    # since paths with space are more likely in Windows. Give it another try with the whole
18089    # argument.
18090    path="$complete"
18091    arguments="EOL"
18092    new_path="$path"
18093
18094  windows_path="$new_path"
18095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18096    unix_path=`$CYGPATH -u "$windows_path"`
18097    new_path="$unix_path"
18098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18100    new_path="$unix_path"
18101  fi
18102
18103
18104    new_path=`$WHICH "$new_path" 2> /dev/null`
18105    # bat and cmd files are not always considered executable in MSYS causing which
18106    # to not find them
18107    if test "x$new_path" = x \
18108        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18109        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
18122
18123    if test "x$new_path" = x; then
18124      # It's still not found. Now this is an unrecoverable error.
18125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18126$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18127      has_space=`$ECHO "$complete" | $GREP " "`
18128      if test "x$has_space" != x; then
18129        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18130$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18131      fi
18132      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18133    fi
18134  fi
18135
18136  # Now new_path has a complete unix path to the binary
18137  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18138    # Keep paths in /bin as-is, but remove trailing .exe if any
18139    new_path="${new_path/%.exe/}"
18140    # Do not save /bin paths to all_fixpath_prefixes!
18141  else
18142    # Not in mixed or Windows style, start by that.
18143    new_path=`cmd //c echo $new_path`
18144
18145  input_path="$new_path"
18146  # Check if we need to convert this using DOS-style short mode. If the path
18147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18148  # take no chances and rewrite it.
18149  # Note: m4 eats our [], so we need to use [ and ] instead.
18150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18151  if test "x$has_forbidden_chars" != x; then
18152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18154  fi
18155
18156    # Output is in $new_path
18157
18158  windows_path="$new_path"
18159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18160    unix_path=`$CYGPATH -u "$windows_path"`
18161    new_path="$unix_path"
18162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18164    new_path="$unix_path"
18165  fi
18166
18167    # remove trailing .exe if any
18168    new_path="${new_path/%.exe/}"
18169
18170    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18171    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18172  fi
18173
18174    else
18175      # We're on a unix platform. Hooray! :)
18176      # First separate the path from the arguments. This will split at the first
18177      # space.
18178      complete="$FOUND_MAKE"
18179      path="${complete%% *}"
18180      tmp="$complete EOL"
18181      arguments="${tmp#* }"
18182
18183      # Cannot rely on the command "which" here since it doesn't always work.
18184      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18185      if test -z "$is_absolute_path"; then
18186        # Path to executable is not absolute. Find it.
18187        IFS_save="$IFS"
18188        IFS=:
18189        for p in $PATH; do
18190          if test -f "$p/$path" && test -x "$p/$path"; then
18191            new_path="$p/$path"
18192            break
18193          fi
18194        done
18195        IFS="$IFS_save"
18196      else
18197        # This is an absolute path, we can use it without further modifications.
18198        new_path="$path"
18199      fi
18200
18201      if test "x$new_path" = x; then
18202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18203$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18204        has_space=`$ECHO "$complete" | $GREP " "`
18205        if test "x$has_space" != x; then
18206          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18207$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18208        fi
18209        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18210      fi
18211    fi
18212
18213    # Now join together the path and the arguments once again
18214    if test "x$arguments" != xEOL; then
18215      new_complete="$new_path ${arguments% *}"
18216    else
18217      new_complete="$new_path"
18218    fi
18219
18220    if test "x$complete" != "x$new_complete"; then
18221      FOUND_MAKE="$new_complete"
18222      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18223$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18224    fi
18225  fi
18226
18227        fi
18228      fi
18229    fi
18230  fi
18231
18232        if test "x$FOUND_MAKE" = x; then
18233          for ac_prog in make
18234do
18235  # Extract the first word of "$ac_prog", so it can be a program name with args.
18236set dummy $ac_prog; ac_word=$2
18237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18238$as_echo_n "checking for $ac_word... " >&6; }
18239if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18240  $as_echo_n "(cached) " >&6
18241else
18242  case $CHECK_TOOLSDIR_MAKE in
18243  [\\/]* | ?:[\\/]*)
18244  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18245  ;;
18246  *)
18247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18248for as_dir in $PATH
18249do
18250  IFS=$as_save_IFS
18251  test -z "$as_dir" && as_dir=.
18252    for ac_exec_ext in '' $ac_executable_extensions; do
18253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18254    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18256    break 2
18257  fi
18258done
18259  done
18260IFS=$as_save_IFS
18261
18262  ;;
18263esac
18264fi
18265CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18266if test -n "$CHECK_TOOLSDIR_MAKE"; then
18267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18268$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18269else
18270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18271$as_echo "no" >&6; }
18272fi
18273
18274
18275  test -n "$CHECK_TOOLSDIR_MAKE" && break
18276done
18277
18278
18279  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18280  DESCRIPTION="make in tools-dir"
18281
18282  # On Cygwin, we require a newer version of make than on other platforms
18283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18284    MAKE_VERSION_EXPR="-e 4\."
18285    MAKE_REQUIRED_VERSION="4.0"
18286   else
18287    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18288    MAKE_REQUIRED_VERSION="3.81"
18289  fi
18290
18291  if test "x$MAKE_CANDIDATE" != x; then
18292    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18293$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18294    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18295    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18296    if test "x$IS_GNU_MAKE" = x; then
18297      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18298$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18299    else
18300      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18301      if test "x$IS_MODERN_MAKE" = x; then
18302        { $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
18303$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;}
18304      else
18305        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18306          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18307            MAKE_EXPECTED_ENV='cygwin'
18308          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18309            MAKE_EXPECTED_ENV='msys'
18310          else
18311            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18312          fi
18313          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18314          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18315        else
18316          # Not relevant for non-Windows
18317          IS_MAKE_CORRECT_ENV=true
18318        fi
18319        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18320          { $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
18321$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;}
18322        else
18323          FOUND_MAKE=$MAKE_CANDIDATE
18324
18325  # Only process if variable expands to non-empty
18326
18327  if test "x$FOUND_MAKE" != x; then
18328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18329
18330  # First separate the path from the arguments. This will split at the first
18331  # space.
18332  complete="$FOUND_MAKE"
18333  path="${complete%% *}"
18334  tmp="$complete EOL"
18335  arguments="${tmp#* }"
18336
18337  # Input might be given as Windows format, start by converting to
18338  # unix format.
18339  new_path=`$CYGPATH -u "$path"`
18340
18341  # Now try to locate executable using which
18342  new_path=`$WHICH "$new_path" 2> /dev/null`
18343  # bat and cmd files are not always considered executable in cygwin causing which
18344  # to not find them
18345  if test "x$new_path" = x \
18346      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18347      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18348    new_path=`$CYGPATH -u "$path"`
18349  fi
18350  if test "x$new_path" = x; then
18351    # Oops. Which didn't find the executable.
18352    # The splitting of arguments from the executable at a space might have been incorrect,
18353    # since paths with space are more likely in Windows. Give it another try with the whole
18354    # argument.
18355    path="$complete"
18356    arguments="EOL"
18357    new_path=`$CYGPATH -u "$path"`
18358    new_path=`$WHICH "$new_path" 2> /dev/null`
18359    # bat and cmd files are not always considered executable in cygwin causing which
18360    # to not find them
18361    if test "x$new_path" = x \
18362        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18363        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18364      new_path=`$CYGPATH -u "$path"`
18365    fi
18366    if test "x$new_path" = x; then
18367      # It's still not found. Now this is an unrecoverable error.
18368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18369$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18370      has_space=`$ECHO "$complete" | $GREP " "`
18371      if test "x$has_space" != x; then
18372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18374      fi
18375      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18376    fi
18377  fi
18378
18379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18382  # "foo.exe" is OK but "foo" is an error.
18383  #
18384  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18385  # It is also a way to make sure we got the proper file name for the real test later on.
18386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18387  if test "x$test_shortpath" = x; then
18388    # Short path failed, file does not exist as specified.
18389    # Try adding .exe or .cmd
18390    if test -f "${new_path}.exe"; then
18391      input_to_shortpath="${new_path}.exe"
18392    elif test -f "${new_path}.cmd"; then
18393      input_to_shortpath="${new_path}.cmd"
18394    else
18395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18396$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18397      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18398$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18399      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18400    fi
18401  else
18402    input_to_shortpath="$new_path"
18403  fi
18404
18405  # Call helper function which possibly converts this using DOS-style short mode.
18406  # If so, the updated path is stored in $new_path.
18407  new_path="$input_to_shortpath"
18408
18409  input_path="$input_to_shortpath"
18410  # Check if we need to convert this using DOS-style short mode. If the path
18411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18412  # take no chances and rewrite it.
18413  # Note: m4 eats our [], so we need to use [ and ] instead.
18414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18415  if test "x$has_forbidden_chars" != x; then
18416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18420      # Going to short mode and back again did indeed matter. Since short mode is
18421      # case insensitive, let's make it lowercase to improve readability.
18422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18423      # Now convert it back to Unix-style (cygpath)
18424      input_path=`$CYGPATH -u "$shortmode_path"`
18425      new_path="$input_path"
18426    fi
18427  fi
18428
18429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18430  if test "x$test_cygdrive_prefix" = x; then
18431    # As a simple fix, exclude /usr/bin since it's not a real path.
18432    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18434      # a path prefixed by /cygdrive for fixpath to work.
18435      new_path="$CYGWIN_ROOT_PATH$input_path"
18436    fi
18437  fi
18438
18439  # remove trailing .exe if any
18440  new_path="${new_path/%.exe/}"
18441
18442    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18443
18444  # First separate the path from the arguments. This will split at the first
18445  # space.
18446  complete="$FOUND_MAKE"
18447  path="${complete%% *}"
18448  tmp="$complete EOL"
18449  arguments="${tmp#* }"
18450
18451  # Input might be given as Windows format, start by converting to
18452  # unix format.
18453  new_path="$path"
18454
18455  windows_path="$new_path"
18456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18457    unix_path=`$CYGPATH -u "$windows_path"`
18458    new_path="$unix_path"
18459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18461    new_path="$unix_path"
18462  fi
18463
18464
18465  # Now try to locate executable using which
18466  new_path=`$WHICH "$new_path" 2> /dev/null`
18467
18468  if test "x$new_path" = x; then
18469    # Oops. Which didn't find the executable.
18470    # The splitting of arguments from the executable at a space might have been incorrect,
18471    # since paths with space are more likely in Windows. Give it another try with the whole
18472    # argument.
18473    path="$complete"
18474    arguments="EOL"
18475    new_path="$path"
18476
18477  windows_path="$new_path"
18478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18479    unix_path=`$CYGPATH -u "$windows_path"`
18480    new_path="$unix_path"
18481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18483    new_path="$unix_path"
18484  fi
18485
18486
18487    new_path=`$WHICH "$new_path" 2> /dev/null`
18488    # bat and cmd files are not always considered executable in MSYS causing which
18489    # to not find them
18490    if test "x$new_path" = x \
18491        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18492        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
18505
18506    if test "x$new_path" = x; then
18507      # It's still not found. Now this is an unrecoverable error.
18508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18509$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18510      has_space=`$ECHO "$complete" | $GREP " "`
18511      if test "x$has_space" != x; then
18512        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18513$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18514      fi
18515      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18516    fi
18517  fi
18518
18519  # Now new_path has a complete unix path to the binary
18520  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18521    # Keep paths in /bin as-is, but remove trailing .exe if any
18522    new_path="${new_path/%.exe/}"
18523    # Do not save /bin paths to all_fixpath_prefixes!
18524  else
18525    # Not in mixed or Windows style, start by that.
18526    new_path=`cmd //c echo $new_path`
18527
18528  input_path="$new_path"
18529  # Check if we need to convert this using DOS-style short mode. If the path
18530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18531  # take no chances and rewrite it.
18532  # Note: m4 eats our [], so we need to use [ and ] instead.
18533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18534  if test "x$has_forbidden_chars" != x; then
18535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18537  fi
18538
18539    # Output is in $new_path
18540
18541  windows_path="$new_path"
18542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18543    unix_path=`$CYGPATH -u "$windows_path"`
18544    new_path="$unix_path"
18545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18547    new_path="$unix_path"
18548  fi
18549
18550    # remove trailing .exe if any
18551    new_path="${new_path/%.exe/}"
18552
18553    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18554    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18555  fi
18556
18557    else
18558      # We're on a unix platform. Hooray! :)
18559      # First separate the path from the arguments. This will split at the first
18560      # space.
18561      complete="$FOUND_MAKE"
18562      path="${complete%% *}"
18563      tmp="$complete EOL"
18564      arguments="${tmp#* }"
18565
18566      # Cannot rely on the command "which" here since it doesn't always work.
18567      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18568      if test -z "$is_absolute_path"; then
18569        # Path to executable is not absolute. Find it.
18570        IFS_save="$IFS"
18571        IFS=:
18572        for p in $PATH; do
18573          if test -f "$p/$path" && test -x "$p/$path"; then
18574            new_path="$p/$path"
18575            break
18576          fi
18577        done
18578        IFS="$IFS_save"
18579      else
18580        # This is an absolute path, we can use it without further modifications.
18581        new_path="$path"
18582      fi
18583
18584      if test "x$new_path" = x; then
18585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18586$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18587        has_space=`$ECHO "$complete" | $GREP " "`
18588        if test "x$has_space" != x; then
18589          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18590$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18591        fi
18592        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18593      fi
18594    fi
18595
18596    # Now join together the path and the arguments once again
18597    if test "x$arguments" != xEOL; then
18598      new_complete="$new_path ${arguments% *}"
18599    else
18600      new_complete="$new_path"
18601    fi
18602
18603    if test "x$complete" != "x$new_complete"; then
18604      FOUND_MAKE="$new_complete"
18605      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18606$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18607    fi
18608  fi
18609
18610        fi
18611      fi
18612    fi
18613  fi
18614
18615        fi
18616        PATH=$OLD_PATH
18617      fi
18618    fi
18619
18620    if test "x$FOUND_MAKE" = x; then
18621      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
18622    fi
18623
18624  else
18625    # The variable is set, but is it from the command line or the environment?
18626
18627    # Try to remove the string !MAKE! from our list.
18628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18630      # If it failed, the variable was not from the command line. Ignore it,
18631      # but warn the user (except for BASH, which is always set by the calling BASH).
18632      if test "xMAKE" != xBASH; then
18633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18634$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18635      fi
18636      # Try to locate tool using the code snippet
18637
18638    # Try our hardest to locate a correct version of GNU make
18639    for ac_prog in gmake
18640do
18641  # Extract the first word of "$ac_prog", so it can be a program name with args.
18642set dummy $ac_prog; ac_word=$2
18643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18644$as_echo_n "checking for $ac_word... " >&6; }
18645if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18646  $as_echo_n "(cached) " >&6
18647else
18648  case $CHECK_GMAKE in
18649  [\\/]* | ?:[\\/]*)
18650  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18651  ;;
18652  *)
18653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18654for as_dir in $PATH
18655do
18656  IFS=$as_save_IFS
18657  test -z "$as_dir" && as_dir=.
18658    for ac_exec_ext in '' $ac_executable_extensions; do
18659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18660    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18662    break 2
18663  fi
18664done
18665  done
18666IFS=$as_save_IFS
18667
18668  ;;
18669esac
18670fi
18671CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18672if test -n "$CHECK_GMAKE"; then
18673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18674$as_echo "$CHECK_GMAKE" >&6; }
18675else
18676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18677$as_echo "no" >&6; }
18678fi
18679
18680
18681  test -n "$CHECK_GMAKE" && break
18682done
18683
18684
18685  MAKE_CANDIDATE=""$CHECK_GMAKE""
18686  DESCRIPTION="gmake in PATH"
18687
18688  # On Cygwin, we require a newer version of make than on other platforms
18689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18690    MAKE_VERSION_EXPR="-e 4\."
18691    MAKE_REQUIRED_VERSION="4.0"
18692   else
18693    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18694    MAKE_REQUIRED_VERSION="3.81"
18695  fi
18696
18697  if test "x$MAKE_CANDIDATE" != x; then
18698    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18699$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18700    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18701    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18702    if test "x$IS_GNU_MAKE" = x; then
18703      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18704$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18705    else
18706      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18707      if test "x$IS_MODERN_MAKE" = x; then
18708        { $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
18709$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;}
18710      else
18711        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18712          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18713            MAKE_EXPECTED_ENV='cygwin'
18714          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18715            MAKE_EXPECTED_ENV='msys'
18716          else
18717            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18718          fi
18719          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18720          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18721        else
18722          # Not relevant for non-Windows
18723          IS_MAKE_CORRECT_ENV=true
18724        fi
18725        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18726          { $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
18727$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;}
18728        else
18729          FOUND_MAKE=$MAKE_CANDIDATE
18730
18731  # Only process if variable expands to non-empty
18732
18733  if test "x$FOUND_MAKE" != x; then
18734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18735
18736  # First separate the path from the arguments. This will split at the first
18737  # space.
18738  complete="$FOUND_MAKE"
18739  path="${complete%% *}"
18740  tmp="$complete EOL"
18741  arguments="${tmp#* }"
18742
18743  # Input might be given as Windows format, start by converting to
18744  # unix format.
18745  new_path=`$CYGPATH -u "$path"`
18746
18747  # Now try to locate executable using which
18748  new_path=`$WHICH "$new_path" 2> /dev/null`
18749  # bat and cmd files are not always considered executable in cygwin causing which
18750  # to not find them
18751  if test "x$new_path" = x \
18752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18754    new_path=`$CYGPATH -u "$path"`
18755  fi
18756  if test "x$new_path" = x; then
18757    # Oops. Which didn't find the executable.
18758    # The splitting of arguments from the executable at a space might have been incorrect,
18759    # since paths with space are more likely in Windows. Give it another try with the whole
18760    # argument.
18761    path="$complete"
18762    arguments="EOL"
18763    new_path=`$CYGPATH -u "$path"`
18764    new_path=`$WHICH "$new_path" 2> /dev/null`
18765    # bat and cmd files are not always considered executable in cygwin causing which
18766    # to not find them
18767    if test "x$new_path" = x \
18768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18770      new_path=`$CYGPATH -u "$path"`
18771    fi
18772    if test "x$new_path" = x; then
18773      # It's still not found. Now this is an unrecoverable error.
18774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18775$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18776      has_space=`$ECHO "$complete" | $GREP " "`
18777      if test "x$has_space" != x; then
18778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18780      fi
18781      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18782    fi
18783  fi
18784
18785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18788  # "foo.exe" is OK but "foo" is an error.
18789  #
18790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18791  # It is also a way to make sure we got the proper file name for the real test later on.
18792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18793  if test "x$test_shortpath" = x; then
18794    # Short path failed, file does not exist as specified.
18795    # Try adding .exe or .cmd
18796    if test -f "${new_path}.exe"; then
18797      input_to_shortpath="${new_path}.exe"
18798    elif test -f "${new_path}.cmd"; then
18799      input_to_shortpath="${new_path}.cmd"
18800    else
18801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18802$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18805      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18806    fi
18807  else
18808    input_to_shortpath="$new_path"
18809  fi
18810
18811  # Call helper function which possibly converts this using DOS-style short mode.
18812  # If so, the updated path is stored in $new_path.
18813  new_path="$input_to_shortpath"
18814
18815  input_path="$input_to_shortpath"
18816  # Check if we need to convert this using DOS-style short mode. If the path
18817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18818  # take no chances and rewrite it.
18819  # Note: m4 eats our [], so we need to use [ and ] instead.
18820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18821  if test "x$has_forbidden_chars" != x; then
18822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18826      # Going to short mode and back again did indeed matter. Since short mode is
18827      # case insensitive, let's make it lowercase to improve readability.
18828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18829      # Now convert it back to Unix-style (cygpath)
18830      input_path=`$CYGPATH -u "$shortmode_path"`
18831      new_path="$input_path"
18832    fi
18833  fi
18834
18835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18836  if test "x$test_cygdrive_prefix" = x; then
18837    # As a simple fix, exclude /usr/bin since it's not a real path.
18838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18840      # a path prefixed by /cygdrive for fixpath to work.
18841      new_path="$CYGWIN_ROOT_PATH$input_path"
18842    fi
18843  fi
18844
18845  # remove trailing .exe if any
18846  new_path="${new_path/%.exe/}"
18847
18848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18849
18850  # First separate the path from the arguments. This will split at the first
18851  # space.
18852  complete="$FOUND_MAKE"
18853  path="${complete%% *}"
18854  tmp="$complete EOL"
18855  arguments="${tmp#* }"
18856
18857  # Input might be given as Windows format, start by converting to
18858  # unix format.
18859  new_path="$path"
18860
18861  windows_path="$new_path"
18862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18863    unix_path=`$CYGPATH -u "$windows_path"`
18864    new_path="$unix_path"
18865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18867    new_path="$unix_path"
18868  fi
18869
18870
18871  # Now try to locate executable using which
18872  new_path=`$WHICH "$new_path" 2> /dev/null`
18873
18874  if test "x$new_path" = x; then
18875    # Oops. Which didn't find the executable.
18876    # The splitting of arguments from the executable at a space might have been incorrect,
18877    # since paths with space are more likely in Windows. Give it another try with the whole
18878    # argument.
18879    path="$complete"
18880    arguments="EOL"
18881    new_path="$path"
18882
18883  windows_path="$new_path"
18884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18885    unix_path=`$CYGPATH -u "$windows_path"`
18886    new_path="$unix_path"
18887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18889    new_path="$unix_path"
18890  fi
18891
18892
18893    new_path=`$WHICH "$new_path" 2> /dev/null`
18894    # bat and cmd files are not always considered executable in MSYS causing which
18895    # to not find them
18896    if test "x$new_path" = x \
18897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
18911
18912    if test "x$new_path" = x; then
18913      # It's still not found. Now this is an unrecoverable error.
18914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18915$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18916      has_space=`$ECHO "$complete" | $GREP " "`
18917      if test "x$has_space" != x; then
18918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18920      fi
18921      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18922    fi
18923  fi
18924
18925  # Now new_path has a complete unix path to the binary
18926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18927    # Keep paths in /bin as-is, but remove trailing .exe if any
18928    new_path="${new_path/%.exe/}"
18929    # Do not save /bin paths to all_fixpath_prefixes!
18930  else
18931    # Not in mixed or Windows style, start by that.
18932    new_path=`cmd //c echo $new_path`
18933
18934  input_path="$new_path"
18935  # Check if we need to convert this using DOS-style short mode. If the path
18936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18937  # take no chances and rewrite it.
18938  # Note: m4 eats our [], so we need to use [ and ] instead.
18939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18940  if test "x$has_forbidden_chars" != x; then
18941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18943  fi
18944
18945    # Output is in $new_path
18946
18947  windows_path="$new_path"
18948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18949    unix_path=`$CYGPATH -u "$windows_path"`
18950    new_path="$unix_path"
18951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18953    new_path="$unix_path"
18954  fi
18955
18956    # remove trailing .exe if any
18957    new_path="${new_path/%.exe/}"
18958
18959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18961  fi
18962
18963    else
18964      # We're on a unix platform. Hooray! :)
18965      # First separate the path from the arguments. This will split at the first
18966      # space.
18967      complete="$FOUND_MAKE"
18968      path="${complete%% *}"
18969      tmp="$complete EOL"
18970      arguments="${tmp#* }"
18971
18972      # Cannot rely on the command "which" here since it doesn't always work.
18973      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18974      if test -z "$is_absolute_path"; then
18975        # Path to executable is not absolute. Find it.
18976        IFS_save="$IFS"
18977        IFS=:
18978        for p in $PATH; do
18979          if test -f "$p/$path" && test -x "$p/$path"; then
18980            new_path="$p/$path"
18981            break
18982          fi
18983        done
18984        IFS="$IFS_save"
18985      else
18986        # This is an absolute path, we can use it without further modifications.
18987        new_path="$path"
18988      fi
18989
18990      if test "x$new_path" = x; then
18991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18992$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18993        has_space=`$ECHO "$complete" | $GREP " "`
18994        if test "x$has_space" != x; then
18995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18997        fi
18998        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18999      fi
19000    fi
19001
19002    # Now join together the path and the arguments once again
19003    if test "x$arguments" != xEOL; then
19004      new_complete="$new_path ${arguments% *}"
19005    else
19006      new_complete="$new_path"
19007    fi
19008
19009    if test "x$complete" != "x$new_complete"; then
19010      FOUND_MAKE="$new_complete"
19011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19012$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19013    fi
19014  fi
19015
19016        fi
19017      fi
19018    fi
19019  fi
19020
19021
19022    if test "x$FOUND_MAKE" = x; then
19023      for ac_prog in make
19024do
19025  # Extract the first word of "$ac_prog", so it can be a program name with args.
19026set dummy $ac_prog; ac_word=$2
19027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19028$as_echo_n "checking for $ac_word... " >&6; }
19029if ${ac_cv_path_CHECK_MAKE+:} false; then :
19030  $as_echo_n "(cached) " >&6
19031else
19032  case $CHECK_MAKE in
19033  [\\/]* | ?:[\\/]*)
19034  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19035  ;;
19036  *)
19037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19038for as_dir in $PATH
19039do
19040  IFS=$as_save_IFS
19041  test -z "$as_dir" && as_dir=.
19042    for ac_exec_ext in '' $ac_executable_extensions; do
19043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19044    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19046    break 2
19047  fi
19048done
19049  done
19050IFS=$as_save_IFS
19051
19052  ;;
19053esac
19054fi
19055CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19056if test -n "$CHECK_MAKE"; then
19057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19058$as_echo "$CHECK_MAKE" >&6; }
19059else
19060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19061$as_echo "no" >&6; }
19062fi
19063
19064
19065  test -n "$CHECK_MAKE" && break
19066done
19067
19068
19069  MAKE_CANDIDATE=""$CHECK_MAKE""
19070  DESCRIPTION="make in PATH"
19071
19072  # On Cygwin, we require a newer version of make than on other platforms
19073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19074    MAKE_VERSION_EXPR="-e 4\."
19075    MAKE_REQUIRED_VERSION="4.0"
19076   else
19077    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19078    MAKE_REQUIRED_VERSION="3.81"
19079  fi
19080
19081  if test "x$MAKE_CANDIDATE" != x; then
19082    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19083$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19084    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19085    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19086    if test "x$IS_GNU_MAKE" = x; then
19087      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19088$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19089    else
19090      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19091      if test "x$IS_MODERN_MAKE" = x; then
19092        { $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
19093$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;}
19094      else
19095        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19096          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19097            MAKE_EXPECTED_ENV='cygwin'
19098          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19099            MAKE_EXPECTED_ENV='msys'
19100          else
19101            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19102          fi
19103          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19104          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19105        else
19106          # Not relevant for non-Windows
19107          IS_MAKE_CORRECT_ENV=true
19108        fi
19109        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19110          { $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
19111$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;}
19112        else
19113          FOUND_MAKE=$MAKE_CANDIDATE
19114
19115  # Only process if variable expands to non-empty
19116
19117  if test "x$FOUND_MAKE" != x; then
19118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19119
19120  # First separate the path from the arguments. This will split at the first
19121  # space.
19122  complete="$FOUND_MAKE"
19123  path="${complete%% *}"
19124  tmp="$complete EOL"
19125  arguments="${tmp#* }"
19126
19127  # Input might be given as Windows format, start by converting to
19128  # unix format.
19129  new_path=`$CYGPATH -u "$path"`
19130
19131  # Now try to locate executable using which
19132  new_path=`$WHICH "$new_path" 2> /dev/null`
19133  # bat and cmd files are not always considered executable in cygwin causing which
19134  # to not find them
19135  if test "x$new_path" = x \
19136      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19137      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19138    new_path=`$CYGPATH -u "$path"`
19139  fi
19140  if test "x$new_path" = x; then
19141    # Oops. Which didn't find the executable.
19142    # The splitting of arguments from the executable at a space might have been incorrect,
19143    # since paths with space are more likely in Windows. Give it another try with the whole
19144    # argument.
19145    path="$complete"
19146    arguments="EOL"
19147    new_path=`$CYGPATH -u "$path"`
19148    new_path=`$WHICH "$new_path" 2> /dev/null`
19149    # bat and cmd files are not always considered executable in cygwin causing which
19150    # to not find them
19151    if test "x$new_path" = x \
19152        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19153        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19154      new_path=`$CYGPATH -u "$path"`
19155    fi
19156    if test "x$new_path" = x; then
19157      # It's still not found. Now this is an unrecoverable error.
19158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19159$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19160      has_space=`$ECHO "$complete" | $GREP " "`
19161      if test "x$has_space" != x; then
19162        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19163$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19164      fi
19165      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19166    fi
19167  fi
19168
19169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19172  # "foo.exe" is OK but "foo" is an error.
19173  #
19174  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19175  # It is also a way to make sure we got the proper file name for the real test later on.
19176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19177  if test "x$test_shortpath" = x; then
19178    # Short path failed, file does not exist as specified.
19179    # Try adding .exe or .cmd
19180    if test -f "${new_path}.exe"; then
19181      input_to_shortpath="${new_path}.exe"
19182    elif test -f "${new_path}.cmd"; then
19183      input_to_shortpath="${new_path}.cmd"
19184    else
19185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19186$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19187      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19188$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19189      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19190    fi
19191  else
19192    input_to_shortpath="$new_path"
19193  fi
19194
19195  # Call helper function which possibly converts this using DOS-style short mode.
19196  # If so, the updated path is stored in $new_path.
19197  new_path="$input_to_shortpath"
19198
19199  input_path="$input_to_shortpath"
19200  # Check if we need to convert this using DOS-style short mode. If the path
19201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19202  # take no chances and rewrite it.
19203  # Note: m4 eats our [], so we need to use [ and ] instead.
19204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19205  if test "x$has_forbidden_chars" != x; then
19206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19210      # Going to short mode and back again did indeed matter. Since short mode is
19211      # case insensitive, let's make it lowercase to improve readability.
19212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19213      # Now convert it back to Unix-style (cygpath)
19214      input_path=`$CYGPATH -u "$shortmode_path"`
19215      new_path="$input_path"
19216    fi
19217  fi
19218
19219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19220  if test "x$test_cygdrive_prefix" = x; then
19221    # As a simple fix, exclude /usr/bin since it's not a real path.
19222    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19224      # a path prefixed by /cygdrive for fixpath to work.
19225      new_path="$CYGWIN_ROOT_PATH$input_path"
19226    fi
19227  fi
19228
19229  # remove trailing .exe if any
19230  new_path="${new_path/%.exe/}"
19231
19232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19233
19234  # First separate the path from the arguments. This will split at the first
19235  # space.
19236  complete="$FOUND_MAKE"
19237  path="${complete%% *}"
19238  tmp="$complete EOL"
19239  arguments="${tmp#* }"
19240
19241  # Input might be given as Windows format, start by converting to
19242  # unix format.
19243  new_path="$path"
19244
19245  windows_path="$new_path"
19246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19247    unix_path=`$CYGPATH -u "$windows_path"`
19248    new_path="$unix_path"
19249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19251    new_path="$unix_path"
19252  fi
19253
19254
19255  # Now try to locate executable using which
19256  new_path=`$WHICH "$new_path" 2> /dev/null`
19257
19258  if test "x$new_path" = x; then
19259    # Oops. Which didn't find the executable.
19260    # The splitting of arguments from the executable at a space might have been incorrect,
19261    # since paths with space are more likely in Windows. Give it another try with the whole
19262    # argument.
19263    path="$complete"
19264    arguments="EOL"
19265    new_path="$path"
19266
19267  windows_path="$new_path"
19268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19269    unix_path=`$CYGPATH -u "$windows_path"`
19270    new_path="$unix_path"
19271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19273    new_path="$unix_path"
19274  fi
19275
19276
19277    new_path=`$WHICH "$new_path" 2> /dev/null`
19278    # bat and cmd files are not always considered executable in MSYS causing which
19279    # to not find them
19280    if test "x$new_path" = x \
19281        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19282        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
19295
19296    if test "x$new_path" = x; then
19297      # It's still not found. Now this is an unrecoverable error.
19298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19299$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19300      has_space=`$ECHO "$complete" | $GREP " "`
19301      if test "x$has_space" != x; then
19302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19304      fi
19305      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19306    fi
19307  fi
19308
19309  # Now new_path has a complete unix path to the binary
19310  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19311    # Keep paths in /bin as-is, but remove trailing .exe if any
19312    new_path="${new_path/%.exe/}"
19313    # Do not save /bin paths to all_fixpath_prefixes!
19314  else
19315    # Not in mixed or Windows style, start by that.
19316    new_path=`cmd //c echo $new_path`
19317
19318  input_path="$new_path"
19319  # Check if we need to convert this using DOS-style short mode. If the path
19320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19321  # take no chances and rewrite it.
19322  # Note: m4 eats our [], so we need to use [ and ] instead.
19323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19324  if test "x$has_forbidden_chars" != x; then
19325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19327  fi
19328
19329    # Output is in $new_path
19330
19331  windows_path="$new_path"
19332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19333    unix_path=`$CYGPATH -u "$windows_path"`
19334    new_path="$unix_path"
19335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19337    new_path="$unix_path"
19338  fi
19339
19340    # remove trailing .exe if any
19341    new_path="${new_path/%.exe/}"
19342
19343    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19344    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19345  fi
19346
19347    else
19348      # We're on a unix platform. Hooray! :)
19349      # First separate the path from the arguments. This will split at the first
19350      # space.
19351      complete="$FOUND_MAKE"
19352      path="${complete%% *}"
19353      tmp="$complete EOL"
19354      arguments="${tmp#* }"
19355
19356      # Cannot rely on the command "which" here since it doesn't always work.
19357      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19358      if test -z "$is_absolute_path"; then
19359        # Path to executable is not absolute. Find it.
19360        IFS_save="$IFS"
19361        IFS=:
19362        for p in $PATH; do
19363          if test -f "$p/$path" && test -x "$p/$path"; then
19364            new_path="$p/$path"
19365            break
19366          fi
19367        done
19368        IFS="$IFS_save"
19369      else
19370        # This is an absolute path, we can use it without further modifications.
19371        new_path="$path"
19372      fi
19373
19374      if test "x$new_path" = x; then
19375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19376$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19377        has_space=`$ECHO "$complete" | $GREP " "`
19378        if test "x$has_space" != x; then
19379          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19380$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19381        fi
19382        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19383      fi
19384    fi
19385
19386    # Now join together the path and the arguments once again
19387    if test "x$arguments" != xEOL; then
19388      new_complete="$new_path ${arguments% *}"
19389    else
19390      new_complete="$new_path"
19391    fi
19392
19393    if test "x$complete" != "x$new_complete"; then
19394      FOUND_MAKE="$new_complete"
19395      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19396$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19397    fi
19398  fi
19399
19400        fi
19401      fi
19402    fi
19403  fi
19404
19405    fi
19406
19407    if test "x$FOUND_MAKE" = x; then
19408      if test "x$TOOLCHAIN_PATH" != x; then
19409        # We have a toolchain path, check that as well before giving up.
19410        OLD_PATH=$PATH
19411        PATH=$TOOLCHAIN_PATH:$PATH
19412        for ac_prog in gmake
19413do
19414  # Extract the first word of "$ac_prog", so it can be a program name with args.
19415set dummy $ac_prog; ac_word=$2
19416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19417$as_echo_n "checking for $ac_word... " >&6; }
19418if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19419  $as_echo_n "(cached) " >&6
19420else
19421  case $CHECK_TOOLSDIR_GMAKE in
19422  [\\/]* | ?:[\\/]*)
19423  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19424  ;;
19425  *)
19426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19427for as_dir in $PATH
19428do
19429  IFS=$as_save_IFS
19430  test -z "$as_dir" && as_dir=.
19431    for ac_exec_ext in '' $ac_executable_extensions; do
19432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19433    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19435    break 2
19436  fi
19437done
19438  done
19439IFS=$as_save_IFS
19440
19441  ;;
19442esac
19443fi
19444CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19445if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19447$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19448else
19449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19450$as_echo "no" >&6; }
19451fi
19452
19453
19454  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19455done
19456
19457
19458  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19459  DESCRIPTION="gmake in tools-dir"
19460
19461  # On Cygwin, we require a newer version of make than on other platforms
19462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19463    MAKE_VERSION_EXPR="-e 4\."
19464    MAKE_REQUIRED_VERSION="4.0"
19465   else
19466    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19467    MAKE_REQUIRED_VERSION="3.81"
19468  fi
19469
19470  if test "x$MAKE_CANDIDATE" != x; then
19471    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19472$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19473    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19474    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19475    if test "x$IS_GNU_MAKE" = x; then
19476      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19477$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19478    else
19479      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19480      if test "x$IS_MODERN_MAKE" = x; then
19481        { $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
19482$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;}
19483      else
19484        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19485          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19486            MAKE_EXPECTED_ENV='cygwin'
19487          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19488            MAKE_EXPECTED_ENV='msys'
19489          else
19490            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19491          fi
19492          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19493          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19494        else
19495          # Not relevant for non-Windows
19496          IS_MAKE_CORRECT_ENV=true
19497        fi
19498        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19499          { $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
19500$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;}
19501        else
19502          FOUND_MAKE=$MAKE_CANDIDATE
19503
19504  # Only process if variable expands to non-empty
19505
19506  if test "x$FOUND_MAKE" != x; then
19507    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19508
19509  # First separate the path from the arguments. This will split at the first
19510  # space.
19511  complete="$FOUND_MAKE"
19512  path="${complete%% *}"
19513  tmp="$complete EOL"
19514  arguments="${tmp#* }"
19515
19516  # Input might be given as Windows format, start by converting to
19517  # unix format.
19518  new_path=`$CYGPATH -u "$path"`
19519
19520  # Now try to locate executable using which
19521  new_path=`$WHICH "$new_path" 2> /dev/null`
19522  # bat and cmd files are not always considered executable in cygwin causing which
19523  # to not find them
19524  if test "x$new_path" = x \
19525      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19526      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19527    new_path=`$CYGPATH -u "$path"`
19528  fi
19529  if test "x$new_path" = x; then
19530    # Oops. Which didn't find the executable.
19531    # The splitting of arguments from the executable at a space might have been incorrect,
19532    # since paths with space are more likely in Windows. Give it another try with the whole
19533    # argument.
19534    path="$complete"
19535    arguments="EOL"
19536    new_path=`$CYGPATH -u "$path"`
19537    new_path=`$WHICH "$new_path" 2> /dev/null`
19538    # bat and cmd files are not always considered executable in cygwin causing which
19539    # to not find them
19540    if test "x$new_path" = x \
19541        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19542        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19543      new_path=`$CYGPATH -u "$path"`
19544    fi
19545    if test "x$new_path" = x; then
19546      # It's still not found. Now this is an unrecoverable error.
19547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19548$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19549      has_space=`$ECHO "$complete" | $GREP " "`
19550      if test "x$has_space" != x; then
19551        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19552$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19553      fi
19554      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19555    fi
19556  fi
19557
19558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19561  # "foo.exe" is OK but "foo" is an error.
19562  #
19563  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19564  # It is also a way to make sure we got the proper file name for the real test later on.
19565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19566  if test "x$test_shortpath" = x; then
19567    # Short path failed, file does not exist as specified.
19568    # Try adding .exe or .cmd
19569    if test -f "${new_path}.exe"; then
19570      input_to_shortpath="${new_path}.exe"
19571    elif test -f "${new_path}.cmd"; then
19572      input_to_shortpath="${new_path}.cmd"
19573    else
19574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19575$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19576      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19577$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19578      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19579    fi
19580  else
19581    input_to_shortpath="$new_path"
19582  fi
19583
19584  # Call helper function which possibly converts this using DOS-style short mode.
19585  # If so, the updated path is stored in $new_path.
19586  new_path="$input_to_shortpath"
19587
19588  input_path="$input_to_shortpath"
19589  # Check if we need to convert this using DOS-style short mode. If the path
19590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19591  # take no chances and rewrite it.
19592  # Note: m4 eats our [], so we need to use [ and ] instead.
19593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19594  if test "x$has_forbidden_chars" != x; then
19595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19599      # Going to short mode and back again did indeed matter. Since short mode is
19600      # case insensitive, let's make it lowercase to improve readability.
19601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19602      # Now convert it back to Unix-style (cygpath)
19603      input_path=`$CYGPATH -u "$shortmode_path"`
19604      new_path="$input_path"
19605    fi
19606  fi
19607
19608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19609  if test "x$test_cygdrive_prefix" = x; then
19610    # As a simple fix, exclude /usr/bin since it's not a real path.
19611    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19613      # a path prefixed by /cygdrive for fixpath to work.
19614      new_path="$CYGWIN_ROOT_PATH$input_path"
19615    fi
19616  fi
19617
19618  # remove trailing .exe if any
19619  new_path="${new_path/%.exe/}"
19620
19621    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19622
19623  # First separate the path from the arguments. This will split at the first
19624  # space.
19625  complete="$FOUND_MAKE"
19626  path="${complete%% *}"
19627  tmp="$complete EOL"
19628  arguments="${tmp#* }"
19629
19630  # Input might be given as Windows format, start by converting to
19631  # unix format.
19632  new_path="$path"
19633
19634  windows_path="$new_path"
19635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19636    unix_path=`$CYGPATH -u "$windows_path"`
19637    new_path="$unix_path"
19638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19640    new_path="$unix_path"
19641  fi
19642
19643
19644  # Now try to locate executable using which
19645  new_path=`$WHICH "$new_path" 2> /dev/null`
19646
19647  if test "x$new_path" = x; then
19648    # Oops. Which didn't find the executable.
19649    # The splitting of arguments from the executable at a space might have been incorrect,
19650    # since paths with space are more likely in Windows. Give it another try with the whole
19651    # argument.
19652    path="$complete"
19653    arguments="EOL"
19654    new_path="$path"
19655
19656  windows_path="$new_path"
19657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19658    unix_path=`$CYGPATH -u "$windows_path"`
19659    new_path="$unix_path"
19660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19662    new_path="$unix_path"
19663  fi
19664
19665
19666    new_path=`$WHICH "$new_path" 2> /dev/null`
19667    # bat and cmd files are not always considered executable in MSYS causing which
19668    # to not find them
19669    if test "x$new_path" = x \
19670        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19671        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
19684
19685    if test "x$new_path" = x; then
19686      # It's still not found. Now this is an unrecoverable error.
19687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19688$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19689      has_space=`$ECHO "$complete" | $GREP " "`
19690      if test "x$has_space" != x; then
19691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19693      fi
19694      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19695    fi
19696  fi
19697
19698  # Now new_path has a complete unix path to the binary
19699  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19700    # Keep paths in /bin as-is, but remove trailing .exe if any
19701    new_path="${new_path/%.exe/}"
19702    # Do not save /bin paths to all_fixpath_prefixes!
19703  else
19704    # Not in mixed or Windows style, start by that.
19705    new_path=`cmd //c echo $new_path`
19706
19707  input_path="$new_path"
19708  # Check if we need to convert this using DOS-style short mode. If the path
19709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19710  # take no chances and rewrite it.
19711  # Note: m4 eats our [], so we need to use [ and ] instead.
19712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19713  if test "x$has_forbidden_chars" != x; then
19714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19716  fi
19717
19718    # Output is in $new_path
19719
19720  windows_path="$new_path"
19721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19722    unix_path=`$CYGPATH -u "$windows_path"`
19723    new_path="$unix_path"
19724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19726    new_path="$unix_path"
19727  fi
19728
19729    # remove trailing .exe if any
19730    new_path="${new_path/%.exe/}"
19731
19732    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19733    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19734  fi
19735
19736    else
19737      # We're on a unix platform. Hooray! :)
19738      # First separate the path from the arguments. This will split at the first
19739      # space.
19740      complete="$FOUND_MAKE"
19741      path="${complete%% *}"
19742      tmp="$complete EOL"
19743      arguments="${tmp#* }"
19744
19745      # Cannot rely on the command "which" here since it doesn't always work.
19746      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19747      if test -z "$is_absolute_path"; then
19748        # Path to executable is not absolute. Find it.
19749        IFS_save="$IFS"
19750        IFS=:
19751        for p in $PATH; do
19752          if test -f "$p/$path" && test -x "$p/$path"; then
19753            new_path="$p/$path"
19754            break
19755          fi
19756        done
19757        IFS="$IFS_save"
19758      else
19759        # This is an absolute path, we can use it without further modifications.
19760        new_path="$path"
19761      fi
19762
19763      if test "x$new_path" = x; then
19764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19765$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19766        has_space=`$ECHO "$complete" | $GREP " "`
19767        if test "x$has_space" != x; then
19768          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19769$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19770        fi
19771        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19772      fi
19773    fi
19774
19775    # Now join together the path and the arguments once again
19776    if test "x$arguments" != xEOL; then
19777      new_complete="$new_path ${arguments% *}"
19778    else
19779      new_complete="$new_path"
19780    fi
19781
19782    if test "x$complete" != "x$new_complete"; then
19783      FOUND_MAKE="$new_complete"
19784      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19785$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19786    fi
19787  fi
19788
19789        fi
19790      fi
19791    fi
19792  fi
19793
19794        if test "x$FOUND_MAKE" = x; then
19795          for ac_prog in make
19796do
19797  # Extract the first word of "$ac_prog", so it can be a program name with args.
19798set dummy $ac_prog; ac_word=$2
19799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19800$as_echo_n "checking for $ac_word... " >&6; }
19801if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19802  $as_echo_n "(cached) " >&6
19803else
19804  case $CHECK_TOOLSDIR_MAKE in
19805  [\\/]* | ?:[\\/]*)
19806  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19807  ;;
19808  *)
19809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19810for as_dir in $PATH
19811do
19812  IFS=$as_save_IFS
19813  test -z "$as_dir" && as_dir=.
19814    for ac_exec_ext in '' $ac_executable_extensions; do
19815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19816    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19818    break 2
19819  fi
19820done
19821  done
19822IFS=$as_save_IFS
19823
19824  ;;
19825esac
19826fi
19827CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19828if test -n "$CHECK_TOOLSDIR_MAKE"; then
19829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19830$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19831else
19832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19833$as_echo "no" >&6; }
19834fi
19835
19836
19837  test -n "$CHECK_TOOLSDIR_MAKE" && break
19838done
19839
19840
19841  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19842  DESCRIPTION="make in tools-dir"
19843
19844  # On Cygwin, we require a newer version of make than on other platforms
19845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19846    MAKE_VERSION_EXPR="-e 4\."
19847    MAKE_REQUIRED_VERSION="4.0"
19848   else
19849    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19850    MAKE_REQUIRED_VERSION="3.81"
19851  fi
19852
19853  if test "x$MAKE_CANDIDATE" != x; then
19854    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19855$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19856    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19857    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19858    if test "x$IS_GNU_MAKE" = x; then
19859      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19860$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19861    else
19862      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19863      if test "x$IS_MODERN_MAKE" = x; then
19864        { $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
19865$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;}
19866      else
19867        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19868          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19869            MAKE_EXPECTED_ENV='cygwin'
19870          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19871            MAKE_EXPECTED_ENV='msys'
19872          else
19873            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19874          fi
19875          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19876          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19877        else
19878          # Not relevant for non-Windows
19879          IS_MAKE_CORRECT_ENV=true
19880        fi
19881        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19882          { $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
19883$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;}
19884        else
19885          FOUND_MAKE=$MAKE_CANDIDATE
19886
19887  # Only process if variable expands to non-empty
19888
19889  if test "x$FOUND_MAKE" != x; then
19890    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19891
19892  # First separate the path from the arguments. This will split at the first
19893  # space.
19894  complete="$FOUND_MAKE"
19895  path="${complete%% *}"
19896  tmp="$complete EOL"
19897  arguments="${tmp#* }"
19898
19899  # Input might be given as Windows format, start by converting to
19900  # unix format.
19901  new_path=`$CYGPATH -u "$path"`
19902
19903  # Now try to locate executable using which
19904  new_path=`$WHICH "$new_path" 2> /dev/null`
19905  # bat and cmd files are not always considered executable in cygwin causing which
19906  # to not find them
19907  if test "x$new_path" = x \
19908      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19909      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19910    new_path=`$CYGPATH -u "$path"`
19911  fi
19912  if test "x$new_path" = x; then
19913    # Oops. Which didn't find the executable.
19914    # The splitting of arguments from the executable at a space might have been incorrect,
19915    # since paths with space are more likely in Windows. Give it another try with the whole
19916    # argument.
19917    path="$complete"
19918    arguments="EOL"
19919    new_path=`$CYGPATH -u "$path"`
19920    new_path=`$WHICH "$new_path" 2> /dev/null`
19921    # bat and cmd files are not always considered executable in cygwin causing which
19922    # to not find them
19923    if test "x$new_path" = x \
19924        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19925        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19926      new_path=`$CYGPATH -u "$path"`
19927    fi
19928    if test "x$new_path" = x; then
19929      # It's still not found. Now this is an unrecoverable error.
19930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19931$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19932      has_space=`$ECHO "$complete" | $GREP " "`
19933      if test "x$has_space" != x; then
19934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19936      fi
19937      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19938    fi
19939  fi
19940
19941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19944  # "foo.exe" is OK but "foo" is an error.
19945  #
19946  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19947  # It is also a way to make sure we got the proper file name for the real test later on.
19948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19949  if test "x$test_shortpath" = x; then
19950    # Short path failed, file does not exist as specified.
19951    # Try adding .exe or .cmd
19952    if test -f "${new_path}.exe"; then
19953      input_to_shortpath="${new_path}.exe"
19954    elif test -f "${new_path}.cmd"; then
19955      input_to_shortpath="${new_path}.cmd"
19956    else
19957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19958$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19959      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19960$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19961      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19962    fi
19963  else
19964    input_to_shortpath="$new_path"
19965  fi
19966
19967  # Call helper function which possibly converts this using DOS-style short mode.
19968  # If so, the updated path is stored in $new_path.
19969  new_path="$input_to_shortpath"
19970
19971  input_path="$input_to_shortpath"
19972  # Check if we need to convert this using DOS-style short mode. If the path
19973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19974  # take no chances and rewrite it.
19975  # Note: m4 eats our [], so we need to use [ and ] instead.
19976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19977  if test "x$has_forbidden_chars" != x; then
19978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19982      # Going to short mode and back again did indeed matter. Since short mode is
19983      # case insensitive, let's make it lowercase to improve readability.
19984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19985      # Now convert it back to Unix-style (cygpath)
19986      input_path=`$CYGPATH -u "$shortmode_path"`
19987      new_path="$input_path"
19988    fi
19989  fi
19990
19991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19992  if test "x$test_cygdrive_prefix" = x; then
19993    # As a simple fix, exclude /usr/bin since it's not a real path.
19994    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19996      # a path prefixed by /cygdrive for fixpath to work.
19997      new_path="$CYGWIN_ROOT_PATH$input_path"
19998    fi
19999  fi
20000
20001  # remove trailing .exe if any
20002  new_path="${new_path/%.exe/}"
20003
20004    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20005
20006  # First separate the path from the arguments. This will split at the first
20007  # space.
20008  complete="$FOUND_MAKE"
20009  path="${complete%% *}"
20010  tmp="$complete EOL"
20011  arguments="${tmp#* }"
20012
20013  # Input might be given as Windows format, start by converting to
20014  # unix format.
20015  new_path="$path"
20016
20017  windows_path="$new_path"
20018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20019    unix_path=`$CYGPATH -u "$windows_path"`
20020    new_path="$unix_path"
20021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20023    new_path="$unix_path"
20024  fi
20025
20026
20027  # Now try to locate executable using which
20028  new_path=`$WHICH "$new_path" 2> /dev/null`
20029
20030  if test "x$new_path" = x; then
20031    # Oops. Which didn't find the executable.
20032    # The splitting of arguments from the executable at a space might have been incorrect,
20033    # since paths with space are more likely in Windows. Give it another try with the whole
20034    # argument.
20035    path="$complete"
20036    arguments="EOL"
20037    new_path="$path"
20038
20039  windows_path="$new_path"
20040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20041    unix_path=`$CYGPATH -u "$windows_path"`
20042    new_path="$unix_path"
20043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20045    new_path="$unix_path"
20046  fi
20047
20048
20049    new_path=`$WHICH "$new_path" 2> /dev/null`
20050    # bat and cmd files are not always considered executable in MSYS causing which
20051    # to not find them
20052    if test "x$new_path" = x \
20053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
20067
20068    if test "x$new_path" = x; then
20069      # It's still not found. Now this is an unrecoverable error.
20070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20071$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20072      has_space=`$ECHO "$complete" | $GREP " "`
20073      if test "x$has_space" != x; then
20074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20076      fi
20077      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20078    fi
20079  fi
20080
20081  # Now new_path has a complete unix path to the binary
20082  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20083    # Keep paths in /bin as-is, but remove trailing .exe if any
20084    new_path="${new_path/%.exe/}"
20085    # Do not save /bin paths to all_fixpath_prefixes!
20086  else
20087    # Not in mixed or Windows style, start by that.
20088    new_path=`cmd //c echo $new_path`
20089
20090  input_path="$new_path"
20091  # Check if we need to convert this using DOS-style short mode. If the path
20092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20093  # take no chances and rewrite it.
20094  # Note: m4 eats our [], so we need to use [ and ] instead.
20095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20096  if test "x$has_forbidden_chars" != x; then
20097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20099  fi
20100
20101    # Output is in $new_path
20102
20103  windows_path="$new_path"
20104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20105    unix_path=`$CYGPATH -u "$windows_path"`
20106    new_path="$unix_path"
20107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20109    new_path="$unix_path"
20110  fi
20111
20112    # remove trailing .exe if any
20113    new_path="${new_path/%.exe/}"
20114
20115    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20116    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20117  fi
20118
20119    else
20120      # We're on a unix platform. Hooray! :)
20121      # First separate the path from the arguments. This will split at the first
20122      # space.
20123      complete="$FOUND_MAKE"
20124      path="${complete%% *}"
20125      tmp="$complete EOL"
20126      arguments="${tmp#* }"
20127
20128      # Cannot rely on the command "which" here since it doesn't always work.
20129      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20130      if test -z "$is_absolute_path"; then
20131        # Path to executable is not absolute. Find it.
20132        IFS_save="$IFS"
20133        IFS=:
20134        for p in $PATH; do
20135          if test -f "$p/$path" && test -x "$p/$path"; then
20136            new_path="$p/$path"
20137            break
20138          fi
20139        done
20140        IFS="$IFS_save"
20141      else
20142        # This is an absolute path, we can use it without further modifications.
20143        new_path="$path"
20144      fi
20145
20146      if test "x$new_path" = x; then
20147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20148$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20149        has_space=`$ECHO "$complete" | $GREP " "`
20150        if test "x$has_space" != x; then
20151          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20152$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20153        fi
20154        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20155      fi
20156    fi
20157
20158    # Now join together the path and the arguments once again
20159    if test "x$arguments" != xEOL; then
20160      new_complete="$new_path ${arguments% *}"
20161    else
20162      new_complete="$new_path"
20163    fi
20164
20165    if test "x$complete" != "x$new_complete"; then
20166      FOUND_MAKE="$new_complete"
20167      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20168$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20169    fi
20170  fi
20171
20172        fi
20173      fi
20174    fi
20175  fi
20176
20177        fi
20178        PATH=$OLD_PATH
20179      fi
20180    fi
20181
20182    if test "x$FOUND_MAKE" = x; then
20183      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
20184    fi
20185
20186    else
20187      # If it succeeded, then it was overridden by the user. We will use it
20188      # for the tool.
20189
20190      # First remove it from the list of overridden variables, so we can test
20191      # for unknown variables in the end.
20192      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20193
20194      # Check if we try to supply an empty value
20195      if test "x$MAKE" = x; then
20196        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20197$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20198        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20199$as_echo_n "checking for MAKE... " >&6; }
20200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20201$as_echo "disabled" >&6; }
20202      else
20203        # Check if the provided tool contains a complete path.
20204        tool_specified="$MAKE"
20205        tool_basename="${tool_specified##*/}"
20206        if test "x$tool_basename" = "x$tool_specified"; then
20207          # A command without a complete path is provided, search $PATH.
20208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20209$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20210          # Extract the first word of "$tool_basename", so it can be a program name with args.
20211set dummy $tool_basename; ac_word=$2
20212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20213$as_echo_n "checking for $ac_word... " >&6; }
20214if ${ac_cv_path_MAKE+:} false; then :
20215  $as_echo_n "(cached) " >&6
20216else
20217  case $MAKE in
20218  [\\/]* | ?:[\\/]*)
20219  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20220  ;;
20221  *)
20222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20223for as_dir in $PATH
20224do
20225  IFS=$as_save_IFS
20226  test -z "$as_dir" && as_dir=.
20227    for ac_exec_ext in '' $ac_executable_extensions; do
20228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20229    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20231    break 2
20232  fi
20233done
20234  done
20235IFS=$as_save_IFS
20236
20237  ;;
20238esac
20239fi
20240MAKE=$ac_cv_path_MAKE
20241if test -n "$MAKE"; then
20242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20243$as_echo "$MAKE" >&6; }
20244else
20245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20246$as_echo "no" >&6; }
20247fi
20248
20249
20250          if test "x$MAKE" = x; then
20251            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20252          fi
20253        else
20254          # Otherwise we believe it is a complete path. Use it as it is.
20255          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20256$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20257          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20258$as_echo_n "checking for MAKE... " >&6; }
20259          if test ! -x "$tool_specified"; then
20260            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20261$as_echo "not found" >&6; }
20262            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20263          fi
20264          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20265$as_echo "$tool_specified" >&6; }
20266        fi
20267      fi
20268    fi
20269
20270    # If MAKE was set by user, verify the version
20271
20272  MAKE_CANDIDATE=""$MAKE""
20273  DESCRIPTION="user supplied MAKE=$MAKE"
20274
20275  # On Cygwin, we require a newer version of make than on other platforms
20276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20277    MAKE_VERSION_EXPR="-e 4\."
20278    MAKE_REQUIRED_VERSION="4.0"
20279   else
20280    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20281    MAKE_REQUIRED_VERSION="3.81"
20282  fi
20283
20284  if test "x$MAKE_CANDIDATE" != x; then
20285    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20286$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20287    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20288    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20289    if test "x$IS_GNU_MAKE" = x; then
20290      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20291$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20292    else
20293      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20294      if test "x$IS_MODERN_MAKE" = x; then
20295        { $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
20296$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;}
20297      else
20298        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20299          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20300            MAKE_EXPECTED_ENV='cygwin'
20301          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20302            MAKE_EXPECTED_ENV='msys'
20303          else
20304            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20305          fi
20306          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20307          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20308        else
20309          # Not relevant for non-Windows
20310          IS_MAKE_CORRECT_ENV=true
20311        fi
20312        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20313          { $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
20314$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;}
20315        else
20316          FOUND_MAKE=$MAKE_CANDIDATE
20317
20318  # Only process if variable expands to non-empty
20319
20320  if test "x$FOUND_MAKE" != x; then
20321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20322
20323  # First separate the path from the arguments. This will split at the first
20324  # space.
20325  complete="$FOUND_MAKE"
20326  path="${complete%% *}"
20327  tmp="$complete EOL"
20328  arguments="${tmp#* }"
20329
20330  # Input might be given as Windows format, start by converting to
20331  # unix format.
20332  new_path=`$CYGPATH -u "$path"`
20333
20334  # Now try to locate executable using which
20335  new_path=`$WHICH "$new_path" 2> /dev/null`
20336  # bat and cmd files are not always considered executable in cygwin causing which
20337  # to not find them
20338  if test "x$new_path" = x \
20339      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20340      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20341    new_path=`$CYGPATH -u "$path"`
20342  fi
20343  if test "x$new_path" = x; then
20344    # Oops. Which didn't find the executable.
20345    # The splitting of arguments from the executable at a space might have been incorrect,
20346    # since paths with space are more likely in Windows. Give it another try with the whole
20347    # argument.
20348    path="$complete"
20349    arguments="EOL"
20350    new_path=`$CYGPATH -u "$path"`
20351    new_path=`$WHICH "$new_path" 2> /dev/null`
20352    # bat and cmd files are not always considered executable in cygwin causing which
20353    # to not find them
20354    if test "x$new_path" = x \
20355        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20356        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20357      new_path=`$CYGPATH -u "$path"`
20358    fi
20359    if test "x$new_path" = x; then
20360      # It's still not found. Now this is an unrecoverable error.
20361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20362$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20363      has_space=`$ECHO "$complete" | $GREP " "`
20364      if test "x$has_space" != x; then
20365        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20366$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20367      fi
20368      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20369    fi
20370  fi
20371
20372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20375  # "foo.exe" is OK but "foo" is an error.
20376  #
20377  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20378  # It is also a way to make sure we got the proper file name for the real test later on.
20379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20380  if test "x$test_shortpath" = x; then
20381    # Short path failed, file does not exist as specified.
20382    # Try adding .exe or .cmd
20383    if test -f "${new_path}.exe"; then
20384      input_to_shortpath="${new_path}.exe"
20385    elif test -f "${new_path}.cmd"; then
20386      input_to_shortpath="${new_path}.cmd"
20387    else
20388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20389$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20390      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20391$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20392      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20393    fi
20394  else
20395    input_to_shortpath="$new_path"
20396  fi
20397
20398  # Call helper function which possibly converts this using DOS-style short mode.
20399  # If so, the updated path is stored in $new_path.
20400  new_path="$input_to_shortpath"
20401
20402  input_path="$input_to_shortpath"
20403  # Check if we need to convert this using DOS-style short mode. If the path
20404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20405  # take no chances and rewrite it.
20406  # Note: m4 eats our [], so we need to use [ and ] instead.
20407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20408  if test "x$has_forbidden_chars" != x; then
20409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20413      # Going to short mode and back again did indeed matter. Since short mode is
20414      # case insensitive, let's make it lowercase to improve readability.
20415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20416      # Now convert it back to Unix-style (cygpath)
20417      input_path=`$CYGPATH -u "$shortmode_path"`
20418      new_path="$input_path"
20419    fi
20420  fi
20421
20422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20423  if test "x$test_cygdrive_prefix" = x; then
20424    # As a simple fix, exclude /usr/bin since it's not a real path.
20425    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20427      # a path prefixed by /cygdrive for fixpath to work.
20428      new_path="$CYGWIN_ROOT_PATH$input_path"
20429    fi
20430  fi
20431
20432  # remove trailing .exe if any
20433  new_path="${new_path/%.exe/}"
20434
20435    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20436
20437  # First separate the path from the arguments. This will split at the first
20438  # space.
20439  complete="$FOUND_MAKE"
20440  path="${complete%% *}"
20441  tmp="$complete EOL"
20442  arguments="${tmp#* }"
20443
20444  # Input might be given as Windows format, start by converting to
20445  # unix format.
20446  new_path="$path"
20447
20448  windows_path="$new_path"
20449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20450    unix_path=`$CYGPATH -u "$windows_path"`
20451    new_path="$unix_path"
20452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20454    new_path="$unix_path"
20455  fi
20456
20457
20458  # Now try to locate executable using which
20459  new_path=`$WHICH "$new_path" 2> /dev/null`
20460
20461  if test "x$new_path" = x; then
20462    # Oops. Which didn't find the executable.
20463    # The splitting of arguments from the executable at a space might have been incorrect,
20464    # since paths with space are more likely in Windows. Give it another try with the whole
20465    # argument.
20466    path="$complete"
20467    arguments="EOL"
20468    new_path="$path"
20469
20470  windows_path="$new_path"
20471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20472    unix_path=`$CYGPATH -u "$windows_path"`
20473    new_path="$unix_path"
20474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20476    new_path="$unix_path"
20477  fi
20478
20479
20480    new_path=`$WHICH "$new_path" 2> /dev/null`
20481    # bat and cmd files are not always considered executable in MSYS causing which
20482    # to not find them
20483    if test "x$new_path" = x \
20484        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20485        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
20498
20499    if test "x$new_path" = x; then
20500      # It's still not found. Now this is an unrecoverable error.
20501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20502$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20503      has_space=`$ECHO "$complete" | $GREP " "`
20504      if test "x$has_space" != x; then
20505        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20506$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20507      fi
20508      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20509    fi
20510  fi
20511
20512  # Now new_path has a complete unix path to the binary
20513  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20514    # Keep paths in /bin as-is, but remove trailing .exe if any
20515    new_path="${new_path/%.exe/}"
20516    # Do not save /bin paths to all_fixpath_prefixes!
20517  else
20518    # Not in mixed or Windows style, start by that.
20519    new_path=`cmd //c echo $new_path`
20520
20521  input_path="$new_path"
20522  # Check if we need to convert this using DOS-style short mode. If the path
20523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20524  # take no chances and rewrite it.
20525  # Note: m4 eats our [], so we need to use [ and ] instead.
20526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20527  if test "x$has_forbidden_chars" != x; then
20528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20530  fi
20531
20532    # Output is in $new_path
20533
20534  windows_path="$new_path"
20535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20536    unix_path=`$CYGPATH -u "$windows_path"`
20537    new_path="$unix_path"
20538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20540    new_path="$unix_path"
20541  fi
20542
20543    # remove trailing .exe if any
20544    new_path="${new_path/%.exe/}"
20545
20546    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20547    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20548  fi
20549
20550    else
20551      # We're on a unix platform. Hooray! :)
20552      # First separate the path from the arguments. This will split at the first
20553      # space.
20554      complete="$FOUND_MAKE"
20555      path="${complete%% *}"
20556      tmp="$complete EOL"
20557      arguments="${tmp#* }"
20558
20559      # Cannot rely on the command "which" here since it doesn't always work.
20560      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20561      if test -z "$is_absolute_path"; then
20562        # Path to executable is not absolute. Find it.
20563        IFS_save="$IFS"
20564        IFS=:
20565        for p in $PATH; do
20566          if test -f "$p/$path" && test -x "$p/$path"; then
20567            new_path="$p/$path"
20568            break
20569          fi
20570        done
20571        IFS="$IFS_save"
20572      else
20573        # This is an absolute path, we can use it without further modifications.
20574        new_path="$path"
20575      fi
20576
20577      if test "x$new_path" = x; then
20578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20579$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20580        has_space=`$ECHO "$complete" | $GREP " "`
20581        if test "x$has_space" != x; then
20582          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20583$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20584        fi
20585        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20586      fi
20587    fi
20588
20589    # Now join together the path and the arguments once again
20590    if test "x$arguments" != xEOL; then
20591      new_complete="$new_path ${arguments% *}"
20592    else
20593      new_complete="$new_path"
20594    fi
20595
20596    if test "x$complete" != "x$new_complete"; then
20597      FOUND_MAKE="$new_complete"
20598      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20599$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20600    fi
20601  fi
20602
20603        fi
20604      fi
20605    fi
20606  fi
20607
20608    if test "x$FOUND_MAKE" = x; then
20609      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20610    fi
20611
20612  fi
20613
20614
20615  MAKE=$FOUND_MAKE
20616
20617  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20618$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20619
20620
20621  # Check if make supports the output sync option and if so, setup using it.
20622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20623$as_echo_n "checking if make --output-sync is supported... " >&6; }
20624  if $MAKE --version -O > /dev/null 2>&1; then
20625    OUTPUT_SYNC_SUPPORTED=true
20626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20627$as_echo "yes" >&6; }
20628    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20629$as_echo_n "checking for output-sync value... " >&6; }
20630
20631# Check whether --with-output-sync was given.
20632if test "${with_output_sync+set}" = set; then :
20633  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20634fi
20635
20636    if test "x$OUTPUT_SYNC" = "x"; then
20637      OUTPUT_SYNC=none
20638    fi
20639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20640$as_echo "$OUTPUT_SYNC" >&6; }
20641    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20642      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20643    fi
20644  else
20645    OUTPUT_SYNC_SUPPORTED=false
20646    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20647$as_echo "no" >&6; }
20648  fi
20649
20650
20651
20652
20653
20654
20655  # Test if find supports -delete
20656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20657$as_echo_n "checking if find supports -delete... " >&6; }
20658  FIND_DELETE="-delete"
20659
20660  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20661
20662  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20663
20664  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20665  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20666    # No, it does not.
20667    rm $DELETEDIR/TestIfFindSupportsDelete
20668    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20669      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20670      FIND_DELETE="-print | xargs rm"
20671    else
20672      FIND_DELETE="-exec rm \{\} \+"
20673    fi
20674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20675$as_echo "no" >&6; }
20676  else
20677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20678$as_echo "yes" >&6; }
20679  fi
20680  rmdir $DELETEDIR
20681
20682
20683
20684  # These tools might not be installed by default,
20685  # need hint on how to install them.
20686
20687
20688
20689  # Publish this variable in the help.
20690
20691
20692  if [ -z "${UNZIP+x}" ]; then
20693    # The variable is not set by user, try to locate tool using the code snippet
20694    for ac_prog in unzip
20695do
20696  # Extract the first word of "$ac_prog", so it can be a program name with args.
20697set dummy $ac_prog; ac_word=$2
20698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20699$as_echo_n "checking for $ac_word... " >&6; }
20700if ${ac_cv_path_UNZIP+:} false; then :
20701  $as_echo_n "(cached) " >&6
20702else
20703  case $UNZIP in
20704  [\\/]* | ?:[\\/]*)
20705  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20706  ;;
20707  *)
20708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20709for as_dir in $PATH
20710do
20711  IFS=$as_save_IFS
20712  test -z "$as_dir" && as_dir=.
20713    for ac_exec_ext in '' $ac_executable_extensions; do
20714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20715    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20717    break 2
20718  fi
20719done
20720  done
20721IFS=$as_save_IFS
20722
20723  ;;
20724esac
20725fi
20726UNZIP=$ac_cv_path_UNZIP
20727if test -n "$UNZIP"; then
20728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20729$as_echo "$UNZIP" >&6; }
20730else
20731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20732$as_echo "no" >&6; }
20733fi
20734
20735
20736  test -n "$UNZIP" && break
20737done
20738
20739  else
20740    # The variable is set, but is it from the command line or the environment?
20741
20742    # Try to remove the string !UNZIP! from our list.
20743    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20744    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20745      # If it failed, the variable was not from the command line. Ignore it,
20746      # but warn the user (except for BASH, which is always set by the calling BASH).
20747      if test "xUNZIP" != xBASH; then
20748        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20749$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20750      fi
20751      # Try to locate tool using the code snippet
20752      for ac_prog in unzip
20753do
20754  # Extract the first word of "$ac_prog", so it can be a program name with args.
20755set dummy $ac_prog; ac_word=$2
20756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20757$as_echo_n "checking for $ac_word... " >&6; }
20758if ${ac_cv_path_UNZIP+:} false; then :
20759  $as_echo_n "(cached) " >&6
20760else
20761  case $UNZIP in
20762  [\\/]* | ?:[\\/]*)
20763  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20764  ;;
20765  *)
20766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20767for as_dir in $PATH
20768do
20769  IFS=$as_save_IFS
20770  test -z "$as_dir" && as_dir=.
20771    for ac_exec_ext in '' $ac_executable_extensions; do
20772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20773    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20775    break 2
20776  fi
20777done
20778  done
20779IFS=$as_save_IFS
20780
20781  ;;
20782esac
20783fi
20784UNZIP=$ac_cv_path_UNZIP
20785if test -n "$UNZIP"; then
20786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20787$as_echo "$UNZIP" >&6; }
20788else
20789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20790$as_echo "no" >&6; }
20791fi
20792
20793
20794  test -n "$UNZIP" && break
20795done
20796
20797    else
20798      # If it succeeded, then it was overridden by the user. We will use it
20799      # for the tool.
20800
20801      # First remove it from the list of overridden variables, so we can test
20802      # for unknown variables in the end.
20803      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20804
20805      # Check if we try to supply an empty value
20806      if test "x$UNZIP" = x; then
20807        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20808$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20809        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20810$as_echo_n "checking for UNZIP... " >&6; }
20811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20812$as_echo "disabled" >&6; }
20813      else
20814        # Check if the provided tool contains a complete path.
20815        tool_specified="$UNZIP"
20816        tool_basename="${tool_specified##*/}"
20817        if test "x$tool_basename" = "x$tool_specified"; then
20818          # A command without a complete path is provided, search $PATH.
20819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20820$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20821          # Extract the first word of "$tool_basename", so it can be a program name with args.
20822set dummy $tool_basename; ac_word=$2
20823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20824$as_echo_n "checking for $ac_word... " >&6; }
20825if ${ac_cv_path_UNZIP+:} false; then :
20826  $as_echo_n "(cached) " >&6
20827else
20828  case $UNZIP in
20829  [\\/]* | ?:[\\/]*)
20830  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20831  ;;
20832  *)
20833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20834for as_dir in $PATH
20835do
20836  IFS=$as_save_IFS
20837  test -z "$as_dir" && as_dir=.
20838    for ac_exec_ext in '' $ac_executable_extensions; do
20839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20840    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20842    break 2
20843  fi
20844done
20845  done
20846IFS=$as_save_IFS
20847
20848  ;;
20849esac
20850fi
20851UNZIP=$ac_cv_path_UNZIP
20852if test -n "$UNZIP"; then
20853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20854$as_echo "$UNZIP" >&6; }
20855else
20856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20857$as_echo "no" >&6; }
20858fi
20859
20860
20861          if test "x$UNZIP" = x; then
20862            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20863          fi
20864        else
20865          # Otherwise we believe it is a complete path. Use it as it is.
20866          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20867$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20868          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20869$as_echo_n "checking for UNZIP... " >&6; }
20870          if test ! -x "$tool_specified"; then
20871            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20872$as_echo "not found" >&6; }
20873            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20874          fi
20875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20876$as_echo "$tool_specified" >&6; }
20877        fi
20878      fi
20879    fi
20880
20881  fi
20882
20883
20884
20885  if test "x$UNZIP" = x; then
20886    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20887  fi
20888
20889
20890
20891
20892
20893  # Publish this variable in the help.
20894
20895
20896  if [ -z "${ZIP+x}" ]; then
20897    # The variable is not set by user, try to locate tool using the code snippet
20898    for ac_prog in zip
20899do
20900  # Extract the first word of "$ac_prog", so it can be a program name with args.
20901set dummy $ac_prog; ac_word=$2
20902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20903$as_echo_n "checking for $ac_word... " >&6; }
20904if ${ac_cv_path_ZIP+:} false; then :
20905  $as_echo_n "(cached) " >&6
20906else
20907  case $ZIP in
20908  [\\/]* | ?:[\\/]*)
20909  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20910  ;;
20911  *)
20912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20913for as_dir in $PATH
20914do
20915  IFS=$as_save_IFS
20916  test -z "$as_dir" && as_dir=.
20917    for ac_exec_ext in '' $ac_executable_extensions; do
20918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20919    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20921    break 2
20922  fi
20923done
20924  done
20925IFS=$as_save_IFS
20926
20927  ;;
20928esac
20929fi
20930ZIP=$ac_cv_path_ZIP
20931if test -n "$ZIP"; then
20932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20933$as_echo "$ZIP" >&6; }
20934else
20935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20936$as_echo "no" >&6; }
20937fi
20938
20939
20940  test -n "$ZIP" && break
20941done
20942
20943  else
20944    # The variable is set, but is it from the command line or the environment?
20945
20946    # Try to remove the string !ZIP! from our list.
20947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20949      # If it failed, the variable was not from the command line. Ignore it,
20950      # but warn the user (except for BASH, which is always set by the calling BASH).
20951      if test "xZIP" != xBASH; then
20952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20953$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20954      fi
20955      # Try to locate tool using the code snippet
20956      for ac_prog in zip
20957do
20958  # Extract the first word of "$ac_prog", so it can be a program name with args.
20959set dummy $ac_prog; ac_word=$2
20960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20961$as_echo_n "checking for $ac_word... " >&6; }
20962if ${ac_cv_path_ZIP+:} false; then :
20963  $as_echo_n "(cached) " >&6
20964else
20965  case $ZIP in
20966  [\\/]* | ?:[\\/]*)
20967  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20968  ;;
20969  *)
20970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20971for as_dir in $PATH
20972do
20973  IFS=$as_save_IFS
20974  test -z "$as_dir" && as_dir=.
20975    for ac_exec_ext in '' $ac_executable_extensions; do
20976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20977    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20979    break 2
20980  fi
20981done
20982  done
20983IFS=$as_save_IFS
20984
20985  ;;
20986esac
20987fi
20988ZIP=$ac_cv_path_ZIP
20989if test -n "$ZIP"; then
20990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20991$as_echo "$ZIP" >&6; }
20992else
20993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20994$as_echo "no" >&6; }
20995fi
20996
20997
20998  test -n "$ZIP" && break
20999done
21000
21001    else
21002      # If it succeeded, then it was overridden by the user. We will use it
21003      # for the tool.
21004
21005      # First remove it from the list of overridden variables, so we can test
21006      # for unknown variables in the end.
21007      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21008
21009      # Check if we try to supply an empty value
21010      if test "x$ZIP" = x; then
21011        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21012$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21014$as_echo_n "checking for ZIP... " >&6; }
21015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21016$as_echo "disabled" >&6; }
21017      else
21018        # Check if the provided tool contains a complete path.
21019        tool_specified="$ZIP"
21020        tool_basename="${tool_specified##*/}"
21021        if test "x$tool_basename" = "x$tool_specified"; then
21022          # A command without a complete path is provided, search $PATH.
21023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21024$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21025          # Extract the first word of "$tool_basename", so it can be a program name with args.
21026set dummy $tool_basename; ac_word=$2
21027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21028$as_echo_n "checking for $ac_word... " >&6; }
21029if ${ac_cv_path_ZIP+:} false; then :
21030  $as_echo_n "(cached) " >&6
21031else
21032  case $ZIP in
21033  [\\/]* | ?:[\\/]*)
21034  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21035  ;;
21036  *)
21037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21038for as_dir in $PATH
21039do
21040  IFS=$as_save_IFS
21041  test -z "$as_dir" && as_dir=.
21042    for ac_exec_ext in '' $ac_executable_extensions; do
21043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21044    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21046    break 2
21047  fi
21048done
21049  done
21050IFS=$as_save_IFS
21051
21052  ;;
21053esac
21054fi
21055ZIP=$ac_cv_path_ZIP
21056if test -n "$ZIP"; then
21057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21058$as_echo "$ZIP" >&6; }
21059else
21060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21061$as_echo "no" >&6; }
21062fi
21063
21064
21065          if test "x$ZIP" = x; then
21066            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21067          fi
21068        else
21069          # Otherwise we believe it is a complete path. Use it as it is.
21070          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21071$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21072          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21073$as_echo_n "checking for ZIP... " >&6; }
21074          if test ! -x "$tool_specified"; then
21075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21076$as_echo "not found" >&6; }
21077            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21078          fi
21079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21080$as_echo "$tool_specified" >&6; }
21081        fi
21082      fi
21083    fi
21084
21085  fi
21086
21087
21088
21089  if test "x$ZIP" = x; then
21090    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21091  fi
21092
21093
21094
21095  # Non-required basic tools
21096
21097
21098
21099  # Publish this variable in the help.
21100
21101
21102  if [ -z "${LDD+x}" ]; then
21103    # The variable is not set by user, try to locate tool using the code snippet
21104    for ac_prog in ldd
21105do
21106  # Extract the first word of "$ac_prog", so it can be a program name with args.
21107set dummy $ac_prog; ac_word=$2
21108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21109$as_echo_n "checking for $ac_word... " >&6; }
21110if ${ac_cv_path_LDD+:} false; then :
21111  $as_echo_n "(cached) " >&6
21112else
21113  case $LDD in
21114  [\\/]* | ?:[\\/]*)
21115  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21116  ;;
21117  *)
21118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21119for as_dir in $PATH
21120do
21121  IFS=$as_save_IFS
21122  test -z "$as_dir" && as_dir=.
21123    for ac_exec_ext in '' $ac_executable_extensions; do
21124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21125    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21127    break 2
21128  fi
21129done
21130  done
21131IFS=$as_save_IFS
21132
21133  ;;
21134esac
21135fi
21136LDD=$ac_cv_path_LDD
21137if test -n "$LDD"; then
21138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21139$as_echo "$LDD" >&6; }
21140else
21141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21142$as_echo "no" >&6; }
21143fi
21144
21145
21146  test -n "$LDD" && break
21147done
21148
21149  else
21150    # The variable is set, but is it from the command line or the environment?
21151
21152    # Try to remove the string !LDD! from our list.
21153    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21154    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21155      # If it failed, the variable was not from the command line. Ignore it,
21156      # but warn the user (except for BASH, which is always set by the calling BASH).
21157      if test "xLDD" != xBASH; then
21158        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21159$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21160      fi
21161      # Try to locate tool using the code snippet
21162      for ac_prog in ldd
21163do
21164  # Extract the first word of "$ac_prog", so it can be a program name with args.
21165set dummy $ac_prog; ac_word=$2
21166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21167$as_echo_n "checking for $ac_word... " >&6; }
21168if ${ac_cv_path_LDD+:} false; then :
21169  $as_echo_n "(cached) " >&6
21170else
21171  case $LDD in
21172  [\\/]* | ?:[\\/]*)
21173  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21174  ;;
21175  *)
21176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21177for as_dir in $PATH
21178do
21179  IFS=$as_save_IFS
21180  test -z "$as_dir" && as_dir=.
21181    for ac_exec_ext in '' $ac_executable_extensions; do
21182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21183    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21185    break 2
21186  fi
21187done
21188  done
21189IFS=$as_save_IFS
21190
21191  ;;
21192esac
21193fi
21194LDD=$ac_cv_path_LDD
21195if test -n "$LDD"; then
21196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21197$as_echo "$LDD" >&6; }
21198else
21199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21200$as_echo "no" >&6; }
21201fi
21202
21203
21204  test -n "$LDD" && break
21205done
21206
21207    else
21208      # If it succeeded, then it was overridden by the user. We will use it
21209      # for the tool.
21210
21211      # First remove it from the list of overridden variables, so we can test
21212      # for unknown variables in the end.
21213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21214
21215      # Check if we try to supply an empty value
21216      if test "x$LDD" = x; then
21217        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21218$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21219        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21220$as_echo_n "checking for LDD... " >&6; }
21221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21222$as_echo "disabled" >&6; }
21223      else
21224        # Check if the provided tool contains a complete path.
21225        tool_specified="$LDD"
21226        tool_basename="${tool_specified##*/}"
21227        if test "x$tool_basename" = "x$tool_specified"; then
21228          # A command without a complete path is provided, search $PATH.
21229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21230$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21231          # Extract the first word of "$tool_basename", so it can be a program name with args.
21232set dummy $tool_basename; ac_word=$2
21233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21234$as_echo_n "checking for $ac_word... " >&6; }
21235if ${ac_cv_path_LDD+:} false; then :
21236  $as_echo_n "(cached) " >&6
21237else
21238  case $LDD in
21239  [\\/]* | ?:[\\/]*)
21240  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21241  ;;
21242  *)
21243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21244for as_dir in $PATH
21245do
21246  IFS=$as_save_IFS
21247  test -z "$as_dir" && as_dir=.
21248    for ac_exec_ext in '' $ac_executable_extensions; do
21249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21250    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21252    break 2
21253  fi
21254done
21255  done
21256IFS=$as_save_IFS
21257
21258  ;;
21259esac
21260fi
21261LDD=$ac_cv_path_LDD
21262if test -n "$LDD"; then
21263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21264$as_echo "$LDD" >&6; }
21265else
21266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21267$as_echo "no" >&6; }
21268fi
21269
21270
21271          if test "x$LDD" = x; then
21272            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21273          fi
21274        else
21275          # Otherwise we believe it is a complete path. Use it as it is.
21276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21277$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21278          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21279$as_echo_n "checking for LDD... " >&6; }
21280          if test ! -x "$tool_specified"; then
21281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21282$as_echo "not found" >&6; }
21283            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21284          fi
21285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21286$as_echo "$tool_specified" >&6; }
21287        fi
21288      fi
21289    fi
21290
21291  fi
21292
21293
21294  if test "x$LDD" = "x"; then
21295    # List shared lib dependencies is used for
21296    # debug output and checking for forbidden dependencies.
21297    # We can build without it.
21298    LDD="true"
21299  fi
21300
21301
21302  # Publish this variable in the help.
21303
21304
21305  if [ -z "${OTOOL+x}" ]; then
21306    # The variable is not set by user, try to locate tool using the code snippet
21307    for ac_prog in otool
21308do
21309  # Extract the first word of "$ac_prog", so it can be a program name with args.
21310set dummy $ac_prog; ac_word=$2
21311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21312$as_echo_n "checking for $ac_word... " >&6; }
21313if ${ac_cv_path_OTOOL+:} false; then :
21314  $as_echo_n "(cached) " >&6
21315else
21316  case $OTOOL in
21317  [\\/]* | ?:[\\/]*)
21318  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21319  ;;
21320  *)
21321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21322for as_dir in $PATH
21323do
21324  IFS=$as_save_IFS
21325  test -z "$as_dir" && as_dir=.
21326    for ac_exec_ext in '' $ac_executable_extensions; do
21327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21328    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21330    break 2
21331  fi
21332done
21333  done
21334IFS=$as_save_IFS
21335
21336  ;;
21337esac
21338fi
21339OTOOL=$ac_cv_path_OTOOL
21340if test -n "$OTOOL"; then
21341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21342$as_echo "$OTOOL" >&6; }
21343else
21344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21345$as_echo "no" >&6; }
21346fi
21347
21348
21349  test -n "$OTOOL" && break
21350done
21351
21352  else
21353    # The variable is set, but is it from the command line or the environment?
21354
21355    # Try to remove the string !OTOOL! from our list.
21356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21358      # If it failed, the variable was not from the command line. Ignore it,
21359      # but warn the user (except for BASH, which is always set by the calling BASH).
21360      if test "xOTOOL" != xBASH; then
21361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21362$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21363      fi
21364      # Try to locate tool using the code snippet
21365      for ac_prog in otool
21366do
21367  # Extract the first word of "$ac_prog", so it can be a program name with args.
21368set dummy $ac_prog; ac_word=$2
21369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21370$as_echo_n "checking for $ac_word... " >&6; }
21371if ${ac_cv_path_OTOOL+:} false; then :
21372  $as_echo_n "(cached) " >&6
21373else
21374  case $OTOOL in
21375  [\\/]* | ?:[\\/]*)
21376  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21377  ;;
21378  *)
21379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21380for as_dir in $PATH
21381do
21382  IFS=$as_save_IFS
21383  test -z "$as_dir" && as_dir=.
21384    for ac_exec_ext in '' $ac_executable_extensions; do
21385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21386    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21388    break 2
21389  fi
21390done
21391  done
21392IFS=$as_save_IFS
21393
21394  ;;
21395esac
21396fi
21397OTOOL=$ac_cv_path_OTOOL
21398if test -n "$OTOOL"; then
21399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21400$as_echo "$OTOOL" >&6; }
21401else
21402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21403$as_echo "no" >&6; }
21404fi
21405
21406
21407  test -n "$OTOOL" && break
21408done
21409
21410    else
21411      # If it succeeded, then it was overridden by the user. We will use it
21412      # for the tool.
21413
21414      # First remove it from the list of overridden variables, so we can test
21415      # for unknown variables in the end.
21416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21417
21418      # Check if we try to supply an empty value
21419      if test "x$OTOOL" = x; then
21420        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21421$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21422        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21423$as_echo_n "checking for OTOOL... " >&6; }
21424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21425$as_echo "disabled" >&6; }
21426      else
21427        # Check if the provided tool contains a complete path.
21428        tool_specified="$OTOOL"
21429        tool_basename="${tool_specified##*/}"
21430        if test "x$tool_basename" = "x$tool_specified"; then
21431          # A command without a complete path is provided, search $PATH.
21432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21433$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21434          # Extract the first word of "$tool_basename", so it can be a program name with args.
21435set dummy $tool_basename; ac_word=$2
21436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21437$as_echo_n "checking for $ac_word... " >&6; }
21438if ${ac_cv_path_OTOOL+:} false; then :
21439  $as_echo_n "(cached) " >&6
21440else
21441  case $OTOOL in
21442  [\\/]* | ?:[\\/]*)
21443  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21444  ;;
21445  *)
21446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21447for as_dir in $PATH
21448do
21449  IFS=$as_save_IFS
21450  test -z "$as_dir" && as_dir=.
21451    for ac_exec_ext in '' $ac_executable_extensions; do
21452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21453    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21455    break 2
21456  fi
21457done
21458  done
21459IFS=$as_save_IFS
21460
21461  ;;
21462esac
21463fi
21464OTOOL=$ac_cv_path_OTOOL
21465if test -n "$OTOOL"; then
21466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21467$as_echo "$OTOOL" >&6; }
21468else
21469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21470$as_echo "no" >&6; }
21471fi
21472
21473
21474          if test "x$OTOOL" = x; then
21475            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21476          fi
21477        else
21478          # Otherwise we believe it is a complete path. Use it as it is.
21479          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21480$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21481          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21482$as_echo_n "checking for OTOOL... " >&6; }
21483          if test ! -x "$tool_specified"; then
21484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21485$as_echo "not found" >&6; }
21486            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21487          fi
21488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21489$as_echo "$tool_specified" >&6; }
21490        fi
21491      fi
21492    fi
21493
21494  fi
21495
21496
21497  if test "x$OTOOL" = "x"; then
21498    OTOOL="true"
21499  fi
21500
21501
21502  # Publish this variable in the help.
21503
21504
21505  if [ -z "${READELF+x}" ]; then
21506    # The variable is not set by user, try to locate tool using the code snippet
21507    for ac_prog in greadelf readelf
21508do
21509  # Extract the first word of "$ac_prog", so it can be a program name with args.
21510set dummy $ac_prog; ac_word=$2
21511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21512$as_echo_n "checking for $ac_word... " >&6; }
21513if ${ac_cv_path_READELF+:} false; then :
21514  $as_echo_n "(cached) " >&6
21515else
21516  case $READELF in
21517  [\\/]* | ?:[\\/]*)
21518  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21519  ;;
21520  *)
21521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21522for as_dir in $PATH
21523do
21524  IFS=$as_save_IFS
21525  test -z "$as_dir" && as_dir=.
21526    for ac_exec_ext in '' $ac_executable_extensions; do
21527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21528    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21530    break 2
21531  fi
21532done
21533  done
21534IFS=$as_save_IFS
21535
21536  ;;
21537esac
21538fi
21539READELF=$ac_cv_path_READELF
21540if test -n "$READELF"; then
21541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21542$as_echo "$READELF" >&6; }
21543else
21544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21545$as_echo "no" >&6; }
21546fi
21547
21548
21549  test -n "$READELF" && break
21550done
21551
21552  else
21553    # The variable is set, but is it from the command line or the environment?
21554
21555    # Try to remove the string !READELF! from our list.
21556    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21557    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21558      # If it failed, the variable was not from the command line. Ignore it,
21559      # but warn the user (except for BASH, which is always set by the calling BASH).
21560      if test "xREADELF" != xBASH; then
21561        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21562$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21563      fi
21564      # Try to locate tool using the code snippet
21565      for ac_prog in greadelf readelf
21566do
21567  # Extract the first word of "$ac_prog", so it can be a program name with args.
21568set dummy $ac_prog; ac_word=$2
21569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21570$as_echo_n "checking for $ac_word... " >&6; }
21571if ${ac_cv_path_READELF+:} false; then :
21572  $as_echo_n "(cached) " >&6
21573else
21574  case $READELF in
21575  [\\/]* | ?:[\\/]*)
21576  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21577  ;;
21578  *)
21579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21580for as_dir in $PATH
21581do
21582  IFS=$as_save_IFS
21583  test -z "$as_dir" && as_dir=.
21584    for ac_exec_ext in '' $ac_executable_extensions; do
21585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21586    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21588    break 2
21589  fi
21590done
21591  done
21592IFS=$as_save_IFS
21593
21594  ;;
21595esac
21596fi
21597READELF=$ac_cv_path_READELF
21598if test -n "$READELF"; then
21599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21600$as_echo "$READELF" >&6; }
21601else
21602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21603$as_echo "no" >&6; }
21604fi
21605
21606
21607  test -n "$READELF" && break
21608done
21609
21610    else
21611      # If it succeeded, then it was overridden by the user. We will use it
21612      # for the tool.
21613
21614      # First remove it from the list of overridden variables, so we can test
21615      # for unknown variables in the end.
21616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21617
21618      # Check if we try to supply an empty value
21619      if test "x$READELF" = x; then
21620        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21621$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21623$as_echo_n "checking for READELF... " >&6; }
21624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21625$as_echo "disabled" >&6; }
21626      else
21627        # Check if the provided tool contains a complete path.
21628        tool_specified="$READELF"
21629        tool_basename="${tool_specified##*/}"
21630        if test "x$tool_basename" = "x$tool_specified"; then
21631          # A command without a complete path is provided, search $PATH.
21632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21633$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21634          # Extract the first word of "$tool_basename", so it can be a program name with args.
21635set dummy $tool_basename; ac_word=$2
21636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21637$as_echo_n "checking for $ac_word... " >&6; }
21638if ${ac_cv_path_READELF+:} false; then :
21639  $as_echo_n "(cached) " >&6
21640else
21641  case $READELF in
21642  [\\/]* | ?:[\\/]*)
21643  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21644  ;;
21645  *)
21646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21647for as_dir in $PATH
21648do
21649  IFS=$as_save_IFS
21650  test -z "$as_dir" && as_dir=.
21651    for ac_exec_ext in '' $ac_executable_extensions; do
21652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21653    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21655    break 2
21656  fi
21657done
21658  done
21659IFS=$as_save_IFS
21660
21661  ;;
21662esac
21663fi
21664READELF=$ac_cv_path_READELF
21665if test -n "$READELF"; then
21666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21667$as_echo "$READELF" >&6; }
21668else
21669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21670$as_echo "no" >&6; }
21671fi
21672
21673
21674          if test "x$READELF" = x; then
21675            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21676          fi
21677        else
21678          # Otherwise we believe it is a complete path. Use it as it is.
21679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21680$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21681          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21682$as_echo_n "checking for READELF... " >&6; }
21683          if test ! -x "$tool_specified"; then
21684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21685$as_echo "not found" >&6; }
21686            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21687          fi
21688          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21689$as_echo "$tool_specified" >&6; }
21690        fi
21691      fi
21692    fi
21693
21694  fi
21695
21696
21697
21698
21699  # Publish this variable in the help.
21700
21701
21702  if [ -z "${HG+x}" ]; then
21703    # The variable is not set by user, try to locate tool using the code snippet
21704    for ac_prog in hg
21705do
21706  # Extract the first word of "$ac_prog", so it can be a program name with args.
21707set dummy $ac_prog; ac_word=$2
21708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21709$as_echo_n "checking for $ac_word... " >&6; }
21710if ${ac_cv_path_HG+:} false; then :
21711  $as_echo_n "(cached) " >&6
21712else
21713  case $HG in
21714  [\\/]* | ?:[\\/]*)
21715  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21716  ;;
21717  *)
21718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21719for as_dir in $PATH
21720do
21721  IFS=$as_save_IFS
21722  test -z "$as_dir" && as_dir=.
21723    for ac_exec_ext in '' $ac_executable_extensions; do
21724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21725    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21727    break 2
21728  fi
21729done
21730  done
21731IFS=$as_save_IFS
21732
21733  ;;
21734esac
21735fi
21736HG=$ac_cv_path_HG
21737if test -n "$HG"; then
21738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21739$as_echo "$HG" >&6; }
21740else
21741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21742$as_echo "no" >&6; }
21743fi
21744
21745
21746  test -n "$HG" && break
21747done
21748
21749  else
21750    # The variable is set, but is it from the command line or the environment?
21751
21752    # Try to remove the string !HG! from our list.
21753    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21754    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21755      # If it failed, the variable was not from the command line. Ignore it,
21756      # but warn the user (except for BASH, which is always set by the calling BASH).
21757      if test "xHG" != xBASH; then
21758        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21759$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21760      fi
21761      # Try to locate tool using the code snippet
21762      for ac_prog in hg
21763do
21764  # Extract the first word of "$ac_prog", so it can be a program name with args.
21765set dummy $ac_prog; ac_word=$2
21766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21767$as_echo_n "checking for $ac_word... " >&6; }
21768if ${ac_cv_path_HG+:} false; then :
21769  $as_echo_n "(cached) " >&6
21770else
21771  case $HG in
21772  [\\/]* | ?:[\\/]*)
21773  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21774  ;;
21775  *)
21776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21777for as_dir in $PATH
21778do
21779  IFS=$as_save_IFS
21780  test -z "$as_dir" && as_dir=.
21781    for ac_exec_ext in '' $ac_executable_extensions; do
21782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21783    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21785    break 2
21786  fi
21787done
21788  done
21789IFS=$as_save_IFS
21790
21791  ;;
21792esac
21793fi
21794HG=$ac_cv_path_HG
21795if test -n "$HG"; then
21796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21797$as_echo "$HG" >&6; }
21798else
21799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21800$as_echo "no" >&6; }
21801fi
21802
21803
21804  test -n "$HG" && break
21805done
21806
21807    else
21808      # If it succeeded, then it was overridden by the user. We will use it
21809      # for the tool.
21810
21811      # First remove it from the list of overridden variables, so we can test
21812      # for unknown variables in the end.
21813      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21814
21815      # Check if we try to supply an empty value
21816      if test "x$HG" = x; then
21817        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21818$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21819        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21820$as_echo_n "checking for HG... " >&6; }
21821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21822$as_echo "disabled" >&6; }
21823      else
21824        # Check if the provided tool contains a complete path.
21825        tool_specified="$HG"
21826        tool_basename="${tool_specified##*/}"
21827        if test "x$tool_basename" = "x$tool_specified"; then
21828          # A command without a complete path is provided, search $PATH.
21829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21830$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21831          # Extract the first word of "$tool_basename", so it can be a program name with args.
21832set dummy $tool_basename; ac_word=$2
21833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21834$as_echo_n "checking for $ac_word... " >&6; }
21835if ${ac_cv_path_HG+:} false; then :
21836  $as_echo_n "(cached) " >&6
21837else
21838  case $HG in
21839  [\\/]* | ?:[\\/]*)
21840  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21841  ;;
21842  *)
21843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21844for as_dir in $PATH
21845do
21846  IFS=$as_save_IFS
21847  test -z "$as_dir" && as_dir=.
21848    for ac_exec_ext in '' $ac_executable_extensions; do
21849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21850    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21852    break 2
21853  fi
21854done
21855  done
21856IFS=$as_save_IFS
21857
21858  ;;
21859esac
21860fi
21861HG=$ac_cv_path_HG
21862if test -n "$HG"; then
21863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21864$as_echo "$HG" >&6; }
21865else
21866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21867$as_echo "no" >&6; }
21868fi
21869
21870
21871          if test "x$HG" = x; then
21872            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21873          fi
21874        else
21875          # Otherwise we believe it is a complete path. Use it as it is.
21876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21877$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21878          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21879$as_echo_n "checking for HG... " >&6; }
21880          if test ! -x "$tool_specified"; then
21881            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21882$as_echo "not found" >&6; }
21883            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21884          fi
21885          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21886$as_echo "$tool_specified" >&6; }
21887        fi
21888      fi
21889    fi
21890
21891  fi
21892
21893
21894
21895
21896  # Publish this variable in the help.
21897
21898
21899  if [ -z "${STAT+x}" ]; then
21900    # The variable is not set by user, try to locate tool using the code snippet
21901    for ac_prog in stat
21902do
21903  # Extract the first word of "$ac_prog", so it can be a program name with args.
21904set dummy $ac_prog; ac_word=$2
21905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21906$as_echo_n "checking for $ac_word... " >&6; }
21907if ${ac_cv_path_STAT+:} false; then :
21908  $as_echo_n "(cached) " >&6
21909else
21910  case $STAT in
21911  [\\/]* | ?:[\\/]*)
21912  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21913  ;;
21914  *)
21915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21916for as_dir in $PATH
21917do
21918  IFS=$as_save_IFS
21919  test -z "$as_dir" && as_dir=.
21920    for ac_exec_ext in '' $ac_executable_extensions; do
21921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21922    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21924    break 2
21925  fi
21926done
21927  done
21928IFS=$as_save_IFS
21929
21930  ;;
21931esac
21932fi
21933STAT=$ac_cv_path_STAT
21934if test -n "$STAT"; then
21935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21936$as_echo "$STAT" >&6; }
21937else
21938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21939$as_echo "no" >&6; }
21940fi
21941
21942
21943  test -n "$STAT" && break
21944done
21945
21946  else
21947    # The variable is set, but is it from the command line or the environment?
21948
21949    # Try to remove the string !STAT! from our list.
21950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21952      # If it failed, the variable was not from the command line. Ignore it,
21953      # but warn the user (except for BASH, which is always set by the calling BASH).
21954      if test "xSTAT" != xBASH; then
21955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21956$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21957      fi
21958      # Try to locate tool using the code snippet
21959      for ac_prog in stat
21960do
21961  # Extract the first word of "$ac_prog", so it can be a program name with args.
21962set dummy $ac_prog; ac_word=$2
21963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21964$as_echo_n "checking for $ac_word... " >&6; }
21965if ${ac_cv_path_STAT+:} false; then :
21966  $as_echo_n "(cached) " >&6
21967else
21968  case $STAT in
21969  [\\/]* | ?:[\\/]*)
21970  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21971  ;;
21972  *)
21973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21974for as_dir in $PATH
21975do
21976  IFS=$as_save_IFS
21977  test -z "$as_dir" && as_dir=.
21978    for ac_exec_ext in '' $ac_executable_extensions; do
21979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21980    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21982    break 2
21983  fi
21984done
21985  done
21986IFS=$as_save_IFS
21987
21988  ;;
21989esac
21990fi
21991STAT=$ac_cv_path_STAT
21992if test -n "$STAT"; then
21993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21994$as_echo "$STAT" >&6; }
21995else
21996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21997$as_echo "no" >&6; }
21998fi
21999
22000
22001  test -n "$STAT" && break
22002done
22003
22004    else
22005      # If it succeeded, then it was overridden by the user. We will use it
22006      # for the tool.
22007
22008      # First remove it from the list of overridden variables, so we can test
22009      # for unknown variables in the end.
22010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22011
22012      # Check if we try to supply an empty value
22013      if test "x$STAT" = x; then
22014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22015$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22017$as_echo_n "checking for STAT... " >&6; }
22018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22019$as_echo "disabled" >&6; }
22020      else
22021        # Check if the provided tool contains a complete path.
22022        tool_specified="$STAT"
22023        tool_basename="${tool_specified##*/}"
22024        if test "x$tool_basename" = "x$tool_specified"; then
22025          # A command without a complete path is provided, search $PATH.
22026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22027$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22028          # Extract the first word of "$tool_basename", so it can be a program name with args.
22029set dummy $tool_basename; ac_word=$2
22030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22031$as_echo_n "checking for $ac_word... " >&6; }
22032if ${ac_cv_path_STAT+:} false; then :
22033  $as_echo_n "(cached) " >&6
22034else
22035  case $STAT in
22036  [\\/]* | ?:[\\/]*)
22037  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22038  ;;
22039  *)
22040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22041for as_dir in $PATH
22042do
22043  IFS=$as_save_IFS
22044  test -z "$as_dir" && as_dir=.
22045    for ac_exec_ext in '' $ac_executable_extensions; do
22046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22047    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22049    break 2
22050  fi
22051done
22052  done
22053IFS=$as_save_IFS
22054
22055  ;;
22056esac
22057fi
22058STAT=$ac_cv_path_STAT
22059if test -n "$STAT"; then
22060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22061$as_echo "$STAT" >&6; }
22062else
22063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22064$as_echo "no" >&6; }
22065fi
22066
22067
22068          if test "x$STAT" = x; then
22069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22070          fi
22071        else
22072          # Otherwise we believe it is a complete path. Use it as it is.
22073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22074$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22076$as_echo_n "checking for STAT... " >&6; }
22077          if test ! -x "$tool_specified"; then
22078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22079$as_echo "not found" >&6; }
22080            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22081          fi
22082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22083$as_echo "$tool_specified" >&6; }
22084        fi
22085      fi
22086    fi
22087
22088  fi
22089
22090
22091
22092
22093  # Publish this variable in the help.
22094
22095
22096  if [ -z "${TIME+x}" ]; then
22097    # The variable is not set by user, try to locate tool using the code snippet
22098    for ac_prog in time
22099do
22100  # Extract the first word of "$ac_prog", so it can be a program name with args.
22101set dummy $ac_prog; ac_word=$2
22102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22103$as_echo_n "checking for $ac_word... " >&6; }
22104if ${ac_cv_path_TIME+:} false; then :
22105  $as_echo_n "(cached) " >&6
22106else
22107  case $TIME in
22108  [\\/]* | ?:[\\/]*)
22109  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22110  ;;
22111  *)
22112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22113for as_dir in $PATH
22114do
22115  IFS=$as_save_IFS
22116  test -z "$as_dir" && as_dir=.
22117    for ac_exec_ext in '' $ac_executable_extensions; do
22118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22119    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22121    break 2
22122  fi
22123done
22124  done
22125IFS=$as_save_IFS
22126
22127  ;;
22128esac
22129fi
22130TIME=$ac_cv_path_TIME
22131if test -n "$TIME"; then
22132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22133$as_echo "$TIME" >&6; }
22134else
22135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22136$as_echo "no" >&6; }
22137fi
22138
22139
22140  test -n "$TIME" && break
22141done
22142
22143  else
22144    # The variable is set, but is it from the command line or the environment?
22145
22146    # Try to remove the string !TIME! from our list.
22147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22149      # If it failed, the variable was not from the command line. Ignore it,
22150      # but warn the user (except for BASH, which is always set by the calling BASH).
22151      if test "xTIME" != xBASH; then
22152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22153$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22154      fi
22155      # Try to locate tool using the code snippet
22156      for ac_prog in time
22157do
22158  # Extract the first word of "$ac_prog", so it can be a program name with args.
22159set dummy $ac_prog; ac_word=$2
22160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22161$as_echo_n "checking for $ac_word... " >&6; }
22162if ${ac_cv_path_TIME+:} false; then :
22163  $as_echo_n "(cached) " >&6
22164else
22165  case $TIME in
22166  [\\/]* | ?:[\\/]*)
22167  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22168  ;;
22169  *)
22170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22171for as_dir in $PATH
22172do
22173  IFS=$as_save_IFS
22174  test -z "$as_dir" && as_dir=.
22175    for ac_exec_ext in '' $ac_executable_extensions; do
22176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22177    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22179    break 2
22180  fi
22181done
22182  done
22183IFS=$as_save_IFS
22184
22185  ;;
22186esac
22187fi
22188TIME=$ac_cv_path_TIME
22189if test -n "$TIME"; then
22190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22191$as_echo "$TIME" >&6; }
22192else
22193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22194$as_echo "no" >&6; }
22195fi
22196
22197
22198  test -n "$TIME" && break
22199done
22200
22201    else
22202      # If it succeeded, then it was overridden by the user. We will use it
22203      # for the tool.
22204
22205      # First remove it from the list of overridden variables, so we can test
22206      # for unknown variables in the end.
22207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22208
22209      # Check if we try to supply an empty value
22210      if test "x$TIME" = x; then
22211        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22212$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22213        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22214$as_echo_n "checking for TIME... " >&6; }
22215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22216$as_echo "disabled" >&6; }
22217      else
22218        # Check if the provided tool contains a complete path.
22219        tool_specified="$TIME"
22220        tool_basename="${tool_specified##*/}"
22221        if test "x$tool_basename" = "x$tool_specified"; then
22222          # A command without a complete path is provided, search $PATH.
22223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22224$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22225          # Extract the first word of "$tool_basename", so it can be a program name with args.
22226set dummy $tool_basename; ac_word=$2
22227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22228$as_echo_n "checking for $ac_word... " >&6; }
22229if ${ac_cv_path_TIME+:} false; then :
22230  $as_echo_n "(cached) " >&6
22231else
22232  case $TIME in
22233  [\\/]* | ?:[\\/]*)
22234  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22235  ;;
22236  *)
22237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22238for as_dir in $PATH
22239do
22240  IFS=$as_save_IFS
22241  test -z "$as_dir" && as_dir=.
22242    for ac_exec_ext in '' $ac_executable_extensions; do
22243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22244    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22246    break 2
22247  fi
22248done
22249  done
22250IFS=$as_save_IFS
22251
22252  ;;
22253esac
22254fi
22255TIME=$ac_cv_path_TIME
22256if test -n "$TIME"; then
22257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22258$as_echo "$TIME" >&6; }
22259else
22260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22261$as_echo "no" >&6; }
22262fi
22263
22264
22265          if test "x$TIME" = x; then
22266            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22267          fi
22268        else
22269          # Otherwise we believe it is a complete path. Use it as it is.
22270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22271$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22272          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22273$as_echo_n "checking for TIME... " >&6; }
22274          if test ! -x "$tool_specified"; then
22275            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22276$as_echo "not found" >&6; }
22277            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22278          fi
22279          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22280$as_echo "$tool_specified" >&6; }
22281        fi
22282      fi
22283    fi
22284
22285  fi
22286
22287
22288
22289
22290  # Publish this variable in the help.
22291
22292
22293  if [ -z "${DTRACE+x}" ]; then
22294    # The variable is not set by user, try to locate tool using the code snippet
22295    for ac_prog in dtrace
22296do
22297  # Extract the first word of "$ac_prog", so it can be a program name with args.
22298set dummy $ac_prog; ac_word=$2
22299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22300$as_echo_n "checking for $ac_word... " >&6; }
22301if ${ac_cv_path_DTRACE+:} false; then :
22302  $as_echo_n "(cached) " >&6
22303else
22304  case $DTRACE in
22305  [\\/]* | ?:[\\/]*)
22306  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22307  ;;
22308  *)
22309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22310for as_dir in $PATH
22311do
22312  IFS=$as_save_IFS
22313  test -z "$as_dir" && as_dir=.
22314    for ac_exec_ext in '' $ac_executable_extensions; do
22315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22316    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22318    break 2
22319  fi
22320done
22321  done
22322IFS=$as_save_IFS
22323
22324  ;;
22325esac
22326fi
22327DTRACE=$ac_cv_path_DTRACE
22328if test -n "$DTRACE"; then
22329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22330$as_echo "$DTRACE" >&6; }
22331else
22332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22333$as_echo "no" >&6; }
22334fi
22335
22336
22337  test -n "$DTRACE" && break
22338done
22339
22340  else
22341    # The variable is set, but is it from the command line or the environment?
22342
22343    # Try to remove the string !DTRACE! from our list.
22344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22346      # If it failed, the variable was not from the command line. Ignore it,
22347      # but warn the user (except for BASH, which is always set by the calling BASH).
22348      if test "xDTRACE" != xBASH; then
22349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22350$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22351      fi
22352      # Try to locate tool using the code snippet
22353      for ac_prog in dtrace
22354do
22355  # Extract the first word of "$ac_prog", so it can be a program name with args.
22356set dummy $ac_prog; ac_word=$2
22357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22358$as_echo_n "checking for $ac_word... " >&6; }
22359if ${ac_cv_path_DTRACE+:} false; then :
22360  $as_echo_n "(cached) " >&6
22361else
22362  case $DTRACE in
22363  [\\/]* | ?:[\\/]*)
22364  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22365  ;;
22366  *)
22367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22368for as_dir in $PATH
22369do
22370  IFS=$as_save_IFS
22371  test -z "$as_dir" && as_dir=.
22372    for ac_exec_ext in '' $ac_executable_extensions; do
22373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22374    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22376    break 2
22377  fi
22378done
22379  done
22380IFS=$as_save_IFS
22381
22382  ;;
22383esac
22384fi
22385DTRACE=$ac_cv_path_DTRACE
22386if test -n "$DTRACE"; then
22387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22388$as_echo "$DTRACE" >&6; }
22389else
22390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22391$as_echo "no" >&6; }
22392fi
22393
22394
22395  test -n "$DTRACE" && break
22396done
22397
22398    else
22399      # If it succeeded, then it was overridden by the user. We will use it
22400      # for the tool.
22401
22402      # First remove it from the list of overridden variables, so we can test
22403      # for unknown variables in the end.
22404      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22405
22406      # Check if we try to supply an empty value
22407      if test "x$DTRACE" = x; then
22408        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22409$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22411$as_echo_n "checking for DTRACE... " >&6; }
22412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22413$as_echo "disabled" >&6; }
22414      else
22415        # Check if the provided tool contains a complete path.
22416        tool_specified="$DTRACE"
22417        tool_basename="${tool_specified##*/}"
22418        if test "x$tool_basename" = "x$tool_specified"; then
22419          # A command without a complete path is provided, search $PATH.
22420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22421$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22422          # Extract the first word of "$tool_basename", so it can be a program name with args.
22423set dummy $tool_basename; ac_word=$2
22424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22425$as_echo_n "checking for $ac_word... " >&6; }
22426if ${ac_cv_path_DTRACE+:} false; then :
22427  $as_echo_n "(cached) " >&6
22428else
22429  case $DTRACE in
22430  [\\/]* | ?:[\\/]*)
22431  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22432  ;;
22433  *)
22434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22435for as_dir in $PATH
22436do
22437  IFS=$as_save_IFS
22438  test -z "$as_dir" && as_dir=.
22439    for ac_exec_ext in '' $ac_executable_extensions; do
22440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22441    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22443    break 2
22444  fi
22445done
22446  done
22447IFS=$as_save_IFS
22448
22449  ;;
22450esac
22451fi
22452DTRACE=$ac_cv_path_DTRACE
22453if test -n "$DTRACE"; then
22454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22455$as_echo "$DTRACE" >&6; }
22456else
22457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22458$as_echo "no" >&6; }
22459fi
22460
22461
22462          if test "x$DTRACE" = x; then
22463            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22464          fi
22465        else
22466          # Otherwise we believe it is a complete path. Use it as it is.
22467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22468$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22469          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22470$as_echo_n "checking for DTRACE... " >&6; }
22471          if test ! -x "$tool_specified"; then
22472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22473$as_echo "not found" >&6; }
22474            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22475          fi
22476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22477$as_echo "$tool_specified" >&6; }
22478        fi
22479      fi
22480    fi
22481
22482  fi
22483
22484
22485
22486
22487  # Publish this variable in the help.
22488
22489
22490  if [ -z "${PATCH+x}" ]; then
22491    # The variable is not set by user, try to locate tool using the code snippet
22492    for ac_prog in gpatch patch
22493do
22494  # Extract the first word of "$ac_prog", so it can be a program name with args.
22495set dummy $ac_prog; ac_word=$2
22496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22497$as_echo_n "checking for $ac_word... " >&6; }
22498if ${ac_cv_path_PATCH+:} false; then :
22499  $as_echo_n "(cached) " >&6
22500else
22501  case $PATCH in
22502  [\\/]* | ?:[\\/]*)
22503  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22504  ;;
22505  *)
22506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22507for as_dir in $PATH
22508do
22509  IFS=$as_save_IFS
22510  test -z "$as_dir" && as_dir=.
22511    for ac_exec_ext in '' $ac_executable_extensions; do
22512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22513    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22515    break 2
22516  fi
22517done
22518  done
22519IFS=$as_save_IFS
22520
22521  ;;
22522esac
22523fi
22524PATCH=$ac_cv_path_PATCH
22525if test -n "$PATCH"; then
22526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22527$as_echo "$PATCH" >&6; }
22528else
22529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22530$as_echo "no" >&6; }
22531fi
22532
22533
22534  test -n "$PATCH" && break
22535done
22536
22537  else
22538    # The variable is set, but is it from the command line or the environment?
22539
22540    # Try to remove the string !PATCH! from our list.
22541    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22542    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22543      # If it failed, the variable was not from the command line. Ignore it,
22544      # but warn the user (except for BASH, which is always set by the calling BASH).
22545      if test "xPATCH" != xBASH; then
22546        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22547$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22548      fi
22549      # Try to locate tool using the code snippet
22550      for ac_prog in gpatch patch
22551do
22552  # Extract the first word of "$ac_prog", so it can be a program name with args.
22553set dummy $ac_prog; ac_word=$2
22554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22555$as_echo_n "checking for $ac_word... " >&6; }
22556if ${ac_cv_path_PATCH+:} false; then :
22557  $as_echo_n "(cached) " >&6
22558else
22559  case $PATCH in
22560  [\\/]* | ?:[\\/]*)
22561  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22562  ;;
22563  *)
22564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22565for as_dir in $PATH
22566do
22567  IFS=$as_save_IFS
22568  test -z "$as_dir" && as_dir=.
22569    for ac_exec_ext in '' $ac_executable_extensions; do
22570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22571    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22573    break 2
22574  fi
22575done
22576  done
22577IFS=$as_save_IFS
22578
22579  ;;
22580esac
22581fi
22582PATCH=$ac_cv_path_PATCH
22583if test -n "$PATCH"; then
22584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22585$as_echo "$PATCH" >&6; }
22586else
22587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22588$as_echo "no" >&6; }
22589fi
22590
22591
22592  test -n "$PATCH" && break
22593done
22594
22595    else
22596      # If it succeeded, then it was overridden by the user. We will use it
22597      # for the tool.
22598
22599      # First remove it from the list of overridden variables, so we can test
22600      # for unknown variables in the end.
22601      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22602
22603      # Check if we try to supply an empty value
22604      if test "x$PATCH" = x; then
22605        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22606$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22608$as_echo_n "checking for PATCH... " >&6; }
22609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22610$as_echo "disabled" >&6; }
22611      else
22612        # Check if the provided tool contains a complete path.
22613        tool_specified="$PATCH"
22614        tool_basename="${tool_specified##*/}"
22615        if test "x$tool_basename" = "x$tool_specified"; then
22616          # A command without a complete path is provided, search $PATH.
22617          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22618$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22619          # Extract the first word of "$tool_basename", so it can be a program name with args.
22620set dummy $tool_basename; ac_word=$2
22621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22622$as_echo_n "checking for $ac_word... " >&6; }
22623if ${ac_cv_path_PATCH+:} false; then :
22624  $as_echo_n "(cached) " >&6
22625else
22626  case $PATCH in
22627  [\\/]* | ?:[\\/]*)
22628  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22629  ;;
22630  *)
22631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22632for as_dir in $PATH
22633do
22634  IFS=$as_save_IFS
22635  test -z "$as_dir" && as_dir=.
22636    for ac_exec_ext in '' $ac_executable_extensions; do
22637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22638    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22640    break 2
22641  fi
22642done
22643  done
22644IFS=$as_save_IFS
22645
22646  ;;
22647esac
22648fi
22649PATCH=$ac_cv_path_PATCH
22650if test -n "$PATCH"; then
22651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22652$as_echo "$PATCH" >&6; }
22653else
22654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22655$as_echo "no" >&6; }
22656fi
22657
22658
22659          if test "x$PATCH" = x; then
22660            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22661          fi
22662        else
22663          # Otherwise we believe it is a complete path. Use it as it is.
22664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22665$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22666          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22667$as_echo_n "checking for PATCH... " >&6; }
22668          if test ! -x "$tool_specified"; then
22669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22670$as_echo "not found" >&6; }
22671            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22672          fi
22673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22674$as_echo "$tool_specified" >&6; }
22675        fi
22676      fi
22677    fi
22678
22679  fi
22680
22681
22682  # Check if it's GNU time
22683  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22684  if test "x$IS_GNU_TIME" != x; then
22685    IS_GNU_TIME=yes
22686  else
22687    IS_GNU_TIME=no
22688  fi
22689
22690
22691  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22692
22693
22694
22695  # Publish this variable in the help.
22696
22697
22698  if [ -z "${DSYMUTIL+x}" ]; then
22699    # The variable is not set by user, try to locate tool using the code snippet
22700    for ac_prog in dsymutil
22701do
22702  # Extract the first word of "$ac_prog", so it can be a program name with args.
22703set dummy $ac_prog; ac_word=$2
22704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22705$as_echo_n "checking for $ac_word... " >&6; }
22706if ${ac_cv_path_DSYMUTIL+:} false; then :
22707  $as_echo_n "(cached) " >&6
22708else
22709  case $DSYMUTIL in
22710  [\\/]* | ?:[\\/]*)
22711  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22712  ;;
22713  *)
22714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22715for as_dir in $PATH
22716do
22717  IFS=$as_save_IFS
22718  test -z "$as_dir" && as_dir=.
22719    for ac_exec_ext in '' $ac_executable_extensions; do
22720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22721    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22723    break 2
22724  fi
22725done
22726  done
22727IFS=$as_save_IFS
22728
22729  ;;
22730esac
22731fi
22732DSYMUTIL=$ac_cv_path_DSYMUTIL
22733if test -n "$DSYMUTIL"; then
22734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22735$as_echo "$DSYMUTIL" >&6; }
22736else
22737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22738$as_echo "no" >&6; }
22739fi
22740
22741
22742  test -n "$DSYMUTIL" && break
22743done
22744
22745  else
22746    # The variable is set, but is it from the command line or the environment?
22747
22748    # Try to remove the string !DSYMUTIL! from our list.
22749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22751      # If it failed, the variable was not from the command line. Ignore it,
22752      # but warn the user (except for BASH, which is always set by the calling BASH).
22753      if test "xDSYMUTIL" != xBASH; then
22754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22755$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22756      fi
22757      # Try to locate tool using the code snippet
22758      for ac_prog in dsymutil
22759do
22760  # Extract the first word of "$ac_prog", so it can be a program name with args.
22761set dummy $ac_prog; ac_word=$2
22762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22763$as_echo_n "checking for $ac_word... " >&6; }
22764if ${ac_cv_path_DSYMUTIL+:} false; then :
22765  $as_echo_n "(cached) " >&6
22766else
22767  case $DSYMUTIL in
22768  [\\/]* | ?:[\\/]*)
22769  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22770  ;;
22771  *)
22772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22773for as_dir in $PATH
22774do
22775  IFS=$as_save_IFS
22776  test -z "$as_dir" && as_dir=.
22777    for ac_exec_ext in '' $ac_executable_extensions; do
22778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22779    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22781    break 2
22782  fi
22783done
22784  done
22785IFS=$as_save_IFS
22786
22787  ;;
22788esac
22789fi
22790DSYMUTIL=$ac_cv_path_DSYMUTIL
22791if test -n "$DSYMUTIL"; then
22792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22793$as_echo "$DSYMUTIL" >&6; }
22794else
22795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22796$as_echo "no" >&6; }
22797fi
22798
22799
22800  test -n "$DSYMUTIL" && break
22801done
22802
22803    else
22804      # If it succeeded, then it was overridden by the user. We will use it
22805      # for the tool.
22806
22807      # First remove it from the list of overridden variables, so we can test
22808      # for unknown variables in the end.
22809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22810
22811      # Check if we try to supply an empty value
22812      if test "x$DSYMUTIL" = x; then
22813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22814$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22816$as_echo_n "checking for DSYMUTIL... " >&6; }
22817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22818$as_echo "disabled" >&6; }
22819      else
22820        # Check if the provided tool contains a complete path.
22821        tool_specified="$DSYMUTIL"
22822        tool_basename="${tool_specified##*/}"
22823        if test "x$tool_basename" = "x$tool_specified"; then
22824          # A command without a complete path is provided, search $PATH.
22825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22826$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22827          # Extract the first word of "$tool_basename", so it can be a program name with args.
22828set dummy $tool_basename; ac_word=$2
22829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22830$as_echo_n "checking for $ac_word... " >&6; }
22831if ${ac_cv_path_DSYMUTIL+:} false; then :
22832  $as_echo_n "(cached) " >&6
22833else
22834  case $DSYMUTIL in
22835  [\\/]* | ?:[\\/]*)
22836  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22837  ;;
22838  *)
22839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22840for as_dir in $PATH
22841do
22842  IFS=$as_save_IFS
22843  test -z "$as_dir" && as_dir=.
22844    for ac_exec_ext in '' $ac_executable_extensions; do
22845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22846    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22848    break 2
22849  fi
22850done
22851  done
22852IFS=$as_save_IFS
22853
22854  ;;
22855esac
22856fi
22857DSYMUTIL=$ac_cv_path_DSYMUTIL
22858if test -n "$DSYMUTIL"; then
22859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22860$as_echo "$DSYMUTIL" >&6; }
22861else
22862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22863$as_echo "no" >&6; }
22864fi
22865
22866
22867          if test "x$DSYMUTIL" = x; then
22868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22869          fi
22870        else
22871          # Otherwise we believe it is a complete path. Use it as it is.
22872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22873$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22875$as_echo_n "checking for DSYMUTIL... " >&6; }
22876          if test ! -x "$tool_specified"; then
22877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22878$as_echo "not found" >&6; }
22879            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22880          fi
22881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22882$as_echo "$tool_specified" >&6; }
22883        fi
22884      fi
22885    fi
22886
22887  fi
22888
22889
22890
22891  if test "x$DSYMUTIL" = x; then
22892    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22893  fi
22894
22895
22896
22897
22898
22899  # Publish this variable in the help.
22900
22901
22902  if [ -z "${XATTR+x}" ]; then
22903    # The variable is not set by user, try to locate tool using the code snippet
22904    for ac_prog in xattr
22905do
22906  # Extract the first word of "$ac_prog", so it can be a program name with args.
22907set dummy $ac_prog; ac_word=$2
22908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22909$as_echo_n "checking for $ac_word... " >&6; }
22910if ${ac_cv_path_XATTR+:} false; then :
22911  $as_echo_n "(cached) " >&6
22912else
22913  case $XATTR in
22914  [\\/]* | ?:[\\/]*)
22915  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22916  ;;
22917  *)
22918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22919for as_dir in $PATH
22920do
22921  IFS=$as_save_IFS
22922  test -z "$as_dir" && as_dir=.
22923    for ac_exec_ext in '' $ac_executable_extensions; do
22924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22925    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22927    break 2
22928  fi
22929done
22930  done
22931IFS=$as_save_IFS
22932
22933  ;;
22934esac
22935fi
22936XATTR=$ac_cv_path_XATTR
22937if test -n "$XATTR"; then
22938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22939$as_echo "$XATTR" >&6; }
22940else
22941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22942$as_echo "no" >&6; }
22943fi
22944
22945
22946  test -n "$XATTR" && break
22947done
22948
22949  else
22950    # The variable is set, but is it from the command line or the environment?
22951
22952    # Try to remove the string !XATTR! from our list.
22953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22955      # If it failed, the variable was not from the command line. Ignore it,
22956      # but warn the user (except for BASH, which is always set by the calling BASH).
22957      if test "xXATTR" != xBASH; then
22958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22959$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22960      fi
22961      # Try to locate tool using the code snippet
22962      for ac_prog in xattr
22963do
22964  # Extract the first word of "$ac_prog", so it can be a program name with args.
22965set dummy $ac_prog; ac_word=$2
22966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22967$as_echo_n "checking for $ac_word... " >&6; }
22968if ${ac_cv_path_XATTR+:} false; then :
22969  $as_echo_n "(cached) " >&6
22970else
22971  case $XATTR in
22972  [\\/]* | ?:[\\/]*)
22973  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22974  ;;
22975  *)
22976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22977for as_dir in $PATH
22978do
22979  IFS=$as_save_IFS
22980  test -z "$as_dir" && as_dir=.
22981    for ac_exec_ext in '' $ac_executable_extensions; do
22982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22983    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22985    break 2
22986  fi
22987done
22988  done
22989IFS=$as_save_IFS
22990
22991  ;;
22992esac
22993fi
22994XATTR=$ac_cv_path_XATTR
22995if test -n "$XATTR"; then
22996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22997$as_echo "$XATTR" >&6; }
22998else
22999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23000$as_echo "no" >&6; }
23001fi
23002
23003
23004  test -n "$XATTR" && break
23005done
23006
23007    else
23008      # If it succeeded, then it was overridden by the user. We will use it
23009      # for the tool.
23010
23011      # First remove it from the list of overridden variables, so we can test
23012      # for unknown variables in the end.
23013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23014
23015      # Check if we try to supply an empty value
23016      if test "x$XATTR" = x; then
23017        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23018$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23020$as_echo_n "checking for XATTR... " >&6; }
23021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23022$as_echo "disabled" >&6; }
23023      else
23024        # Check if the provided tool contains a complete path.
23025        tool_specified="$XATTR"
23026        tool_basename="${tool_specified##*/}"
23027        if test "x$tool_basename" = "x$tool_specified"; then
23028          # A command without a complete path is provided, search $PATH.
23029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23030$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23031          # Extract the first word of "$tool_basename", so it can be a program name with args.
23032set dummy $tool_basename; ac_word=$2
23033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23034$as_echo_n "checking for $ac_word... " >&6; }
23035if ${ac_cv_path_XATTR+:} false; then :
23036  $as_echo_n "(cached) " >&6
23037else
23038  case $XATTR in
23039  [\\/]* | ?:[\\/]*)
23040  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23041  ;;
23042  *)
23043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23044for as_dir in $PATH
23045do
23046  IFS=$as_save_IFS
23047  test -z "$as_dir" && as_dir=.
23048    for ac_exec_ext in '' $ac_executable_extensions; do
23049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23050    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23052    break 2
23053  fi
23054done
23055  done
23056IFS=$as_save_IFS
23057
23058  ;;
23059esac
23060fi
23061XATTR=$ac_cv_path_XATTR
23062if test -n "$XATTR"; then
23063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23064$as_echo "$XATTR" >&6; }
23065else
23066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23067$as_echo "no" >&6; }
23068fi
23069
23070
23071          if test "x$XATTR" = x; then
23072            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23073          fi
23074        else
23075          # Otherwise we believe it is a complete path. Use it as it is.
23076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23077$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23078          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23079$as_echo_n "checking for XATTR... " >&6; }
23080          if test ! -x "$tool_specified"; then
23081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23082$as_echo "not found" >&6; }
23083            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23084          fi
23085          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23086$as_echo "$tool_specified" >&6; }
23087        fi
23088      fi
23089    fi
23090
23091  fi
23092
23093
23094
23095  if test "x$XATTR" = x; then
23096    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23097  fi
23098
23099
23100
23101
23102  # Publish this variable in the help.
23103
23104
23105  if [ -z "${CODESIGN+x}" ]; then
23106    # The variable is not set by user, try to locate tool using the code snippet
23107    for ac_prog in codesign
23108do
23109  # Extract the first word of "$ac_prog", so it can be a program name with args.
23110set dummy $ac_prog; ac_word=$2
23111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23112$as_echo_n "checking for $ac_word... " >&6; }
23113if ${ac_cv_path_CODESIGN+:} false; then :
23114  $as_echo_n "(cached) " >&6
23115else
23116  case $CODESIGN in
23117  [\\/]* | ?:[\\/]*)
23118  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23119  ;;
23120  *)
23121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23122for as_dir in $PATH
23123do
23124  IFS=$as_save_IFS
23125  test -z "$as_dir" && as_dir=.
23126    for ac_exec_ext in '' $ac_executable_extensions; do
23127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23128    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23130    break 2
23131  fi
23132done
23133  done
23134IFS=$as_save_IFS
23135
23136  ;;
23137esac
23138fi
23139CODESIGN=$ac_cv_path_CODESIGN
23140if test -n "$CODESIGN"; then
23141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23142$as_echo "$CODESIGN" >&6; }
23143else
23144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23145$as_echo "no" >&6; }
23146fi
23147
23148
23149  test -n "$CODESIGN" && break
23150done
23151
23152  else
23153    # The variable is set, but is it from the command line or the environment?
23154
23155    # Try to remove the string !CODESIGN! from our list.
23156    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23157    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23158      # If it failed, the variable was not from the command line. Ignore it,
23159      # but warn the user (except for BASH, which is always set by the calling BASH).
23160      if test "xCODESIGN" != xBASH; then
23161        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23162$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23163      fi
23164      # Try to locate tool using the code snippet
23165      for ac_prog in codesign
23166do
23167  # Extract the first word of "$ac_prog", so it can be a program name with args.
23168set dummy $ac_prog; ac_word=$2
23169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23170$as_echo_n "checking for $ac_word... " >&6; }
23171if ${ac_cv_path_CODESIGN+:} false; then :
23172  $as_echo_n "(cached) " >&6
23173else
23174  case $CODESIGN in
23175  [\\/]* | ?:[\\/]*)
23176  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23177  ;;
23178  *)
23179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23180for as_dir in $PATH
23181do
23182  IFS=$as_save_IFS
23183  test -z "$as_dir" && as_dir=.
23184    for ac_exec_ext in '' $ac_executable_extensions; do
23185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23186    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23188    break 2
23189  fi
23190done
23191  done
23192IFS=$as_save_IFS
23193
23194  ;;
23195esac
23196fi
23197CODESIGN=$ac_cv_path_CODESIGN
23198if test -n "$CODESIGN"; then
23199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23200$as_echo "$CODESIGN" >&6; }
23201else
23202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23203$as_echo "no" >&6; }
23204fi
23205
23206
23207  test -n "$CODESIGN" && break
23208done
23209
23210    else
23211      # If it succeeded, then it was overridden by the user. We will use it
23212      # for the tool.
23213
23214      # First remove it from the list of overridden variables, so we can test
23215      # for unknown variables in the end.
23216      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23217
23218      # Check if we try to supply an empty value
23219      if test "x$CODESIGN" = x; then
23220        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23221$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23222        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23223$as_echo_n "checking for CODESIGN... " >&6; }
23224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23225$as_echo "disabled" >&6; }
23226      else
23227        # Check if the provided tool contains a complete path.
23228        tool_specified="$CODESIGN"
23229        tool_basename="${tool_specified##*/}"
23230        if test "x$tool_basename" = "x$tool_specified"; then
23231          # A command without a complete path is provided, search $PATH.
23232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23233$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23234          # Extract the first word of "$tool_basename", so it can be a program name with args.
23235set dummy $tool_basename; ac_word=$2
23236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23237$as_echo_n "checking for $ac_word... " >&6; }
23238if ${ac_cv_path_CODESIGN+:} false; then :
23239  $as_echo_n "(cached) " >&6
23240else
23241  case $CODESIGN in
23242  [\\/]* | ?:[\\/]*)
23243  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23244  ;;
23245  *)
23246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23247for as_dir in $PATH
23248do
23249  IFS=$as_save_IFS
23250  test -z "$as_dir" && as_dir=.
23251    for ac_exec_ext in '' $ac_executable_extensions; do
23252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23253    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23255    break 2
23256  fi
23257done
23258  done
23259IFS=$as_save_IFS
23260
23261  ;;
23262esac
23263fi
23264CODESIGN=$ac_cv_path_CODESIGN
23265if test -n "$CODESIGN"; then
23266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23267$as_echo "$CODESIGN" >&6; }
23268else
23269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23270$as_echo "no" >&6; }
23271fi
23272
23273
23274          if test "x$CODESIGN" = x; then
23275            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23276          fi
23277        else
23278          # Otherwise we believe it is a complete path. Use it as it is.
23279          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23280$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23281          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23282$as_echo_n "checking for CODESIGN... " >&6; }
23283          if test ! -x "$tool_specified"; then
23284            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23285$as_echo "not found" >&6; }
23286            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23287          fi
23288          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23289$as_echo "$tool_specified" >&6; }
23290        fi
23291      fi
23292    fi
23293
23294  fi
23295
23296
23297    if test "x$CODESIGN" != "x"; then
23298      # Verify that the openjdk_codesign certificate is present
23299      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23300$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23301      rm -f codesign-testfile
23302      touch codesign-testfile
23303      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23304      rm -f codesign-testfile
23305      if test "x$CODESIGN" = x; then
23306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23307$as_echo "no" >&6; }
23308      else
23309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23310$as_echo "yes" >&6; }
23311      fi
23312    fi
23313
23314
23315
23316  # Publish this variable in the help.
23317
23318
23319  if [ -z "${SETFILE+x}" ]; then
23320    # The variable is not set by user, try to locate tool using the code snippet
23321    for ac_prog in SetFile
23322do
23323  # Extract the first word of "$ac_prog", so it can be a program name with args.
23324set dummy $ac_prog; ac_word=$2
23325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23326$as_echo_n "checking for $ac_word... " >&6; }
23327if ${ac_cv_path_SETFILE+:} false; then :
23328  $as_echo_n "(cached) " >&6
23329else
23330  case $SETFILE in
23331  [\\/]* | ?:[\\/]*)
23332  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23333  ;;
23334  *)
23335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23336for as_dir in $PATH
23337do
23338  IFS=$as_save_IFS
23339  test -z "$as_dir" && as_dir=.
23340    for ac_exec_ext in '' $ac_executable_extensions; do
23341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23342    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23344    break 2
23345  fi
23346done
23347  done
23348IFS=$as_save_IFS
23349
23350  ;;
23351esac
23352fi
23353SETFILE=$ac_cv_path_SETFILE
23354if test -n "$SETFILE"; then
23355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23356$as_echo "$SETFILE" >&6; }
23357else
23358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23359$as_echo "no" >&6; }
23360fi
23361
23362
23363  test -n "$SETFILE" && break
23364done
23365
23366  else
23367    # The variable is set, but is it from the command line or the environment?
23368
23369    # Try to remove the string !SETFILE! from our list.
23370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23372      # If it failed, the variable was not from the command line. Ignore it,
23373      # but warn the user (except for BASH, which is always set by the calling BASH).
23374      if test "xSETFILE" != xBASH; then
23375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23376$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23377      fi
23378      # Try to locate tool using the code snippet
23379      for ac_prog in SetFile
23380do
23381  # Extract the first word of "$ac_prog", so it can be a program name with args.
23382set dummy $ac_prog; ac_word=$2
23383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23384$as_echo_n "checking for $ac_word... " >&6; }
23385if ${ac_cv_path_SETFILE+:} false; then :
23386  $as_echo_n "(cached) " >&6
23387else
23388  case $SETFILE in
23389  [\\/]* | ?:[\\/]*)
23390  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23391  ;;
23392  *)
23393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23394for as_dir in $PATH
23395do
23396  IFS=$as_save_IFS
23397  test -z "$as_dir" && as_dir=.
23398    for ac_exec_ext in '' $ac_executable_extensions; do
23399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23400    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23402    break 2
23403  fi
23404done
23405  done
23406IFS=$as_save_IFS
23407
23408  ;;
23409esac
23410fi
23411SETFILE=$ac_cv_path_SETFILE
23412if test -n "$SETFILE"; then
23413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23414$as_echo "$SETFILE" >&6; }
23415else
23416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23417$as_echo "no" >&6; }
23418fi
23419
23420
23421  test -n "$SETFILE" && break
23422done
23423
23424    else
23425      # If it succeeded, then it was overridden by the user. We will use it
23426      # for the tool.
23427
23428      # First remove it from the list of overridden variables, so we can test
23429      # for unknown variables in the end.
23430      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23431
23432      # Check if we try to supply an empty value
23433      if test "x$SETFILE" = x; then
23434        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23435$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23436        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23437$as_echo_n "checking for SETFILE... " >&6; }
23438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23439$as_echo "disabled" >&6; }
23440      else
23441        # Check if the provided tool contains a complete path.
23442        tool_specified="$SETFILE"
23443        tool_basename="${tool_specified##*/}"
23444        if test "x$tool_basename" = "x$tool_specified"; then
23445          # A command without a complete path is provided, search $PATH.
23446          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23447$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23448          # Extract the first word of "$tool_basename", so it can be a program name with args.
23449set dummy $tool_basename; ac_word=$2
23450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23451$as_echo_n "checking for $ac_word... " >&6; }
23452if ${ac_cv_path_SETFILE+:} false; then :
23453  $as_echo_n "(cached) " >&6
23454else
23455  case $SETFILE in
23456  [\\/]* | ?:[\\/]*)
23457  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23458  ;;
23459  *)
23460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23461for as_dir in $PATH
23462do
23463  IFS=$as_save_IFS
23464  test -z "$as_dir" && as_dir=.
23465    for ac_exec_ext in '' $ac_executable_extensions; do
23466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23467    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23469    break 2
23470  fi
23471done
23472  done
23473IFS=$as_save_IFS
23474
23475  ;;
23476esac
23477fi
23478SETFILE=$ac_cv_path_SETFILE
23479if test -n "$SETFILE"; then
23480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23481$as_echo "$SETFILE" >&6; }
23482else
23483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23484$as_echo "no" >&6; }
23485fi
23486
23487
23488          if test "x$SETFILE" = x; then
23489            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23490          fi
23491        else
23492          # Otherwise we believe it is a complete path. Use it as it is.
23493          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23494$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23495          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23496$as_echo_n "checking for SETFILE... " >&6; }
23497          if test ! -x "$tool_specified"; then
23498            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23499$as_echo "not found" >&6; }
23500            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23501          fi
23502          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23503$as_echo "$tool_specified" >&6; }
23504        fi
23505      fi
23506    fi
23507
23508  fi
23509
23510
23511
23512  if test "x$SETFILE" = x; then
23513    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23514  fi
23515
23516
23517  fi
23518
23519
23520  # Test if bash supports pipefail.
23521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23522$as_echo_n "checking if bash supports pipefail... " >&6; }
23523  if ${BASH} -c 'set -o pipefail'; then
23524    BASH_ARGS="$BASH_ARGS -o pipefail"
23525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23526$as_echo "yes" >&6; }
23527  else
23528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23529$as_echo "no" >&6; }
23530  fi
23531
23532  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23533$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23534  if ${BASH} -e -c 'true'; then
23535    BASH_ARGS="$BASH_ARGS -e"
23536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23537$as_echo "yes" >&6; }
23538  else
23539    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23540$as_echo "no" >&6; }
23541  fi
23542
23543
23544
23545
23546# Check if pkg-config is available.
23547
23548
23549if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23550	if test -n "$ac_tool_prefix"; then
23551  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23552set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23554$as_echo_n "checking for $ac_word... " >&6; }
23555if ${ac_cv_path_PKG_CONFIG+:} false; then :
23556  $as_echo_n "(cached) " >&6
23557else
23558  case $PKG_CONFIG in
23559  [\\/]* | ?:[\\/]*)
23560  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23561  ;;
23562  *)
23563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23564for as_dir in $PATH
23565do
23566  IFS=$as_save_IFS
23567  test -z "$as_dir" && as_dir=.
23568    for ac_exec_ext in '' $ac_executable_extensions; do
23569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23570    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23572    break 2
23573  fi
23574done
23575  done
23576IFS=$as_save_IFS
23577
23578  ;;
23579esac
23580fi
23581PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23582if test -n "$PKG_CONFIG"; then
23583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23584$as_echo "$PKG_CONFIG" >&6; }
23585else
23586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23587$as_echo "no" >&6; }
23588fi
23589
23590
23591fi
23592if test -z "$ac_cv_path_PKG_CONFIG"; then
23593  ac_pt_PKG_CONFIG=$PKG_CONFIG
23594  # Extract the first word of "pkg-config", so it can be a program name with args.
23595set dummy pkg-config; ac_word=$2
23596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23597$as_echo_n "checking for $ac_word... " >&6; }
23598if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23599  $as_echo_n "(cached) " >&6
23600else
23601  case $ac_pt_PKG_CONFIG in
23602  [\\/]* | ?:[\\/]*)
23603  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23604  ;;
23605  *)
23606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23607for as_dir in $PATH
23608do
23609  IFS=$as_save_IFS
23610  test -z "$as_dir" && as_dir=.
23611    for ac_exec_ext in '' $ac_executable_extensions; do
23612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23613    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23615    break 2
23616  fi
23617done
23618  done
23619IFS=$as_save_IFS
23620
23621  ;;
23622esac
23623fi
23624ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23625if test -n "$ac_pt_PKG_CONFIG"; then
23626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23627$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23628else
23629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23630$as_echo "no" >&6; }
23631fi
23632
23633  if test "x$ac_pt_PKG_CONFIG" = x; then
23634    PKG_CONFIG=""
23635  else
23636    case $cross_compiling:$ac_tool_warned in
23637yes:)
23638{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23639$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23640ac_tool_warned=yes ;;
23641esac
23642    PKG_CONFIG=$ac_pt_PKG_CONFIG
23643  fi
23644else
23645  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23646fi
23647
23648fi
23649if test -n "$PKG_CONFIG"; then
23650	_pkg_min_version=0.9.0
23651	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23652$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23653	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23654		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23655$as_echo "yes" >&6; }
23656	else
23657		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23658$as_echo "no" >&6; }
23659		PKG_CONFIG=""
23660	fi
23661
23662fi
23663
23664# After basic tools have been setup, we can check build os specific details.
23665
23666  ###############################################################################
23667
23668  # Note that this is the build platform OS version!
23669
23670  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23671  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23672  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23673  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23674
23675
23676
23677
23678
23679# Misc basic settings
23680
23681
23682# Check whether --with-default-make-target was given.
23683if test "${with_default_make_target+set}" = set; then :
23684  withval=$with_default_make_target;
23685fi
23686
23687  if test "x$with_default_make_target" = "x" \
23688      || test "x$with_default_make_target" = "xyes"; then
23689    DEFAULT_MAKE_TARGET="exploded-image"
23690  elif test "x$with_default_make_target" = "xno"; then
23691    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23692  else
23693    DEFAULT_MAKE_TARGET="$with_default_make_target"
23694  fi
23695
23696
23697
23698
23699###############################################################################
23700#
23701# Determine OpenJDK variants, options and version numbers.
23702#
23703###############################################################################
23704
23705# We need build & target for this.
23706
23707  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23708  # We always build headless support.
23709  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23710$as_echo_n "checking headful support... " >&6; }
23711  # Check whether --enable-headful was given.
23712if test "${enable_headful+set}" = set; then :
23713  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23714else
23715  SUPPORT_HEADFUL=yes
23716fi
23717
23718
23719  SUPPORT_HEADLESS=yes
23720  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23721
23722  if test "x$SUPPORT_HEADFUL" = xyes; then
23723    # We are building both headful and headless.
23724    headful_msg="include support for both headful and headless"
23725  fi
23726
23727  if test "x$SUPPORT_HEADFUL" = xno; then
23728    # Thus we are building headless only.
23729    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23730    headful_msg="headless only"
23731  fi
23732
23733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23734$as_echo "$headful_msg" >&6; }
23735
23736
23737
23738
23739
23740  # Choose cacerts source file
23741
23742# Check whether --with-cacerts-file was given.
23743if test "${with_cacerts_file+set}" = set; then :
23744  withval=$with_cacerts_file;
23745fi
23746
23747  if test "x$with_cacerts_file" != x; then
23748    CACERTS_FILE=$with_cacerts_file
23749  fi
23750
23751
23752  # Enable or disable unlimited crypto
23753  # Check whether --enable-unlimited-crypto was given.
23754if test "${enable_unlimited_crypto+set}" = set; then :
23755  enableval=$enable_unlimited_crypto;
23756else
23757  enable_unlimited_crypto=no
23758fi
23759
23760  if test "x$enable_unlimited_crypto" = "xyes"; then
23761    UNLIMITED_CRYPTO=true
23762  else
23763    UNLIMITED_CRYPTO=false
23764  fi
23765
23766
23767  # Should we build the serviceability agent (SA)?
23768  INCLUDE_SA=true
23769  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
23770    INCLUDE_SA=false
23771  fi
23772  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23773    INCLUDE_SA=false
23774  fi
23775
23776
23777  # Compress jars
23778  COMPRESS_JARS=false
23779
23780
23781
23782  # Setup default copyright year. Mostly overridden when building close to a new year.
23783
23784# Check whether --with-copyright-year was given.
23785if test "${with_copyright_year+set}" = set; then :
23786  withval=$with_copyright_year;
23787fi
23788
23789  if test "x$with_copyright_year" = xyes; then
23790    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23791  elif test "x$with_copyright_year" != x; then
23792    COPYRIGHT_YEAR="$with_copyright_year"
23793  else
23794    COPYRIGHT_YEAR=`date +'%Y'`
23795  fi
23796
23797
23798
23799  # Check whether --enable-keep-packaged-modules was given.
23800if test "${enable_keep_packaged_modules+set}" = set; then :
23801  enableval=$enable_keep_packaged_modules;
23802fi
23803
23804
23805  if test "x$enable_keep_packaged_modules" = "xyes"; then
23806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23807$as_echo_n "checking if packaged modules are kept... " >&6; }
23808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23809$as_echo "yes" >&6; }
23810    JLINK_KEEP_PACKAGED_MODULES=true
23811  elif test "x$enable_keep_packaged_modules" = "xno"; then
23812    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23813$as_echo_n "checking if packaged modules are kept... " >&6; }
23814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23815$as_echo "no" >&6; }
23816    JLINK_KEEP_PACKAGED_MODULES=false
23817  elif test "x$enable_keep_packaged_modules" = "x"; then
23818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23819$as_echo "yes (default)" >&6; }
23820    JLINK_KEEP_PACKAGED_MODULES=true
23821  else
23822    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23823  fi
23824
23825
23826
23827
23828  # Warn user that old version arguments are deprecated.
23829
23830
23831# Check whether --with-milestone was given.
23832if test "${with_milestone+set}" = set; then :
23833  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23834$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23835fi
23836
23837
23838
23839
23840# Check whether --with-update-version was given.
23841if test "${with_update_version+set}" = set; then :
23842  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23843$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23844fi
23845
23846
23847
23848
23849# Check whether --with-user-release-suffix was given.
23850if test "${with_user_release_suffix+set}" = set; then :
23851  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
23852$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23853fi
23854
23855
23856
23857
23858# Check whether --with-build-number was given.
23859if test "${with_build_number+set}" = set; then :
23860  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23861$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23862fi
23863
23864
23865
23866  # Source the version numbers file
23867  . $AUTOCONF_DIR/version-numbers
23868
23869  # Some non-version number information is set in that file
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879  # Override version from arguments
23880
23881  # If --with-version-string is set, process it first. It is possible to
23882  # override parts with more specific flags, since these are processed later.
23883
23884# Check whether --with-version-string was given.
23885if test "${with_version_string+set}" = set; then :
23886  withval=$with_version_string;
23887fi
23888
23889  if test "x$with_version_string" = xyes; then
23890    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23891  elif test "x$with_version_string" != x; then
23892    # Additional [] needed to keep m4 from mangling shell constructs.
23893    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23894      VERSION_MAJOR=${BASH_REMATCH[1]}
23895      VERSION_MINOR=${BASH_REMATCH[3]}
23896      VERSION_SECURITY=${BASH_REMATCH[5]}
23897      VERSION_PATCH=${BASH_REMATCH[7]}
23898      VERSION_PRE=${BASH_REMATCH[9]}
23899      version_plus_separator=${BASH_REMATCH[11]}
23900      VERSION_BUILD=${BASH_REMATCH[12]}
23901      VERSION_OPT=${BASH_REMATCH[14]}
23902      # Unspecified numerical fields are interpreted as 0.
23903      if test "x$VERSION_MINOR" = x; then
23904        VERSION_MINOR=0
23905      fi
23906      if test "x$VERSION_SECURITY" = x; then
23907        VERSION_SECURITY=0
23908      fi
23909      if test "x$VERSION_PATCH" = x; then
23910        VERSION_PATCH=0
23911      fi
23912      if test "x$version_plus_separator" != x \
23913          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23914        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23915      fi
23916      # Stop the version part process from setting default values.
23917      # We still allow them to explicitely override though.
23918      NO_DEFAULT_VERSION_PARTS=true
23919    else
23920      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23921    fi
23922  fi
23923
23924
23925# Check whether --with-version-pre was given.
23926if test "${with_version_pre+set}" = set; then :
23927  withval=$with_version_pre; with_version_pre_present=true
23928else
23929  with_version_pre_present=false
23930fi
23931
23932
23933  if test "x$with_version_pre_present" = xtrue; then
23934    if test "x$with_version_pre" = xyes; then
23935      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23936    elif test "x$with_version_pre" = xno; then
23937      # Interpret --without-* as empty string instead of the literal "no"
23938      VERSION_PRE=
23939    else
23940      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23941       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23942      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23944$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23945      fi
23946    fi
23947  else
23948    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23949      # Default is to use "internal" as pre
23950      VERSION_PRE="internal"
23951    fi
23952  fi
23953
23954
23955# Check whether --with-version-opt was given.
23956if test "${with_version_opt+set}" = set; then :
23957  withval=$with_version_opt; with_version_opt_present=true
23958else
23959  with_version_opt_present=false
23960fi
23961
23962
23963  if test "x$with_version_opt_present" = xtrue; then
23964    if test "x$with_version_opt" = xyes; then
23965      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23966    elif test "x$with_version_opt" = xno; then
23967      # Interpret --without-* as empty string instead of the literal "no"
23968      VERSION_OPT=
23969    else
23970      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23971       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23972      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23973        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23974$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23975      fi
23976    fi
23977  else
23978    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23979      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23980      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23981      # Outer [ ] to quote m4.
23982       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23983      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23984    fi
23985  fi
23986
23987
23988# Check whether --with-version-build was given.
23989if test "${with_version_build+set}" = set; then :
23990  withval=$with_version_build; with_version_build_present=true
23991else
23992  with_version_build_present=false
23993fi
23994
23995
23996  if test "x$with_version_build_present" = xtrue; then
23997    if test "x$with_version_build" = xyes; then
23998      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23999    elif test "x$with_version_build" = xno; then
24000      # Interpret --without-* as empty string instead of the literal "no"
24001      VERSION_BUILD=
24002    elif test "x$with_version_build" = x; then
24003      VERSION_BUILD=
24004    else
24005
24006  # Additional [] needed to keep m4 from mangling shell constructs.
24007  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24008    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24009  fi
24010  # Extract the version number without leading zeros.
24011  cleaned_value=${BASH_REMATCH[1]}
24012  if test "x$cleaned_value" = x; then
24013    # Special case for zero
24014    cleaned_value=${BASH_REMATCH[2]}
24015  fi
24016
24017  if test $cleaned_value -gt 255; then
24018    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24019  fi
24020  if test "x$cleaned_value" != "x$with_version_build"; then
24021    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24022$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24023  fi
24024  VERSION_BUILD=$cleaned_value
24025
24026    fi
24027  else
24028    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24029      # Default is to not have a build number.
24030      VERSION_BUILD=""
24031      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24032      VERSION_BUILD=0
24033    fi
24034  fi
24035
24036
24037# Check whether --with-version-major was given.
24038if test "${with_version_major+set}" = set; then :
24039  withval=$with_version_major; with_version_major_present=true
24040else
24041  with_version_major_present=false
24042fi
24043
24044
24045  if test "x$with_version_major_present" = xtrue; then
24046    if test "x$with_version_major" = xyes; then
24047      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24048    else
24049
24050  # Additional [] needed to keep m4 from mangling shell constructs.
24051  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24052    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24053  fi
24054  # Extract the version number without leading zeros.
24055  cleaned_value=${BASH_REMATCH[1]}
24056  if test "x$cleaned_value" = x; then
24057    # Special case for zero
24058    cleaned_value=${BASH_REMATCH[2]}
24059  fi
24060
24061  if test $cleaned_value -gt 255; then
24062    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24063  fi
24064  if test "x$cleaned_value" != "x$with_version_major"; then
24065    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24066$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24067  fi
24068  VERSION_MAJOR=$cleaned_value
24069
24070    fi
24071  else
24072    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24073      # Default is to get value from version-numbers
24074      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24075    fi
24076  fi
24077
24078
24079# Check whether --with-version-minor was given.
24080if test "${with_version_minor+set}" = set; then :
24081  withval=$with_version_minor; with_version_minor_present=true
24082else
24083  with_version_minor_present=false
24084fi
24085
24086
24087  if test "x$with_version_minor_present" = xtrue; then
24088    if test "x$with_version_minor" = xyes; then
24089      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24090    elif test "x$with_version_minor" = xno; then
24091      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24092      VERSION_MINOR=0
24093    elif test "x$with_version_minor" = x; then
24094      VERSION_MINOR=0
24095    else
24096
24097  # Additional [] needed to keep m4 from mangling shell constructs.
24098  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24099    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24100  fi
24101  # Extract the version number without leading zeros.
24102  cleaned_value=${BASH_REMATCH[1]}
24103  if test "x$cleaned_value" = x; then
24104    # Special case for zero
24105    cleaned_value=${BASH_REMATCH[2]}
24106  fi
24107
24108  if test $cleaned_value -gt 255; then
24109    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24110  fi
24111  if test "x$cleaned_value" != "x$with_version_minor"; then
24112    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24113$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24114  fi
24115  VERSION_MINOR=$cleaned_value
24116
24117    fi
24118  else
24119    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24120      # Default is 0, if unspecified
24121      VERSION_MINOR=0
24122    fi
24123  fi
24124
24125
24126# Check whether --with-version-security was given.
24127if test "${with_version_security+set}" = set; then :
24128  withval=$with_version_security; with_version_security_present=true
24129else
24130  with_version_security_present=false
24131fi
24132
24133
24134  if test "x$with_version_security_present" = xtrue; then
24135    if test "x$with_version_security" = xyes; then
24136      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24137    elif test "x$with_version_security" = xno; then
24138      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24139      VERSION_SECURITY=0
24140    elif test "x$with_version_security" = x; then
24141      VERSION_SECURITY=0
24142    else
24143
24144  # Additional [] needed to keep m4 from mangling shell constructs.
24145  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24146    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24147  fi
24148  # Extract the version number without leading zeros.
24149  cleaned_value=${BASH_REMATCH[1]}
24150  if test "x$cleaned_value" = x; then
24151    # Special case for zero
24152    cleaned_value=${BASH_REMATCH[2]}
24153  fi
24154
24155  if test $cleaned_value -gt 255; then
24156    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24157  fi
24158  if test "x$cleaned_value" != "x$with_version_security"; then
24159    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24160$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24161  fi
24162  VERSION_SECURITY=$cleaned_value
24163
24164    fi
24165  else
24166    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24167      # Default is 0, if unspecified
24168      VERSION_SECURITY=0
24169    fi
24170  fi
24171
24172
24173# Check whether --with-version-patch was given.
24174if test "${with_version_patch+set}" = set; then :
24175  withval=$with_version_patch; with_version_patch_present=true
24176else
24177  with_version_patch_present=false
24178fi
24179
24180
24181  if test "x$with_version_patch_present" = xtrue; then
24182    if test "x$with_version_patch" = xyes; then
24183      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24184    elif test "x$with_version_patch" = xno; then
24185      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24186      VERSION_PATCH=0
24187    elif test "x$with_version_patch" = x; then
24188      VERSION_PATCH=0
24189    else
24190
24191  # Additional [] needed to keep m4 from mangling shell constructs.
24192  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24193    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24194  fi
24195  # Extract the version number without leading zeros.
24196  cleaned_value=${BASH_REMATCH[1]}
24197  if test "x$cleaned_value" = x; then
24198    # Special case for zero
24199    cleaned_value=${BASH_REMATCH[2]}
24200  fi
24201
24202  if test $cleaned_value -gt 255; then
24203    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24204  fi
24205  if test "x$cleaned_value" != "x$with_version_patch"; then
24206    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24207$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24208  fi
24209  VERSION_PATCH=$cleaned_value
24210
24211    fi
24212  else
24213    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24214      # Default is 0, if unspecified
24215      VERSION_PATCH=0
24216    fi
24217  fi
24218
24219  # Calculate derived version properties
24220
24221  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24222  if test "x$VERSION_PRE" = x; then
24223    VERSION_IS_GA=true
24224  else
24225    VERSION_IS_GA=false
24226  fi
24227
24228  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24229  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24230
24231  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24232  # Strip trailing zeroes from stripped_version_number
24233  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24234  VERSION_NUMBER=$stripped_version_number
24235
24236  # The complete version string, with additional build information
24237  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24238    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24239  else
24240    # If either build or opt is set, we need a + separator
24241    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24242  fi
24243
24244  # The short version string, just VERSION_NUMBER and PRE, if present.
24245  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24246
24247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24248$as_echo_n "checking for version string... " >&6; }
24249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24250$as_echo "$VERSION_STRING" >&6; }
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266###############################################################################
24267#
24268# Setup BootJDK, used to bootstrap the build.
24269#
24270###############################################################################
24271
24272
24273  BOOT_JDK_FOUND=no
24274
24275# Check whether --with-boot-jdk was given.
24276if test "${with_boot_jdk+set}" = set; then :
24277  withval=$with_boot_jdk;
24278fi
24279
24280
24281  # We look for the Boot JDK through various means, going from more certain to
24282  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24283  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24284  # must check if this is indeed valid; otherwise we'll continue looking.
24285
24286  # Test: Is bootjdk explicitely set by command line arguments?
24287
24288  if test "x$BOOT_JDK_FOUND" = xno; then
24289    # Now execute the test
24290
24291  if test "x$with_boot_jdk" != x; then
24292    BOOT_JDK=$with_boot_jdk
24293    BOOT_JDK_FOUND=maybe
24294    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24295$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24296  fi
24297
24298
24299    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24300    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24301      # Do we have a bin/java?
24302      if test ! -x "$BOOT_JDK/bin/java"; then
24303        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24304$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24305        BOOT_JDK_FOUND=no
24306      else
24307        # Do we have a bin/javac?
24308        if test ! -x "$BOOT_JDK/bin/javac"; then
24309          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24311          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24312$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24313          BOOT_JDK_FOUND=no
24314        else
24315          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24316          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24317
24318          # Extra M4 quote needed to protect [] in grep expression.
24319          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24320          if test "x$FOUND_CORRECT_VERSION" = x; then
24321            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24323            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24324$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24325            BOOT_JDK_FOUND=no
24326          else
24327            # We're done! :-)
24328            BOOT_JDK_FOUND=yes
24329
24330  # Only process if variable expands to non-empty
24331
24332  if test "x$BOOT_JDK" != x; then
24333    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24334
24335  # Input might be given as Windows format, start by converting to
24336  # unix format.
24337  path="$BOOT_JDK"
24338  new_path=`$CYGPATH -u "$path"`
24339
24340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24343  # "foo.exe" is OK but "foo" is an error.
24344  #
24345  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24346  # It is also a way to make sure we got the proper file name for the real test later on.
24347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24348  if test "x$test_shortpath" = x; then
24349    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24350$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24351    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24352  fi
24353
24354  # Call helper function which possibly converts this using DOS-style short mode.
24355  # If so, the updated path is stored in $new_path.
24356
24357  input_path="$new_path"
24358  # Check if we need to convert this using DOS-style short mode. If the path
24359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24360  # take no chances and rewrite it.
24361  # Note: m4 eats our [], so we need to use [ and ] instead.
24362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24363  if test "x$has_forbidden_chars" != x; then
24364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24368      # Going to short mode and back again did indeed matter. Since short mode is
24369      # case insensitive, let's make it lowercase to improve readability.
24370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24371      # Now convert it back to Unix-style (cygpath)
24372      input_path=`$CYGPATH -u "$shortmode_path"`
24373      new_path="$input_path"
24374    fi
24375  fi
24376
24377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24378  if test "x$test_cygdrive_prefix" = x; then
24379    # As a simple fix, exclude /usr/bin since it's not a real path.
24380    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24382      # a path prefixed by /cygdrive for fixpath to work.
24383      new_path="$CYGWIN_ROOT_PATH$input_path"
24384    fi
24385  fi
24386
24387
24388  if test "x$path" != "x$new_path"; then
24389    BOOT_JDK="$new_path"
24390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24391$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24392  fi
24393
24394    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24395
24396  path="$BOOT_JDK"
24397  has_colon=`$ECHO $path | $GREP ^.:`
24398  new_path="$path"
24399  if test "x$has_colon" = x; then
24400    # Not in mixed or Windows style, start by that.
24401    new_path=`cmd //c echo $path`
24402  fi
24403
24404
24405  input_path="$new_path"
24406  # Check if we need to convert this using DOS-style short mode. If the path
24407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24408  # take no chances and rewrite it.
24409  # Note: m4 eats our [], so we need to use [ and ] instead.
24410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24411  if test "x$has_forbidden_chars" != x; then
24412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24414  fi
24415
24416
24417  windows_path="$new_path"
24418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24419    unix_path=`$CYGPATH -u "$windows_path"`
24420    new_path="$unix_path"
24421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24423    new_path="$unix_path"
24424  fi
24425
24426  if test "x$path" != "x$new_path"; then
24427    BOOT_JDK="$new_path"
24428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24429$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24430  fi
24431
24432  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24433  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24434
24435    else
24436      # We're on a unix platform. Hooray! :)
24437      path="$BOOT_JDK"
24438      has_space=`$ECHO "$path" | $GREP " "`
24439      if test "x$has_space" != x; then
24440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24441$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24442        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24443      fi
24444
24445      # Use eval to expand a potential ~
24446      eval path="$path"
24447      if test ! -f "$path" && test ! -d "$path"; then
24448        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24449      fi
24450
24451      if test -d "$path"; then
24452        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24453      else
24454        dir="`$DIRNAME "$path"`"
24455        base="`$BASENAME "$path"`"
24456        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24457      fi
24458    fi
24459  fi
24460
24461            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24462$as_echo_n "checking for Boot JDK... " >&6; }
24463            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24464$as_echo "$BOOT_JDK" >&6; }
24465            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24466$as_echo_n "checking Boot JDK version... " >&6; }
24467            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24468            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24469$as_echo "$BOOT_JDK_VERSION" >&6; }
24470          fi # end check jdk version
24471        fi # end check javac
24472      fi # end check java
24473    fi # end check boot jdk found
24474  fi
24475
24476  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24477    # Having specified an argument which is incorrect will produce an instant failure;
24478    # we should not go on looking
24479    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24480  fi
24481
24482  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24483
24484  if test "x$BOOT_JDK_FOUND" = xno; then
24485    # Now execute the test
24486
24487  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24488    # First check at user selected default
24489
24490  if test "x$BOOT_JDK_FOUND" = xno; then
24491    # Now execute the test
24492
24493  if test -x /usr/libexec/java_home; then
24494    BOOT_JDK=`/usr/libexec/java_home `
24495    BOOT_JDK_FOUND=maybe
24496    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24497$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24498  fi
24499
24500
24501    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24502    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24503      # Do we have a bin/java?
24504      if test ! -x "$BOOT_JDK/bin/java"; then
24505        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24507        BOOT_JDK_FOUND=no
24508      else
24509        # Do we have a bin/javac?
24510        if test ! -x "$BOOT_JDK/bin/javac"; then
24511          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24513          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24514$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24515          BOOT_JDK_FOUND=no
24516        else
24517          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24518          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24519
24520          # Extra M4 quote needed to protect [] in grep expression.
24521          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24522          if test "x$FOUND_CORRECT_VERSION" = x; then
24523            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24525            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24526$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24527            BOOT_JDK_FOUND=no
24528          else
24529            # We're done! :-)
24530            BOOT_JDK_FOUND=yes
24531
24532  # Only process if variable expands to non-empty
24533
24534  if test "x$BOOT_JDK" != x; then
24535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24536
24537  # Input might be given as Windows format, start by converting to
24538  # unix format.
24539  path="$BOOT_JDK"
24540  new_path=`$CYGPATH -u "$path"`
24541
24542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24545  # "foo.exe" is OK but "foo" is an error.
24546  #
24547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24548  # It is also a way to make sure we got the proper file name for the real test later on.
24549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24550  if test "x$test_shortpath" = x; then
24551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24553    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24554  fi
24555
24556  # Call helper function which possibly converts this using DOS-style short mode.
24557  # If so, the updated path is stored in $new_path.
24558
24559  input_path="$new_path"
24560  # Check if we need to convert this using DOS-style short mode. If the path
24561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24562  # take no chances and rewrite it.
24563  # Note: m4 eats our [], so we need to use [ and ] instead.
24564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24565  if test "x$has_forbidden_chars" != x; then
24566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24570      # Going to short mode and back again did indeed matter. Since short mode is
24571      # case insensitive, let's make it lowercase to improve readability.
24572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24573      # Now convert it back to Unix-style (cygpath)
24574      input_path=`$CYGPATH -u "$shortmode_path"`
24575      new_path="$input_path"
24576    fi
24577  fi
24578
24579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24580  if test "x$test_cygdrive_prefix" = x; then
24581    # As a simple fix, exclude /usr/bin since it's not a real path.
24582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24584      # a path prefixed by /cygdrive for fixpath to work.
24585      new_path="$CYGWIN_ROOT_PATH$input_path"
24586    fi
24587  fi
24588
24589
24590  if test "x$path" != "x$new_path"; then
24591    BOOT_JDK="$new_path"
24592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24594  fi
24595
24596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24597
24598  path="$BOOT_JDK"
24599  has_colon=`$ECHO $path | $GREP ^.:`
24600  new_path="$path"
24601  if test "x$has_colon" = x; then
24602    # Not in mixed or Windows style, start by that.
24603    new_path=`cmd //c echo $path`
24604  fi
24605
24606
24607  input_path="$new_path"
24608  # Check if we need to convert this using DOS-style short mode. If the path
24609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24610  # take no chances and rewrite it.
24611  # Note: m4 eats our [], so we need to use [ and ] instead.
24612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24613  if test "x$has_forbidden_chars" != x; then
24614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24616  fi
24617
24618
24619  windows_path="$new_path"
24620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24621    unix_path=`$CYGPATH -u "$windows_path"`
24622    new_path="$unix_path"
24623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24625    new_path="$unix_path"
24626  fi
24627
24628  if test "x$path" != "x$new_path"; then
24629    BOOT_JDK="$new_path"
24630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24631$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24632  fi
24633
24634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24636
24637    else
24638      # We're on a unix platform. Hooray! :)
24639      path="$BOOT_JDK"
24640      has_space=`$ECHO "$path" | $GREP " "`
24641      if test "x$has_space" != x; then
24642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24643$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24644        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24645      fi
24646
24647      # Use eval to expand a potential ~
24648      eval path="$path"
24649      if test ! -f "$path" && test ! -d "$path"; then
24650        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24651      fi
24652
24653      if test -d "$path"; then
24654        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24655      else
24656        dir="`$DIRNAME "$path"`"
24657        base="`$BASENAME "$path"`"
24658        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24659      fi
24660    fi
24661  fi
24662
24663            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24664$as_echo_n "checking for Boot JDK... " >&6; }
24665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24666$as_echo "$BOOT_JDK" >&6; }
24667            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24668$as_echo_n "checking Boot JDK version... " >&6; }
24669            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24671$as_echo "$BOOT_JDK_VERSION" >&6; }
24672          fi # end check jdk version
24673        fi # end check javac
24674      fi # end check java
24675    fi # end check boot jdk found
24676  fi
24677
24678    # If that did not work out (e.g. too old), try explicit versions instead
24679
24680  if test "x$BOOT_JDK_FOUND" = xno; then
24681    # Now execute the test
24682
24683  if test -x /usr/libexec/java_home; then
24684    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24685    BOOT_JDK_FOUND=maybe
24686    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24687$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24688  fi
24689
24690
24691    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24692    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24693      # Do we have a bin/java?
24694      if test ! -x "$BOOT_JDK/bin/java"; then
24695        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24697        BOOT_JDK_FOUND=no
24698      else
24699        # Do we have a bin/javac?
24700        if test ! -x "$BOOT_JDK/bin/javac"; then
24701          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24703          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24704$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24705          BOOT_JDK_FOUND=no
24706        else
24707          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24708          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24709
24710          # Extra M4 quote needed to protect [] in grep expression.
24711          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24712          if test "x$FOUND_CORRECT_VERSION" = x; then
24713            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24715            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24716$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24717            BOOT_JDK_FOUND=no
24718          else
24719            # We're done! :-)
24720            BOOT_JDK_FOUND=yes
24721
24722  # Only process if variable expands to non-empty
24723
24724  if test "x$BOOT_JDK" != x; then
24725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24726
24727  # Input might be given as Windows format, start by converting to
24728  # unix format.
24729  path="$BOOT_JDK"
24730  new_path=`$CYGPATH -u "$path"`
24731
24732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24735  # "foo.exe" is OK but "foo" is an error.
24736  #
24737  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24738  # It is also a way to make sure we got the proper file name for the real test later on.
24739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24740  if test "x$test_shortpath" = x; then
24741    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24742$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24743    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24744  fi
24745
24746  # Call helper function which possibly converts this using DOS-style short mode.
24747  # If so, the updated path is stored in $new_path.
24748
24749  input_path="$new_path"
24750  # Check if we need to convert this using DOS-style short mode. If the path
24751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24752  # take no chances and rewrite it.
24753  # Note: m4 eats our [], so we need to use [ and ] instead.
24754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24755  if test "x$has_forbidden_chars" != x; then
24756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24760      # Going to short mode and back again did indeed matter. Since short mode is
24761      # case insensitive, let's make it lowercase to improve readability.
24762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24763      # Now convert it back to Unix-style (cygpath)
24764      input_path=`$CYGPATH -u "$shortmode_path"`
24765      new_path="$input_path"
24766    fi
24767  fi
24768
24769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24770  if test "x$test_cygdrive_prefix" = x; then
24771    # As a simple fix, exclude /usr/bin since it's not a real path.
24772    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24774      # a path prefixed by /cygdrive for fixpath to work.
24775      new_path="$CYGWIN_ROOT_PATH$input_path"
24776    fi
24777  fi
24778
24779
24780  if test "x$path" != "x$new_path"; then
24781    BOOT_JDK="$new_path"
24782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24783$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24784  fi
24785
24786    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24787
24788  path="$BOOT_JDK"
24789  has_colon=`$ECHO $path | $GREP ^.:`
24790  new_path="$path"
24791  if test "x$has_colon" = x; then
24792    # Not in mixed or Windows style, start by that.
24793    new_path=`cmd //c echo $path`
24794  fi
24795
24796
24797  input_path="$new_path"
24798  # Check if we need to convert this using DOS-style short mode. If the path
24799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24800  # take no chances and rewrite it.
24801  # Note: m4 eats our [], so we need to use [ and ] instead.
24802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24803  if test "x$has_forbidden_chars" != x; then
24804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24806  fi
24807
24808
24809  windows_path="$new_path"
24810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24811    unix_path=`$CYGPATH -u "$windows_path"`
24812    new_path="$unix_path"
24813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24815    new_path="$unix_path"
24816  fi
24817
24818  if test "x$path" != "x$new_path"; then
24819    BOOT_JDK="$new_path"
24820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24821$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24822  fi
24823
24824  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24825  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24826
24827    else
24828      # We're on a unix platform. Hooray! :)
24829      path="$BOOT_JDK"
24830      has_space=`$ECHO "$path" | $GREP " "`
24831      if test "x$has_space" != x; then
24832        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24833$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24834        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24835      fi
24836
24837      # Use eval to expand a potential ~
24838      eval path="$path"
24839      if test ! -f "$path" && test ! -d "$path"; then
24840        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24841      fi
24842
24843      if test -d "$path"; then
24844        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24845      else
24846        dir="`$DIRNAME "$path"`"
24847        base="`$BASENAME "$path"`"
24848        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24849      fi
24850    fi
24851  fi
24852
24853            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24854$as_echo_n "checking for Boot JDK... " >&6; }
24855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24856$as_echo "$BOOT_JDK" >&6; }
24857            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24858$as_echo_n "checking Boot JDK version... " >&6; }
24859            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24861$as_echo "$BOOT_JDK_VERSION" >&6; }
24862          fi # end check jdk version
24863        fi # end check javac
24864      fi # end check java
24865    fi # end check boot jdk found
24866  fi
24867
24868
24869  if test "x$BOOT_JDK_FOUND" = xno; then
24870    # Now execute the test
24871
24872  if test -x /usr/libexec/java_home; then
24873    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24874    BOOT_JDK_FOUND=maybe
24875    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24876$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24877  fi
24878
24879
24880    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24881    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24882      # Do we have a bin/java?
24883      if test ! -x "$BOOT_JDK/bin/java"; then
24884        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24886        BOOT_JDK_FOUND=no
24887      else
24888        # Do we have a bin/javac?
24889        if test ! -x "$BOOT_JDK/bin/javac"; then
24890          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24892          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24893$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24894          BOOT_JDK_FOUND=no
24895        else
24896          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24897          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24898
24899          # Extra M4 quote needed to protect [] in grep expression.
24900          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24901          if test "x$FOUND_CORRECT_VERSION" = x; then
24902            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24904            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24905$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24906            BOOT_JDK_FOUND=no
24907          else
24908            # We're done! :-)
24909            BOOT_JDK_FOUND=yes
24910
24911  # Only process if variable expands to non-empty
24912
24913  if test "x$BOOT_JDK" != x; then
24914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24915
24916  # Input might be given as Windows format, start by converting to
24917  # unix format.
24918  path="$BOOT_JDK"
24919  new_path=`$CYGPATH -u "$path"`
24920
24921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24924  # "foo.exe" is OK but "foo" is an error.
24925  #
24926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24927  # It is also a way to make sure we got the proper file name for the real test later on.
24928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24929  if test "x$test_shortpath" = x; then
24930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24932    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24933  fi
24934
24935  # Call helper function which possibly converts this using DOS-style short mode.
24936  # If so, the updated path is stored in $new_path.
24937
24938  input_path="$new_path"
24939  # Check if we need to convert this using DOS-style short mode. If the path
24940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24941  # take no chances and rewrite it.
24942  # Note: m4 eats our [], so we need to use [ and ] instead.
24943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24944  if test "x$has_forbidden_chars" != x; then
24945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24949      # Going to short mode and back again did indeed matter. Since short mode is
24950      # case insensitive, let's make it lowercase to improve readability.
24951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24952      # Now convert it back to Unix-style (cygpath)
24953      input_path=`$CYGPATH -u "$shortmode_path"`
24954      new_path="$input_path"
24955    fi
24956  fi
24957
24958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24959  if test "x$test_cygdrive_prefix" = x; then
24960    # As a simple fix, exclude /usr/bin since it's not a real path.
24961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24963      # a path prefixed by /cygdrive for fixpath to work.
24964      new_path="$CYGWIN_ROOT_PATH$input_path"
24965    fi
24966  fi
24967
24968
24969  if test "x$path" != "x$new_path"; then
24970    BOOT_JDK="$new_path"
24971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24972$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24973  fi
24974
24975    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24976
24977  path="$BOOT_JDK"
24978  has_colon=`$ECHO $path | $GREP ^.:`
24979  new_path="$path"
24980  if test "x$has_colon" = x; then
24981    # Not in mixed or Windows style, start by that.
24982    new_path=`cmd //c echo $path`
24983  fi
24984
24985
24986  input_path="$new_path"
24987  # Check if we need to convert this using DOS-style short mode. If the path
24988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24989  # take no chances and rewrite it.
24990  # Note: m4 eats our [], so we need to use [ and ] instead.
24991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24992  if test "x$has_forbidden_chars" != x; then
24993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24995  fi
24996
24997
24998  windows_path="$new_path"
24999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25000    unix_path=`$CYGPATH -u "$windows_path"`
25001    new_path="$unix_path"
25002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25004    new_path="$unix_path"
25005  fi
25006
25007  if test "x$path" != "x$new_path"; then
25008    BOOT_JDK="$new_path"
25009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25010$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25011  fi
25012
25013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25015
25016    else
25017      # We're on a unix platform. Hooray! :)
25018      path="$BOOT_JDK"
25019      has_space=`$ECHO "$path" | $GREP " "`
25020      if test "x$has_space" != x; then
25021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25022$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25023        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25024      fi
25025
25026      # Use eval to expand a potential ~
25027      eval path="$path"
25028      if test ! -f "$path" && test ! -d "$path"; then
25029        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25030      fi
25031
25032      if test -d "$path"; then
25033        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25034      else
25035        dir="`$DIRNAME "$path"`"
25036        base="`$BASENAME "$path"`"
25037        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25038      fi
25039    fi
25040  fi
25041
25042            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25043$as_echo_n "checking for Boot JDK... " >&6; }
25044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25045$as_echo "$BOOT_JDK" >&6; }
25046            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25047$as_echo_n "checking Boot JDK version... " >&6; }
25048            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25050$as_echo "$BOOT_JDK_VERSION" >&6; }
25051          fi # end check jdk version
25052        fi # end check javac
25053      fi # end check java
25054    fi # end check boot jdk found
25055  fi
25056
25057
25058  if test "x$BOOT_JDK_FOUND" = xno; then
25059    # Now execute the test
25060
25061  if test -x /usr/libexec/java_home; then
25062    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25063    BOOT_JDK_FOUND=maybe
25064    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25065$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25066  fi
25067
25068
25069    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25070    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25071      # Do we have a bin/java?
25072      if test ! -x "$BOOT_JDK/bin/java"; then
25073        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25075        BOOT_JDK_FOUND=no
25076      else
25077        # Do we have a bin/javac?
25078        if test ! -x "$BOOT_JDK/bin/javac"; then
25079          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25081          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25082$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25083          BOOT_JDK_FOUND=no
25084        else
25085          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25086          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25087
25088          # Extra M4 quote needed to protect [] in grep expression.
25089          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25090          if test "x$FOUND_CORRECT_VERSION" = x; then
25091            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25093            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25094$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25095            BOOT_JDK_FOUND=no
25096          else
25097            # We're done! :-)
25098            BOOT_JDK_FOUND=yes
25099
25100  # Only process if variable expands to non-empty
25101
25102  if test "x$BOOT_JDK" != x; then
25103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25104
25105  # Input might be given as Windows format, start by converting to
25106  # unix format.
25107  path="$BOOT_JDK"
25108  new_path=`$CYGPATH -u "$path"`
25109
25110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25113  # "foo.exe" is OK but "foo" is an error.
25114  #
25115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25116  # It is also a way to make sure we got the proper file name for the real test later on.
25117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25118  if test "x$test_shortpath" = x; then
25119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25121    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25122  fi
25123
25124  # Call helper function which possibly converts this using DOS-style short mode.
25125  # If so, the updated path is stored in $new_path.
25126
25127  input_path="$new_path"
25128  # Check if we need to convert this using DOS-style short mode. If the path
25129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25130  # take no chances and rewrite it.
25131  # Note: m4 eats our [], so we need to use [ and ] instead.
25132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25133  if test "x$has_forbidden_chars" != x; then
25134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25138      # Going to short mode and back again did indeed matter. Since short mode is
25139      # case insensitive, let's make it lowercase to improve readability.
25140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25141      # Now convert it back to Unix-style (cygpath)
25142      input_path=`$CYGPATH -u "$shortmode_path"`
25143      new_path="$input_path"
25144    fi
25145  fi
25146
25147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25148  if test "x$test_cygdrive_prefix" = x; then
25149    # As a simple fix, exclude /usr/bin since it's not a real path.
25150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25152      # a path prefixed by /cygdrive for fixpath to work.
25153      new_path="$CYGWIN_ROOT_PATH$input_path"
25154    fi
25155  fi
25156
25157
25158  if test "x$path" != "x$new_path"; then
25159    BOOT_JDK="$new_path"
25160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25162  fi
25163
25164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25165
25166  path="$BOOT_JDK"
25167  has_colon=`$ECHO $path | $GREP ^.:`
25168  new_path="$path"
25169  if test "x$has_colon" = x; then
25170    # Not in mixed or Windows style, start by that.
25171    new_path=`cmd //c echo $path`
25172  fi
25173
25174
25175  input_path="$new_path"
25176  # Check if we need to convert this using DOS-style short mode. If the path
25177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25178  # take no chances and rewrite it.
25179  # Note: m4 eats our [], so we need to use [ and ] instead.
25180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25181  if test "x$has_forbidden_chars" != x; then
25182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25184  fi
25185
25186
25187  windows_path="$new_path"
25188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25189    unix_path=`$CYGPATH -u "$windows_path"`
25190    new_path="$unix_path"
25191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25193    new_path="$unix_path"
25194  fi
25195
25196  if test "x$path" != "x$new_path"; then
25197    BOOT_JDK="$new_path"
25198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25200  fi
25201
25202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25204
25205    else
25206      # We're on a unix platform. Hooray! :)
25207      path="$BOOT_JDK"
25208      has_space=`$ECHO "$path" | $GREP " "`
25209      if test "x$has_space" != x; then
25210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25212        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25213      fi
25214
25215      # Use eval to expand a potential ~
25216      eval path="$path"
25217      if test ! -f "$path" && test ! -d "$path"; then
25218        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25219      fi
25220
25221      if test -d "$path"; then
25222        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25223      else
25224        dir="`$DIRNAME "$path"`"
25225        base="`$BASENAME "$path"`"
25226        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25227      fi
25228    fi
25229  fi
25230
25231            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25232$as_echo_n "checking for Boot JDK... " >&6; }
25233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25234$as_echo "$BOOT_JDK" >&6; }
25235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25236$as_echo_n "checking Boot JDK version... " >&6; }
25237            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25239$as_echo "$BOOT_JDK_VERSION" >&6; }
25240          fi # end check jdk version
25241        fi # end check javac
25242      fi # end check java
25243    fi # end check boot jdk found
25244  fi
25245
25246  fi
25247
25248
25249    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25250    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25251      # Do we have a bin/java?
25252      if test ! -x "$BOOT_JDK/bin/java"; then
25253        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25255        BOOT_JDK_FOUND=no
25256      else
25257        # Do we have a bin/javac?
25258        if test ! -x "$BOOT_JDK/bin/javac"; then
25259          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25261          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25262$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25263          BOOT_JDK_FOUND=no
25264        else
25265          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25266          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25267
25268          # Extra M4 quote needed to protect [] in grep expression.
25269          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25270          if test "x$FOUND_CORRECT_VERSION" = x; then
25271            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25273            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25274$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25275            BOOT_JDK_FOUND=no
25276          else
25277            # We're done! :-)
25278            BOOT_JDK_FOUND=yes
25279
25280  # Only process if variable expands to non-empty
25281
25282  if test "x$BOOT_JDK" != x; then
25283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25284
25285  # Input might be given as Windows format, start by converting to
25286  # unix format.
25287  path="$BOOT_JDK"
25288  new_path=`$CYGPATH -u "$path"`
25289
25290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25293  # "foo.exe" is OK but "foo" is an error.
25294  #
25295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25296  # It is also a way to make sure we got the proper file name for the real test later on.
25297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25298  if test "x$test_shortpath" = x; then
25299    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25300$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25301    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25302  fi
25303
25304  # Call helper function which possibly converts this using DOS-style short mode.
25305  # If so, the updated path is stored in $new_path.
25306
25307  input_path="$new_path"
25308  # Check if we need to convert this using DOS-style short mode. If the path
25309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25310  # take no chances and rewrite it.
25311  # Note: m4 eats our [], so we need to use [ and ] instead.
25312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25313  if test "x$has_forbidden_chars" != x; then
25314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25318      # Going to short mode and back again did indeed matter. Since short mode is
25319      # case insensitive, let's make it lowercase to improve readability.
25320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25321      # Now convert it back to Unix-style (cygpath)
25322      input_path=`$CYGPATH -u "$shortmode_path"`
25323      new_path="$input_path"
25324    fi
25325  fi
25326
25327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25328  if test "x$test_cygdrive_prefix" = x; then
25329    # As a simple fix, exclude /usr/bin since it's not a real path.
25330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25332      # a path prefixed by /cygdrive for fixpath to work.
25333      new_path="$CYGWIN_ROOT_PATH$input_path"
25334    fi
25335  fi
25336
25337
25338  if test "x$path" != "x$new_path"; then
25339    BOOT_JDK="$new_path"
25340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25341$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25342  fi
25343
25344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25345
25346  path="$BOOT_JDK"
25347  has_colon=`$ECHO $path | $GREP ^.:`
25348  new_path="$path"
25349  if test "x$has_colon" = x; then
25350    # Not in mixed or Windows style, start by that.
25351    new_path=`cmd //c echo $path`
25352  fi
25353
25354
25355  input_path="$new_path"
25356  # Check if we need to convert this using DOS-style short mode. If the path
25357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25358  # take no chances and rewrite it.
25359  # Note: m4 eats our [], so we need to use [ and ] instead.
25360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25361  if test "x$has_forbidden_chars" != x; then
25362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25364  fi
25365
25366
25367  windows_path="$new_path"
25368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25369    unix_path=`$CYGPATH -u "$windows_path"`
25370    new_path="$unix_path"
25371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25373    new_path="$unix_path"
25374  fi
25375
25376  if test "x$path" != "x$new_path"; then
25377    BOOT_JDK="$new_path"
25378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25380  fi
25381
25382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25384
25385    else
25386      # We're on a unix platform. Hooray! :)
25387      path="$BOOT_JDK"
25388      has_space=`$ECHO "$path" | $GREP " "`
25389      if test "x$has_space" != x; then
25390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25391$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25392        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25393      fi
25394
25395      # Use eval to expand a potential ~
25396      eval path="$path"
25397      if test ! -f "$path" && test ! -d "$path"; then
25398        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25399      fi
25400
25401      if test -d "$path"; then
25402        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25403      else
25404        dir="`$DIRNAME "$path"`"
25405        base="`$BASENAME "$path"`"
25406        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25407      fi
25408    fi
25409  fi
25410
25411            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25412$as_echo_n "checking for Boot JDK... " >&6; }
25413            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25414$as_echo "$BOOT_JDK" >&6; }
25415            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25416$as_echo_n "checking Boot JDK version... " >&6; }
25417            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25418            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25419$as_echo "$BOOT_JDK_VERSION" >&6; }
25420          fi # end check jdk version
25421        fi # end check javac
25422      fi # end check java
25423    fi # end check boot jdk found
25424  fi
25425
25426
25427  # Test: Is $JAVA_HOME set?
25428
25429  if test "x$BOOT_JDK_FOUND" = xno; then
25430    # Now execute the test
25431
25432  if test "x$JAVA_HOME" != x; then
25433    JAVA_HOME_PROCESSED="$JAVA_HOME"
25434
25435  # Only process if variable expands to non-empty
25436
25437  if test "x$JAVA_HOME_PROCESSED" != x; then
25438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25439
25440  # Input might be given as Windows format, start by converting to
25441  # unix format.
25442  path="$JAVA_HOME_PROCESSED"
25443  new_path=`$CYGPATH -u "$path"`
25444
25445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25448  # "foo.exe" is OK but "foo" is an error.
25449  #
25450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25451  # It is also a way to make sure we got the proper file name for the real test later on.
25452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25453  if test "x$test_shortpath" = x; then
25454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25455$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25456    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25457  fi
25458
25459  # Call helper function which possibly converts this using DOS-style short mode.
25460  # If so, the updated path is stored in $new_path.
25461
25462  input_path="$new_path"
25463  # Check if we need to convert this using DOS-style short mode. If the path
25464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25465  # take no chances and rewrite it.
25466  # Note: m4 eats our [], so we need to use [ and ] instead.
25467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25468  if test "x$has_forbidden_chars" != x; then
25469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25473      # Going to short mode and back again did indeed matter. Since short mode is
25474      # case insensitive, let's make it lowercase to improve readability.
25475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25476      # Now convert it back to Unix-style (cygpath)
25477      input_path=`$CYGPATH -u "$shortmode_path"`
25478      new_path="$input_path"
25479    fi
25480  fi
25481
25482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25483  if test "x$test_cygdrive_prefix" = x; then
25484    # As a simple fix, exclude /usr/bin since it's not a real path.
25485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25487      # a path prefixed by /cygdrive for fixpath to work.
25488      new_path="$CYGWIN_ROOT_PATH$input_path"
25489    fi
25490  fi
25491
25492
25493  if test "x$path" != "x$new_path"; then
25494    JAVA_HOME_PROCESSED="$new_path"
25495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25496$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25497  fi
25498
25499    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25500
25501  path="$JAVA_HOME_PROCESSED"
25502  has_colon=`$ECHO $path | $GREP ^.:`
25503  new_path="$path"
25504  if test "x$has_colon" = x; then
25505    # Not in mixed or Windows style, start by that.
25506    new_path=`cmd //c echo $path`
25507  fi
25508
25509
25510  input_path="$new_path"
25511  # Check if we need to convert this using DOS-style short mode. If the path
25512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25513  # take no chances and rewrite it.
25514  # Note: m4 eats our [], so we need to use [ and ] instead.
25515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25516  if test "x$has_forbidden_chars" != x; then
25517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25519  fi
25520
25521
25522  windows_path="$new_path"
25523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25524    unix_path=`$CYGPATH -u "$windows_path"`
25525    new_path="$unix_path"
25526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25528    new_path="$unix_path"
25529  fi
25530
25531  if test "x$path" != "x$new_path"; then
25532    JAVA_HOME_PROCESSED="$new_path"
25533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25534$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25535  fi
25536
25537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25539
25540    else
25541      # We're on a unix platform. Hooray! :)
25542      path="$JAVA_HOME_PROCESSED"
25543      has_space=`$ECHO "$path" | $GREP " "`
25544      if test "x$has_space" != x; then
25545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25546$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25547        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25548      fi
25549
25550      # Use eval to expand a potential ~
25551      eval path="$path"
25552      if test ! -f "$path" && test ! -d "$path"; then
25553        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25554      fi
25555
25556      if test -d "$path"; then
25557        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25558      else
25559        dir="`$DIRNAME "$path"`"
25560        base="`$BASENAME "$path"`"
25561        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25562      fi
25563    fi
25564  fi
25565
25566    if test ! -d "$JAVA_HOME_PROCESSED"; then
25567      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25568$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25569    else
25570      # Aha, the user has set a JAVA_HOME
25571      # let us use that as the Boot JDK.
25572      BOOT_JDK="$JAVA_HOME_PROCESSED"
25573      BOOT_JDK_FOUND=maybe
25574      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25575$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25576    fi
25577  fi
25578
25579
25580    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25581    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25582      # Do we have a bin/java?
25583      if test ! -x "$BOOT_JDK/bin/java"; then
25584        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25586        BOOT_JDK_FOUND=no
25587      else
25588        # Do we have a bin/javac?
25589        if test ! -x "$BOOT_JDK/bin/javac"; then
25590          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25592          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25593$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25594          BOOT_JDK_FOUND=no
25595        else
25596          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25597          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25598
25599          # Extra M4 quote needed to protect [] in grep expression.
25600          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25601          if test "x$FOUND_CORRECT_VERSION" = x; then
25602            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25604            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25605$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25606            BOOT_JDK_FOUND=no
25607          else
25608            # We're done! :-)
25609            BOOT_JDK_FOUND=yes
25610
25611  # Only process if variable expands to non-empty
25612
25613  if test "x$BOOT_JDK" != x; then
25614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25615
25616  # Input might be given as Windows format, start by converting to
25617  # unix format.
25618  path="$BOOT_JDK"
25619  new_path=`$CYGPATH -u "$path"`
25620
25621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25624  # "foo.exe" is OK but "foo" is an error.
25625  #
25626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25627  # It is also a way to make sure we got the proper file name for the real test later on.
25628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25629  if test "x$test_shortpath" = x; then
25630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25632    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25633  fi
25634
25635  # Call helper function which possibly converts this using DOS-style short mode.
25636  # If so, the updated path is stored in $new_path.
25637
25638  input_path="$new_path"
25639  # Check if we need to convert this using DOS-style short mode. If the path
25640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25641  # take no chances and rewrite it.
25642  # Note: m4 eats our [], so we need to use [ and ] instead.
25643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25644  if test "x$has_forbidden_chars" != x; then
25645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25649      # Going to short mode and back again did indeed matter. Since short mode is
25650      # case insensitive, let's make it lowercase to improve readability.
25651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25652      # Now convert it back to Unix-style (cygpath)
25653      input_path=`$CYGPATH -u "$shortmode_path"`
25654      new_path="$input_path"
25655    fi
25656  fi
25657
25658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25659  if test "x$test_cygdrive_prefix" = x; then
25660    # As a simple fix, exclude /usr/bin since it's not a real path.
25661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25663      # a path prefixed by /cygdrive for fixpath to work.
25664      new_path="$CYGWIN_ROOT_PATH$input_path"
25665    fi
25666  fi
25667
25668
25669  if test "x$path" != "x$new_path"; then
25670    BOOT_JDK="$new_path"
25671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25672$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25673  fi
25674
25675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25676
25677  path="$BOOT_JDK"
25678  has_colon=`$ECHO $path | $GREP ^.:`
25679  new_path="$path"
25680  if test "x$has_colon" = x; then
25681    # Not in mixed or Windows style, start by that.
25682    new_path=`cmd //c echo $path`
25683  fi
25684
25685
25686  input_path="$new_path"
25687  # Check if we need to convert this using DOS-style short mode. If the path
25688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25689  # take no chances and rewrite it.
25690  # Note: m4 eats our [], so we need to use [ and ] instead.
25691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25692  if test "x$has_forbidden_chars" != x; then
25693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25695  fi
25696
25697
25698  windows_path="$new_path"
25699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25700    unix_path=`$CYGPATH -u "$windows_path"`
25701    new_path="$unix_path"
25702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25704    new_path="$unix_path"
25705  fi
25706
25707  if test "x$path" != "x$new_path"; then
25708    BOOT_JDK="$new_path"
25709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25711  fi
25712
25713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25715
25716    else
25717      # We're on a unix platform. Hooray! :)
25718      path="$BOOT_JDK"
25719      has_space=`$ECHO "$path" | $GREP " "`
25720      if test "x$has_space" != x; then
25721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25722$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25724      fi
25725
25726      # Use eval to expand a potential ~
25727      eval path="$path"
25728      if test ! -f "$path" && test ! -d "$path"; then
25729        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25730      fi
25731
25732      if test -d "$path"; then
25733        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25734      else
25735        dir="`$DIRNAME "$path"`"
25736        base="`$BASENAME "$path"`"
25737        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25738      fi
25739    fi
25740  fi
25741
25742            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25743$as_echo_n "checking for Boot JDK... " >&6; }
25744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25745$as_echo "$BOOT_JDK" >&6; }
25746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25747$as_echo_n "checking Boot JDK version... " >&6; }
25748            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25750$as_echo "$BOOT_JDK_VERSION" >&6; }
25751          fi # end check jdk version
25752        fi # end check javac
25753      fi # end check java
25754    fi # end check boot jdk found
25755  fi
25756
25757
25758  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25759
25760  if test "x$BOOT_JDK_FOUND" = xno; then
25761    # Now execute the test
25762
25763  # Extract the first word of "javac", so it can be a program name with args.
25764set dummy javac; ac_word=$2
25765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25766$as_echo_n "checking for $ac_word... " >&6; }
25767if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25768  $as_echo_n "(cached) " >&6
25769else
25770  case $JAVAC_CHECK in
25771  [\\/]* | ?:[\\/]*)
25772  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25773  ;;
25774  *)
25775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25776for as_dir in $PATH
25777do
25778  IFS=$as_save_IFS
25779  test -z "$as_dir" && as_dir=.
25780    for ac_exec_ext in '' $ac_executable_extensions; do
25781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25782    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25784    break 2
25785  fi
25786done
25787  done
25788IFS=$as_save_IFS
25789
25790  ;;
25791esac
25792fi
25793JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25794if test -n "$JAVAC_CHECK"; then
25795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25796$as_echo "$JAVAC_CHECK" >&6; }
25797else
25798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25799$as_echo "no" >&6; }
25800fi
25801
25802
25803  # Extract the first word of "java", so it can be a program name with args.
25804set dummy java; ac_word=$2
25805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25806$as_echo_n "checking for $ac_word... " >&6; }
25807if ${ac_cv_path_JAVA_CHECK+:} false; then :
25808  $as_echo_n "(cached) " >&6
25809else
25810  case $JAVA_CHECK in
25811  [\\/]* | ?:[\\/]*)
25812  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25813  ;;
25814  *)
25815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25816for as_dir in $PATH
25817do
25818  IFS=$as_save_IFS
25819  test -z "$as_dir" && as_dir=.
25820    for ac_exec_ext in '' $ac_executable_extensions; do
25821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25822    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25824    break 2
25825  fi
25826done
25827  done
25828IFS=$as_save_IFS
25829
25830  ;;
25831esac
25832fi
25833JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25834if test -n "$JAVA_CHECK"; then
25835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25836$as_echo "$JAVA_CHECK" >&6; }
25837else
25838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25839$as_echo "no" >&6; }
25840fi
25841
25842
25843  BINARY="$JAVAC_CHECK"
25844  if test "x$JAVAC_CHECK" = x; then
25845    BINARY="$JAVA_CHECK"
25846  fi
25847  if test "x$BINARY" != x; then
25848    # So there is a java(c) binary, it might be part of a JDK.
25849    # Lets find the JDK/JRE directory by following symbolic links.
25850    # Linux/GNU systems often have links from /usr/bin/java to
25851    # /etc/alternatives/java to the real JDK binary.
25852
25853  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25854    # Follow a chain of symbolic links. Use readlink
25855    # where it exists, else fall back to horribly
25856    # complicated shell code.
25857    if test "x$READLINK_TESTED" != yes; then
25858      # On MacOSX there is a readlink tool with a different
25859      # purpose than the GNU readlink tool. Check the found readlink.
25860      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25861      if test "x$ISGNU" = x; then
25862        # A readlink that we do not know how to use.
25863        # Are there other non-GNU readlinks out there?
25864        READLINK_TESTED=yes
25865        READLINK=
25866      fi
25867    fi
25868
25869    if test "x$READLINK" != x; then
25870      BINARY=`$READLINK -f $BINARY`
25871    else
25872      # Save the current directory for restoring afterwards
25873      STARTDIR=$PWD
25874      COUNTER=0
25875      sym_link_dir=`$DIRNAME $BINARY`
25876      sym_link_file=`$BASENAME $BINARY`
25877      cd $sym_link_dir
25878      # Use -P flag to resolve symlinks in directories.
25879      cd `$THEPWDCMD -P`
25880      sym_link_dir=`$THEPWDCMD -P`
25881      # Resolve file symlinks
25882      while test $COUNTER -lt 20; do
25883        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25884        if test "x$ISLINK" == x; then
25885          # This is not a symbolic link! We are done!
25886          break
25887        fi
25888        # Again resolve directory symlinks since the target of the just found
25889        # link could be in a different directory
25890        cd `$DIRNAME $ISLINK`
25891        sym_link_dir=`$THEPWDCMD -P`
25892        sym_link_file=`$BASENAME $ISLINK`
25893        let COUNTER=COUNTER+1
25894      done
25895      cd $STARTDIR
25896      BINARY=$sym_link_dir/$sym_link_file
25897    fi
25898  fi
25899
25900    BOOT_JDK=`dirname "$BINARY"`
25901    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25902    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25903      # Looks like we found ourselves an JDK
25904      BOOT_JDK_FOUND=maybe
25905      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25906$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25907    fi
25908  fi
25909
25910
25911    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25912    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25913      # Do we have a bin/java?
25914      if test ! -x "$BOOT_JDK/bin/java"; then
25915        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25917        BOOT_JDK_FOUND=no
25918      else
25919        # Do we have a bin/javac?
25920        if test ! -x "$BOOT_JDK/bin/javac"; then
25921          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25922$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25923          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25924$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25925          BOOT_JDK_FOUND=no
25926        else
25927          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25928          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25929
25930          # Extra M4 quote needed to protect [] in grep expression.
25931          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25932          if test "x$FOUND_CORRECT_VERSION" = x; then
25933            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25935            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25936$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25937            BOOT_JDK_FOUND=no
25938          else
25939            # We're done! :-)
25940            BOOT_JDK_FOUND=yes
25941
25942  # Only process if variable expands to non-empty
25943
25944  if test "x$BOOT_JDK" != x; then
25945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25946
25947  # Input might be given as Windows format, start by converting to
25948  # unix format.
25949  path="$BOOT_JDK"
25950  new_path=`$CYGPATH -u "$path"`
25951
25952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25955  # "foo.exe" is OK but "foo" is an error.
25956  #
25957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25958  # It is also a way to make sure we got the proper file name for the real test later on.
25959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25960  if test "x$test_shortpath" = x; then
25961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25962$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25963    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25964  fi
25965
25966  # Call helper function which possibly converts this using DOS-style short mode.
25967  # If so, the updated path is stored in $new_path.
25968
25969  input_path="$new_path"
25970  # Check if we need to convert this using DOS-style short mode. If the path
25971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25972  # take no chances and rewrite it.
25973  # Note: m4 eats our [], so we need to use [ and ] instead.
25974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25975  if test "x$has_forbidden_chars" != x; then
25976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25980      # Going to short mode and back again did indeed matter. Since short mode is
25981      # case insensitive, let's make it lowercase to improve readability.
25982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25983      # Now convert it back to Unix-style (cygpath)
25984      input_path=`$CYGPATH -u "$shortmode_path"`
25985      new_path="$input_path"
25986    fi
25987  fi
25988
25989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25990  if test "x$test_cygdrive_prefix" = x; then
25991    # As a simple fix, exclude /usr/bin since it's not a real path.
25992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25994      # a path prefixed by /cygdrive for fixpath to work.
25995      new_path="$CYGWIN_ROOT_PATH$input_path"
25996    fi
25997  fi
25998
25999
26000  if test "x$path" != "x$new_path"; then
26001    BOOT_JDK="$new_path"
26002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26004  fi
26005
26006    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26007
26008  path="$BOOT_JDK"
26009  has_colon=`$ECHO $path | $GREP ^.:`
26010  new_path="$path"
26011  if test "x$has_colon" = x; then
26012    # Not in mixed or Windows style, start by that.
26013    new_path=`cmd //c echo $path`
26014  fi
26015
26016
26017  input_path="$new_path"
26018  # Check if we need to convert this using DOS-style short mode. If the path
26019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26020  # take no chances and rewrite it.
26021  # Note: m4 eats our [], so we need to use [ and ] instead.
26022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26023  if test "x$has_forbidden_chars" != x; then
26024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26026  fi
26027
26028
26029  windows_path="$new_path"
26030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26031    unix_path=`$CYGPATH -u "$windows_path"`
26032    new_path="$unix_path"
26033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26035    new_path="$unix_path"
26036  fi
26037
26038  if test "x$path" != "x$new_path"; then
26039    BOOT_JDK="$new_path"
26040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26042  fi
26043
26044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26046
26047    else
26048      # We're on a unix platform. Hooray! :)
26049      path="$BOOT_JDK"
26050      has_space=`$ECHO "$path" | $GREP " "`
26051      if test "x$has_space" != x; then
26052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26053$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26054        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26055      fi
26056
26057      # Use eval to expand a potential ~
26058      eval path="$path"
26059      if test ! -f "$path" && test ! -d "$path"; then
26060        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26061      fi
26062
26063      if test -d "$path"; then
26064        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26065      else
26066        dir="`$DIRNAME "$path"`"
26067        base="`$BASENAME "$path"`"
26068        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26069      fi
26070    fi
26071  fi
26072
26073            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26074$as_echo_n "checking for Boot JDK... " >&6; }
26075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26076$as_echo "$BOOT_JDK" >&6; }
26077            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26078$as_echo_n "checking Boot JDK version... " >&6; }
26079            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26080            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26081$as_echo "$BOOT_JDK_VERSION" >&6; }
26082          fi # end check jdk version
26083        fi # end check javac
26084      fi # end check java
26085    fi # end check boot jdk found
26086  fi
26087
26088
26089  # Test: Is there a JDK installed in default, well-known locations?
26090
26091  if test "x$BOOT_JDK_FOUND" = xno; then
26092    # Now execute the test
26093
26094  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26095
26096  if test "x$BOOT_JDK_FOUND" = xno; then
26097    # Now execute the test
26098
26099  if test "x$ProgramW6432" != x; then
26100    VIRTUAL_DIR="$ProgramW6432/Java"
26101
26102  windows_path="$VIRTUAL_DIR"
26103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26104    unix_path=`$CYGPATH -u "$windows_path"`
26105    VIRTUAL_DIR="$unix_path"
26106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26108    VIRTUAL_DIR="$unix_path"
26109  fi
26110
26111
26112  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26113  BOOT_JDK_SUFFIX=""
26114  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26115  if test "x$ALL_JDKS_FOUND" != x; then
26116    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26117
26118  if test "x$BOOT_JDK_FOUND" = xno; then
26119    # Now execute the test
26120
26121        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26122        if test -d "$BOOT_JDK"; then
26123          BOOT_JDK_FOUND=maybe
26124          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26125$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26126        fi
26127
26128
26129    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26130    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26131      # Do we have a bin/java?
26132      if test ! -x "$BOOT_JDK/bin/java"; then
26133        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26135        BOOT_JDK_FOUND=no
26136      else
26137        # Do we have a bin/javac?
26138        if test ! -x "$BOOT_JDK/bin/javac"; then
26139          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26140$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26141          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26142$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26143          BOOT_JDK_FOUND=no
26144        else
26145          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26146          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26147
26148          # Extra M4 quote needed to protect [] in grep expression.
26149          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26150          if test "x$FOUND_CORRECT_VERSION" = x; then
26151            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26153            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26154$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26155            BOOT_JDK_FOUND=no
26156          else
26157            # We're done! :-)
26158            BOOT_JDK_FOUND=yes
26159
26160  # Only process if variable expands to non-empty
26161
26162  if test "x$BOOT_JDK" != x; then
26163    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26164
26165  # Input might be given as Windows format, start by converting to
26166  # unix format.
26167  path="$BOOT_JDK"
26168  new_path=`$CYGPATH -u "$path"`
26169
26170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26173  # "foo.exe" is OK but "foo" is an error.
26174  #
26175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26176  # It is also a way to make sure we got the proper file name for the real test later on.
26177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26178  if test "x$test_shortpath" = x; then
26179    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26180$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26181    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26182  fi
26183
26184  # Call helper function which possibly converts this using DOS-style short mode.
26185  # If so, the updated path is stored in $new_path.
26186
26187  input_path="$new_path"
26188  # Check if we need to convert this using DOS-style short mode. If the path
26189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26190  # take no chances and rewrite it.
26191  # Note: m4 eats our [], so we need to use [ and ] instead.
26192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26193  if test "x$has_forbidden_chars" != x; then
26194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26198      # Going to short mode and back again did indeed matter. Since short mode is
26199      # case insensitive, let's make it lowercase to improve readability.
26200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26201      # Now convert it back to Unix-style (cygpath)
26202      input_path=`$CYGPATH -u "$shortmode_path"`
26203      new_path="$input_path"
26204    fi
26205  fi
26206
26207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26208  if test "x$test_cygdrive_prefix" = x; then
26209    # As a simple fix, exclude /usr/bin since it's not a real path.
26210    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26212      # a path prefixed by /cygdrive for fixpath to work.
26213      new_path="$CYGWIN_ROOT_PATH$input_path"
26214    fi
26215  fi
26216
26217
26218  if test "x$path" != "x$new_path"; then
26219    BOOT_JDK="$new_path"
26220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26221$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26222  fi
26223
26224    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26225
26226  path="$BOOT_JDK"
26227  has_colon=`$ECHO $path | $GREP ^.:`
26228  new_path="$path"
26229  if test "x$has_colon" = x; then
26230    # Not in mixed or Windows style, start by that.
26231    new_path=`cmd //c echo $path`
26232  fi
26233
26234
26235  input_path="$new_path"
26236  # Check if we need to convert this using DOS-style short mode. If the path
26237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26238  # take no chances and rewrite it.
26239  # Note: m4 eats our [], so we need to use [ and ] instead.
26240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26241  if test "x$has_forbidden_chars" != x; then
26242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26244  fi
26245
26246
26247  windows_path="$new_path"
26248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26249    unix_path=`$CYGPATH -u "$windows_path"`
26250    new_path="$unix_path"
26251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26253    new_path="$unix_path"
26254  fi
26255
26256  if test "x$path" != "x$new_path"; then
26257    BOOT_JDK="$new_path"
26258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26259$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26260  fi
26261
26262  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26263  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26264
26265    else
26266      # We're on a unix platform. Hooray! :)
26267      path="$BOOT_JDK"
26268      has_space=`$ECHO "$path" | $GREP " "`
26269      if test "x$has_space" != x; then
26270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26271$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26272        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26273      fi
26274
26275      # Use eval to expand a potential ~
26276      eval path="$path"
26277      if test ! -f "$path" && test ! -d "$path"; then
26278        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26279      fi
26280
26281      if test -d "$path"; then
26282        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26283      else
26284        dir="`$DIRNAME "$path"`"
26285        base="`$BASENAME "$path"`"
26286        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26287      fi
26288    fi
26289  fi
26290
26291            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26292$as_echo_n "checking for Boot JDK... " >&6; }
26293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26294$as_echo "$BOOT_JDK" >&6; }
26295            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26296$as_echo_n "checking Boot JDK version... " >&6; }
26297            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26298            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26299$as_echo "$BOOT_JDK_VERSION" >&6; }
26300          fi # end check jdk version
26301        fi # end check javac
26302      fi # end check java
26303    fi # end check boot jdk found
26304  fi
26305
26306    done
26307  fi
26308
26309  fi
26310
26311
26312    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26313    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26314      # Do we have a bin/java?
26315      if test ! -x "$BOOT_JDK/bin/java"; then
26316        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26318        BOOT_JDK_FOUND=no
26319      else
26320        # Do we have a bin/javac?
26321        if test ! -x "$BOOT_JDK/bin/javac"; then
26322          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26324          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26325$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26326          BOOT_JDK_FOUND=no
26327        else
26328          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26329          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26330
26331          # Extra M4 quote needed to protect [] in grep expression.
26332          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26333          if test "x$FOUND_CORRECT_VERSION" = x; then
26334            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26336            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26337$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26338            BOOT_JDK_FOUND=no
26339          else
26340            # We're done! :-)
26341            BOOT_JDK_FOUND=yes
26342
26343  # Only process if variable expands to non-empty
26344
26345  if test "x$BOOT_JDK" != x; then
26346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26347
26348  # Input might be given as Windows format, start by converting to
26349  # unix format.
26350  path="$BOOT_JDK"
26351  new_path=`$CYGPATH -u "$path"`
26352
26353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26356  # "foo.exe" is OK but "foo" is an error.
26357  #
26358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26359  # It is also a way to make sure we got the proper file name for the real test later on.
26360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26361  if test "x$test_shortpath" = x; then
26362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26364    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26365  fi
26366
26367  # Call helper function which possibly converts this using DOS-style short mode.
26368  # If so, the updated path is stored in $new_path.
26369
26370  input_path="$new_path"
26371  # Check if we need to convert this using DOS-style short mode. If the path
26372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26373  # take no chances and rewrite it.
26374  # Note: m4 eats our [], so we need to use [ and ] instead.
26375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26376  if test "x$has_forbidden_chars" != x; then
26377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26381      # Going to short mode and back again did indeed matter. Since short mode is
26382      # case insensitive, let's make it lowercase to improve readability.
26383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26384      # Now convert it back to Unix-style (cygpath)
26385      input_path=`$CYGPATH -u "$shortmode_path"`
26386      new_path="$input_path"
26387    fi
26388  fi
26389
26390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26391  if test "x$test_cygdrive_prefix" = x; then
26392    # As a simple fix, exclude /usr/bin since it's not a real path.
26393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26395      # a path prefixed by /cygdrive for fixpath to work.
26396      new_path="$CYGWIN_ROOT_PATH$input_path"
26397    fi
26398  fi
26399
26400
26401  if test "x$path" != "x$new_path"; then
26402    BOOT_JDK="$new_path"
26403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26405  fi
26406
26407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26408
26409  path="$BOOT_JDK"
26410  has_colon=`$ECHO $path | $GREP ^.:`
26411  new_path="$path"
26412  if test "x$has_colon" = x; then
26413    # Not in mixed or Windows style, start by that.
26414    new_path=`cmd //c echo $path`
26415  fi
26416
26417
26418  input_path="$new_path"
26419  # Check if we need to convert this using DOS-style short mode. If the path
26420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26421  # take no chances and rewrite it.
26422  # Note: m4 eats our [], so we need to use [ and ] instead.
26423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26424  if test "x$has_forbidden_chars" != x; then
26425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26427  fi
26428
26429
26430  windows_path="$new_path"
26431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26432    unix_path=`$CYGPATH -u "$windows_path"`
26433    new_path="$unix_path"
26434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26436    new_path="$unix_path"
26437  fi
26438
26439  if test "x$path" != "x$new_path"; then
26440    BOOT_JDK="$new_path"
26441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26442$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26443  fi
26444
26445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26447
26448    else
26449      # We're on a unix platform. Hooray! :)
26450      path="$BOOT_JDK"
26451      has_space=`$ECHO "$path" | $GREP " "`
26452      if test "x$has_space" != x; then
26453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26455        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26456      fi
26457
26458      # Use eval to expand a potential ~
26459      eval path="$path"
26460      if test ! -f "$path" && test ! -d "$path"; then
26461        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26462      fi
26463
26464      if test -d "$path"; then
26465        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26466      else
26467        dir="`$DIRNAME "$path"`"
26468        base="`$BASENAME "$path"`"
26469        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26470      fi
26471    fi
26472  fi
26473
26474            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26475$as_echo_n "checking for Boot JDK... " >&6; }
26476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26477$as_echo "$BOOT_JDK" >&6; }
26478            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26479$as_echo_n "checking Boot JDK version... " >&6; }
26480            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26482$as_echo "$BOOT_JDK_VERSION" >&6; }
26483          fi # end check jdk version
26484        fi # end check javac
26485      fi # end check java
26486    fi # end check boot jdk found
26487  fi
26488
26489
26490  if test "x$BOOT_JDK_FOUND" = xno; then
26491    # Now execute the test
26492
26493  if test "x$PROGRAMW6432" != x; then
26494    VIRTUAL_DIR="$PROGRAMW6432/Java"
26495
26496  windows_path="$VIRTUAL_DIR"
26497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26498    unix_path=`$CYGPATH -u "$windows_path"`
26499    VIRTUAL_DIR="$unix_path"
26500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26502    VIRTUAL_DIR="$unix_path"
26503  fi
26504
26505
26506  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26507  BOOT_JDK_SUFFIX=""
26508  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26509  if test "x$ALL_JDKS_FOUND" != x; then
26510    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26511
26512  if test "x$BOOT_JDK_FOUND" = xno; then
26513    # Now execute the test
26514
26515        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26516        if test -d "$BOOT_JDK"; then
26517          BOOT_JDK_FOUND=maybe
26518          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26519$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26520        fi
26521
26522
26523    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26524    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26525      # Do we have a bin/java?
26526      if test ! -x "$BOOT_JDK/bin/java"; then
26527        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26529        BOOT_JDK_FOUND=no
26530      else
26531        # Do we have a bin/javac?
26532        if test ! -x "$BOOT_JDK/bin/javac"; then
26533          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26535          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26536$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26537          BOOT_JDK_FOUND=no
26538        else
26539          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26540          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26541
26542          # Extra M4 quote needed to protect [] in grep expression.
26543          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26544          if test "x$FOUND_CORRECT_VERSION" = x; then
26545            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26547            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26548$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26549            BOOT_JDK_FOUND=no
26550          else
26551            # We're done! :-)
26552            BOOT_JDK_FOUND=yes
26553
26554  # Only process if variable expands to non-empty
26555
26556  if test "x$BOOT_JDK" != x; then
26557    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26558
26559  # Input might be given as Windows format, start by converting to
26560  # unix format.
26561  path="$BOOT_JDK"
26562  new_path=`$CYGPATH -u "$path"`
26563
26564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26567  # "foo.exe" is OK but "foo" is an error.
26568  #
26569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26570  # It is also a way to make sure we got the proper file name for the real test later on.
26571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26572  if test "x$test_shortpath" = x; then
26573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26574$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26575    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26576  fi
26577
26578  # Call helper function which possibly converts this using DOS-style short mode.
26579  # If so, the updated path is stored in $new_path.
26580
26581  input_path="$new_path"
26582  # Check if we need to convert this using DOS-style short mode. If the path
26583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26584  # take no chances and rewrite it.
26585  # Note: m4 eats our [], so we need to use [ and ] instead.
26586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26587  if test "x$has_forbidden_chars" != x; then
26588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26592      # Going to short mode and back again did indeed matter. Since short mode is
26593      # case insensitive, let's make it lowercase to improve readability.
26594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26595      # Now convert it back to Unix-style (cygpath)
26596      input_path=`$CYGPATH -u "$shortmode_path"`
26597      new_path="$input_path"
26598    fi
26599  fi
26600
26601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26602  if test "x$test_cygdrive_prefix" = x; then
26603    # As a simple fix, exclude /usr/bin since it's not a real path.
26604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26606      # a path prefixed by /cygdrive for fixpath to work.
26607      new_path="$CYGWIN_ROOT_PATH$input_path"
26608    fi
26609  fi
26610
26611
26612  if test "x$path" != "x$new_path"; then
26613    BOOT_JDK="$new_path"
26614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26615$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26616  fi
26617
26618    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26619
26620  path="$BOOT_JDK"
26621  has_colon=`$ECHO $path | $GREP ^.:`
26622  new_path="$path"
26623  if test "x$has_colon" = x; then
26624    # Not in mixed or Windows style, start by that.
26625    new_path=`cmd //c echo $path`
26626  fi
26627
26628
26629  input_path="$new_path"
26630  # Check if we need to convert this using DOS-style short mode. If the path
26631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26632  # take no chances and rewrite it.
26633  # Note: m4 eats our [], so we need to use [ and ] instead.
26634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26635  if test "x$has_forbidden_chars" != x; then
26636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26638  fi
26639
26640
26641  windows_path="$new_path"
26642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26643    unix_path=`$CYGPATH -u "$windows_path"`
26644    new_path="$unix_path"
26645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26647    new_path="$unix_path"
26648  fi
26649
26650  if test "x$path" != "x$new_path"; then
26651    BOOT_JDK="$new_path"
26652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26653$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26654  fi
26655
26656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26658
26659    else
26660      # We're on a unix platform. Hooray! :)
26661      path="$BOOT_JDK"
26662      has_space=`$ECHO "$path" | $GREP " "`
26663      if test "x$has_space" != x; then
26664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26665$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26666        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26667      fi
26668
26669      # Use eval to expand a potential ~
26670      eval path="$path"
26671      if test ! -f "$path" && test ! -d "$path"; then
26672        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26673      fi
26674
26675      if test -d "$path"; then
26676        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26677      else
26678        dir="`$DIRNAME "$path"`"
26679        base="`$BASENAME "$path"`"
26680        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26681      fi
26682    fi
26683  fi
26684
26685            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26686$as_echo_n "checking for Boot JDK... " >&6; }
26687            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26688$as_echo "$BOOT_JDK" >&6; }
26689            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26690$as_echo_n "checking Boot JDK version... " >&6; }
26691            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26692            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26693$as_echo "$BOOT_JDK_VERSION" >&6; }
26694          fi # end check jdk version
26695        fi # end check javac
26696      fi # end check java
26697    fi # end check boot jdk found
26698  fi
26699
26700    done
26701  fi
26702
26703  fi
26704
26705
26706    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26707    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26708      # Do we have a bin/java?
26709      if test ! -x "$BOOT_JDK/bin/java"; then
26710        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26712        BOOT_JDK_FOUND=no
26713      else
26714        # Do we have a bin/javac?
26715        if test ! -x "$BOOT_JDK/bin/javac"; then
26716          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26718          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26719$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26720          BOOT_JDK_FOUND=no
26721        else
26722          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26723          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26724
26725          # Extra M4 quote needed to protect [] in grep expression.
26726          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26727          if test "x$FOUND_CORRECT_VERSION" = x; then
26728            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26730            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26731$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26732            BOOT_JDK_FOUND=no
26733          else
26734            # We're done! :-)
26735            BOOT_JDK_FOUND=yes
26736
26737  # Only process if variable expands to non-empty
26738
26739  if test "x$BOOT_JDK" != x; then
26740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26741
26742  # Input might be given as Windows format, start by converting to
26743  # unix format.
26744  path="$BOOT_JDK"
26745  new_path=`$CYGPATH -u "$path"`
26746
26747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26750  # "foo.exe" is OK but "foo" is an error.
26751  #
26752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26753  # It is also a way to make sure we got the proper file name for the real test later on.
26754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26755  if test "x$test_shortpath" = x; then
26756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26758    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26759  fi
26760
26761  # Call helper function which possibly converts this using DOS-style short mode.
26762  # If so, the updated path is stored in $new_path.
26763
26764  input_path="$new_path"
26765  # Check if we need to convert this using DOS-style short mode. If the path
26766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26767  # take no chances and rewrite it.
26768  # Note: m4 eats our [], so we need to use [ and ] instead.
26769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26770  if test "x$has_forbidden_chars" != x; then
26771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26775      # Going to short mode and back again did indeed matter. Since short mode is
26776      # case insensitive, let's make it lowercase to improve readability.
26777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26778      # Now convert it back to Unix-style (cygpath)
26779      input_path=`$CYGPATH -u "$shortmode_path"`
26780      new_path="$input_path"
26781    fi
26782  fi
26783
26784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26785  if test "x$test_cygdrive_prefix" = x; then
26786    # As a simple fix, exclude /usr/bin since it's not a real path.
26787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26789      # a path prefixed by /cygdrive for fixpath to work.
26790      new_path="$CYGWIN_ROOT_PATH$input_path"
26791    fi
26792  fi
26793
26794
26795  if test "x$path" != "x$new_path"; then
26796    BOOT_JDK="$new_path"
26797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26799  fi
26800
26801    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26802
26803  path="$BOOT_JDK"
26804  has_colon=`$ECHO $path | $GREP ^.:`
26805  new_path="$path"
26806  if test "x$has_colon" = x; then
26807    # Not in mixed or Windows style, start by that.
26808    new_path=`cmd //c echo $path`
26809  fi
26810
26811
26812  input_path="$new_path"
26813  # Check if we need to convert this using DOS-style short mode. If the path
26814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26815  # take no chances and rewrite it.
26816  # Note: m4 eats our [], so we need to use [ and ] instead.
26817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26818  if test "x$has_forbidden_chars" != x; then
26819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26821  fi
26822
26823
26824  windows_path="$new_path"
26825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26826    unix_path=`$CYGPATH -u "$windows_path"`
26827    new_path="$unix_path"
26828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26830    new_path="$unix_path"
26831  fi
26832
26833  if test "x$path" != "x$new_path"; then
26834    BOOT_JDK="$new_path"
26835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26836$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26837  fi
26838
26839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26841
26842    else
26843      # We're on a unix platform. Hooray! :)
26844      path="$BOOT_JDK"
26845      has_space=`$ECHO "$path" | $GREP " "`
26846      if test "x$has_space" != x; then
26847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26849        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26850      fi
26851
26852      # Use eval to expand a potential ~
26853      eval path="$path"
26854      if test ! -f "$path" && test ! -d "$path"; then
26855        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26856      fi
26857
26858      if test -d "$path"; then
26859        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26860      else
26861        dir="`$DIRNAME "$path"`"
26862        base="`$BASENAME "$path"`"
26863        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26864      fi
26865    fi
26866  fi
26867
26868            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26869$as_echo_n "checking for Boot JDK... " >&6; }
26870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26871$as_echo "$BOOT_JDK" >&6; }
26872            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26873$as_echo_n "checking Boot JDK version... " >&6; }
26874            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26876$as_echo "$BOOT_JDK_VERSION" >&6; }
26877          fi # end check jdk version
26878        fi # end check javac
26879      fi # end check java
26880    fi # end check boot jdk found
26881  fi
26882
26883
26884  if test "x$BOOT_JDK_FOUND" = xno; then
26885    # Now execute the test
26886
26887  if test "x$PROGRAMFILES" != x; then
26888    VIRTUAL_DIR="$PROGRAMFILES/Java"
26889
26890  windows_path="$VIRTUAL_DIR"
26891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26892    unix_path=`$CYGPATH -u "$windows_path"`
26893    VIRTUAL_DIR="$unix_path"
26894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26896    VIRTUAL_DIR="$unix_path"
26897  fi
26898
26899
26900  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26901  BOOT_JDK_SUFFIX=""
26902  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26903  if test "x$ALL_JDKS_FOUND" != x; then
26904    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26905
26906  if test "x$BOOT_JDK_FOUND" = xno; then
26907    # Now execute the test
26908
26909        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26910        if test -d "$BOOT_JDK"; then
26911          BOOT_JDK_FOUND=maybe
26912          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26913$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26914        fi
26915
26916
26917    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26918    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26919      # Do we have a bin/java?
26920      if test ! -x "$BOOT_JDK/bin/java"; then
26921        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26922$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26923        BOOT_JDK_FOUND=no
26924      else
26925        # Do we have a bin/javac?
26926        if test ! -x "$BOOT_JDK/bin/javac"; then
26927          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26929          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26930$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26931          BOOT_JDK_FOUND=no
26932        else
26933          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26934          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26935
26936          # Extra M4 quote needed to protect [] in grep expression.
26937          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26938          if test "x$FOUND_CORRECT_VERSION" = x; then
26939            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26941            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26942$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26943            BOOT_JDK_FOUND=no
26944          else
26945            # We're done! :-)
26946            BOOT_JDK_FOUND=yes
26947
26948  # Only process if variable expands to non-empty
26949
26950  if test "x$BOOT_JDK" != x; then
26951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26952
26953  # Input might be given as Windows format, start by converting to
26954  # unix format.
26955  path="$BOOT_JDK"
26956  new_path=`$CYGPATH -u "$path"`
26957
26958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26961  # "foo.exe" is OK but "foo" is an error.
26962  #
26963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26964  # It is also a way to make sure we got the proper file name for the real test later on.
26965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26966  if test "x$test_shortpath" = x; then
26967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26968$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26969    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26970  fi
26971
26972  # Call helper function which possibly converts this using DOS-style short mode.
26973  # If so, the updated path is stored in $new_path.
26974
26975  input_path="$new_path"
26976  # Check if we need to convert this using DOS-style short mode. If the path
26977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26978  # take no chances and rewrite it.
26979  # Note: m4 eats our [], so we need to use [ and ] instead.
26980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26981  if test "x$has_forbidden_chars" != x; then
26982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26986      # Going to short mode and back again did indeed matter. Since short mode is
26987      # case insensitive, let's make it lowercase to improve readability.
26988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26989      # Now convert it back to Unix-style (cygpath)
26990      input_path=`$CYGPATH -u "$shortmode_path"`
26991      new_path="$input_path"
26992    fi
26993  fi
26994
26995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26996  if test "x$test_cygdrive_prefix" = x; then
26997    # As a simple fix, exclude /usr/bin since it's not a real path.
26998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27000      # a path prefixed by /cygdrive for fixpath to work.
27001      new_path="$CYGWIN_ROOT_PATH$input_path"
27002    fi
27003  fi
27004
27005
27006  if test "x$path" != "x$new_path"; then
27007    BOOT_JDK="$new_path"
27008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27009$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27010  fi
27011
27012    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27013
27014  path="$BOOT_JDK"
27015  has_colon=`$ECHO $path | $GREP ^.:`
27016  new_path="$path"
27017  if test "x$has_colon" = x; then
27018    # Not in mixed or Windows style, start by that.
27019    new_path=`cmd //c echo $path`
27020  fi
27021
27022
27023  input_path="$new_path"
27024  # Check if we need to convert this using DOS-style short mode. If the path
27025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27026  # take no chances and rewrite it.
27027  # Note: m4 eats our [], so we need to use [ and ] instead.
27028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27029  if test "x$has_forbidden_chars" != x; then
27030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27032  fi
27033
27034
27035  windows_path="$new_path"
27036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27037    unix_path=`$CYGPATH -u "$windows_path"`
27038    new_path="$unix_path"
27039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27041    new_path="$unix_path"
27042  fi
27043
27044  if test "x$path" != "x$new_path"; then
27045    BOOT_JDK="$new_path"
27046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27047$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27048  fi
27049
27050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27052
27053    else
27054      # We're on a unix platform. Hooray! :)
27055      path="$BOOT_JDK"
27056      has_space=`$ECHO "$path" | $GREP " "`
27057      if test "x$has_space" != x; then
27058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27059$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27060        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27061      fi
27062
27063      # Use eval to expand a potential ~
27064      eval path="$path"
27065      if test ! -f "$path" && test ! -d "$path"; then
27066        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27067      fi
27068
27069      if test -d "$path"; then
27070        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27071      else
27072        dir="`$DIRNAME "$path"`"
27073        base="`$BASENAME "$path"`"
27074        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27075      fi
27076    fi
27077  fi
27078
27079            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27080$as_echo_n "checking for Boot JDK... " >&6; }
27081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27082$as_echo "$BOOT_JDK" >&6; }
27083            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27084$as_echo_n "checking Boot JDK version... " >&6; }
27085            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27086            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27087$as_echo "$BOOT_JDK_VERSION" >&6; }
27088          fi # end check jdk version
27089        fi # end check javac
27090      fi # end check java
27091    fi # end check boot jdk found
27092  fi
27093
27094    done
27095  fi
27096
27097  fi
27098
27099
27100    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27101    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27102      # Do we have a bin/java?
27103      if test ! -x "$BOOT_JDK/bin/java"; then
27104        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27106        BOOT_JDK_FOUND=no
27107      else
27108        # Do we have a bin/javac?
27109        if test ! -x "$BOOT_JDK/bin/javac"; then
27110          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27112          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27113$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27114          BOOT_JDK_FOUND=no
27115        else
27116          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27117          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27118
27119          # Extra M4 quote needed to protect [] in grep expression.
27120          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27121          if test "x$FOUND_CORRECT_VERSION" = x; then
27122            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27124            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27125$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27126            BOOT_JDK_FOUND=no
27127          else
27128            # We're done! :-)
27129            BOOT_JDK_FOUND=yes
27130
27131  # Only process if variable expands to non-empty
27132
27133  if test "x$BOOT_JDK" != x; then
27134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27135
27136  # Input might be given as Windows format, start by converting to
27137  # unix format.
27138  path="$BOOT_JDK"
27139  new_path=`$CYGPATH -u "$path"`
27140
27141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27144  # "foo.exe" is OK but "foo" is an error.
27145  #
27146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27147  # It is also a way to make sure we got the proper file name for the real test later on.
27148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27149  if test "x$test_shortpath" = x; then
27150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27152    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27153  fi
27154
27155  # Call helper function which possibly converts this using DOS-style short mode.
27156  # If so, the updated path is stored in $new_path.
27157
27158  input_path="$new_path"
27159  # Check if we need to convert this using DOS-style short mode. If the path
27160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27161  # take no chances and rewrite it.
27162  # Note: m4 eats our [], so we need to use [ and ] instead.
27163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27164  if test "x$has_forbidden_chars" != x; then
27165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27169      # Going to short mode and back again did indeed matter. Since short mode is
27170      # case insensitive, let's make it lowercase to improve readability.
27171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27172      # Now convert it back to Unix-style (cygpath)
27173      input_path=`$CYGPATH -u "$shortmode_path"`
27174      new_path="$input_path"
27175    fi
27176  fi
27177
27178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27179  if test "x$test_cygdrive_prefix" = x; then
27180    # As a simple fix, exclude /usr/bin since it's not a real path.
27181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27183      # a path prefixed by /cygdrive for fixpath to work.
27184      new_path="$CYGWIN_ROOT_PATH$input_path"
27185    fi
27186  fi
27187
27188
27189  if test "x$path" != "x$new_path"; then
27190    BOOT_JDK="$new_path"
27191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27192$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27193  fi
27194
27195    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27196
27197  path="$BOOT_JDK"
27198  has_colon=`$ECHO $path | $GREP ^.:`
27199  new_path="$path"
27200  if test "x$has_colon" = x; then
27201    # Not in mixed or Windows style, start by that.
27202    new_path=`cmd //c echo $path`
27203  fi
27204
27205
27206  input_path="$new_path"
27207  # Check if we need to convert this using DOS-style short mode. If the path
27208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27209  # take no chances and rewrite it.
27210  # Note: m4 eats our [], so we need to use [ and ] instead.
27211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27212  if test "x$has_forbidden_chars" != x; then
27213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27215  fi
27216
27217
27218  windows_path="$new_path"
27219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27220    unix_path=`$CYGPATH -u "$windows_path"`
27221    new_path="$unix_path"
27222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27224    new_path="$unix_path"
27225  fi
27226
27227  if test "x$path" != "x$new_path"; then
27228    BOOT_JDK="$new_path"
27229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27230$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27231  fi
27232
27233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27235
27236    else
27237      # We're on a unix platform. Hooray! :)
27238      path="$BOOT_JDK"
27239      has_space=`$ECHO "$path" | $GREP " "`
27240      if test "x$has_space" != x; then
27241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27243        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27244      fi
27245
27246      # Use eval to expand a potential ~
27247      eval path="$path"
27248      if test ! -f "$path" && test ! -d "$path"; then
27249        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27250      fi
27251
27252      if test -d "$path"; then
27253        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27254      else
27255        dir="`$DIRNAME "$path"`"
27256        base="`$BASENAME "$path"`"
27257        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27258      fi
27259    fi
27260  fi
27261
27262            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27263$as_echo_n "checking for Boot JDK... " >&6; }
27264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27265$as_echo "$BOOT_JDK" >&6; }
27266            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27267$as_echo_n "checking Boot JDK version... " >&6; }
27268            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27270$as_echo "$BOOT_JDK_VERSION" >&6; }
27271          fi # end check jdk version
27272        fi # end check javac
27273      fi # end check java
27274    fi # end check boot jdk found
27275  fi
27276
27277
27278  if test "x$BOOT_JDK_FOUND" = xno; then
27279    # Now execute the test
27280
27281  if test "x$ProgramFiles" != x; then
27282    VIRTUAL_DIR="$ProgramFiles/Java"
27283
27284  windows_path="$VIRTUAL_DIR"
27285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27286    unix_path=`$CYGPATH -u "$windows_path"`
27287    VIRTUAL_DIR="$unix_path"
27288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27290    VIRTUAL_DIR="$unix_path"
27291  fi
27292
27293
27294  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27295  BOOT_JDK_SUFFIX=""
27296  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27297  if test "x$ALL_JDKS_FOUND" != x; then
27298    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27299
27300  if test "x$BOOT_JDK_FOUND" = xno; then
27301    # Now execute the test
27302
27303        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27304        if test -d "$BOOT_JDK"; then
27305          BOOT_JDK_FOUND=maybe
27306          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27307$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27308        fi
27309
27310
27311    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27312    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27313      # Do we have a bin/java?
27314      if test ! -x "$BOOT_JDK/bin/java"; then
27315        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27317        BOOT_JDK_FOUND=no
27318      else
27319        # Do we have a bin/javac?
27320        if test ! -x "$BOOT_JDK/bin/javac"; then
27321          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27323          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27324$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27325          BOOT_JDK_FOUND=no
27326        else
27327          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27328          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27329
27330          # Extra M4 quote needed to protect [] in grep expression.
27331          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27332          if test "x$FOUND_CORRECT_VERSION" = x; then
27333            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27335            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27336$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27337            BOOT_JDK_FOUND=no
27338          else
27339            # We're done! :-)
27340            BOOT_JDK_FOUND=yes
27341
27342  # Only process if variable expands to non-empty
27343
27344  if test "x$BOOT_JDK" != x; then
27345    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27346
27347  # Input might be given as Windows format, start by converting to
27348  # unix format.
27349  path="$BOOT_JDK"
27350  new_path=`$CYGPATH -u "$path"`
27351
27352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27355  # "foo.exe" is OK but "foo" is an error.
27356  #
27357  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27358  # It is also a way to make sure we got the proper file name for the real test later on.
27359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27360  if test "x$test_shortpath" = x; then
27361    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27362$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27363    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27364  fi
27365
27366  # Call helper function which possibly converts this using DOS-style short mode.
27367  # If so, the updated path is stored in $new_path.
27368
27369  input_path="$new_path"
27370  # Check if we need to convert this using DOS-style short mode. If the path
27371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27372  # take no chances and rewrite it.
27373  # Note: m4 eats our [], so we need to use [ and ] instead.
27374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27375  if test "x$has_forbidden_chars" != x; then
27376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27380      # Going to short mode and back again did indeed matter. Since short mode is
27381      # case insensitive, let's make it lowercase to improve readability.
27382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27383      # Now convert it back to Unix-style (cygpath)
27384      input_path=`$CYGPATH -u "$shortmode_path"`
27385      new_path="$input_path"
27386    fi
27387  fi
27388
27389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27390  if test "x$test_cygdrive_prefix" = x; then
27391    # As a simple fix, exclude /usr/bin since it's not a real path.
27392    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27394      # a path prefixed by /cygdrive for fixpath to work.
27395      new_path="$CYGWIN_ROOT_PATH$input_path"
27396    fi
27397  fi
27398
27399
27400  if test "x$path" != "x$new_path"; then
27401    BOOT_JDK="$new_path"
27402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27403$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27404  fi
27405
27406    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27407
27408  path="$BOOT_JDK"
27409  has_colon=`$ECHO $path | $GREP ^.:`
27410  new_path="$path"
27411  if test "x$has_colon" = x; then
27412    # Not in mixed or Windows style, start by that.
27413    new_path=`cmd //c echo $path`
27414  fi
27415
27416
27417  input_path="$new_path"
27418  # Check if we need to convert this using DOS-style short mode. If the path
27419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27420  # take no chances and rewrite it.
27421  # Note: m4 eats our [], so we need to use [ and ] instead.
27422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27423  if test "x$has_forbidden_chars" != x; then
27424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27426  fi
27427
27428
27429  windows_path="$new_path"
27430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27431    unix_path=`$CYGPATH -u "$windows_path"`
27432    new_path="$unix_path"
27433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27435    new_path="$unix_path"
27436  fi
27437
27438  if test "x$path" != "x$new_path"; then
27439    BOOT_JDK="$new_path"
27440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27441$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27442  fi
27443
27444  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27445  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27446
27447    else
27448      # We're on a unix platform. Hooray! :)
27449      path="$BOOT_JDK"
27450      has_space=`$ECHO "$path" | $GREP " "`
27451      if test "x$has_space" != x; then
27452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27453$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27454        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27455      fi
27456
27457      # Use eval to expand a potential ~
27458      eval path="$path"
27459      if test ! -f "$path" && test ! -d "$path"; then
27460        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27461      fi
27462
27463      if test -d "$path"; then
27464        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27465      else
27466        dir="`$DIRNAME "$path"`"
27467        base="`$BASENAME "$path"`"
27468        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27469      fi
27470    fi
27471  fi
27472
27473            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27474$as_echo_n "checking for Boot JDK... " >&6; }
27475            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27476$as_echo "$BOOT_JDK" >&6; }
27477            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27478$as_echo_n "checking Boot JDK version... " >&6; }
27479            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27480            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27481$as_echo "$BOOT_JDK_VERSION" >&6; }
27482          fi # end check jdk version
27483        fi # end check javac
27484      fi # end check java
27485    fi # end check boot jdk found
27486  fi
27487
27488    done
27489  fi
27490
27491  fi
27492
27493
27494    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27495    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27496      # Do we have a bin/java?
27497      if test ! -x "$BOOT_JDK/bin/java"; then
27498        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27500        BOOT_JDK_FOUND=no
27501      else
27502        # Do we have a bin/javac?
27503        if test ! -x "$BOOT_JDK/bin/javac"; then
27504          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27506          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27507$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27508          BOOT_JDK_FOUND=no
27509        else
27510          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27511          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27512
27513          # Extra M4 quote needed to protect [] in grep expression.
27514          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27515          if test "x$FOUND_CORRECT_VERSION" = x; then
27516            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27518            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27519$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27520            BOOT_JDK_FOUND=no
27521          else
27522            # We're done! :-)
27523            BOOT_JDK_FOUND=yes
27524
27525  # Only process if variable expands to non-empty
27526
27527  if test "x$BOOT_JDK" != x; then
27528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27529
27530  # Input might be given as Windows format, start by converting to
27531  # unix format.
27532  path="$BOOT_JDK"
27533  new_path=`$CYGPATH -u "$path"`
27534
27535  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27536  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27537  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27538  # "foo.exe" is OK but "foo" is an error.
27539  #
27540  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27541  # It is also a way to make sure we got the proper file name for the real test later on.
27542  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27543  if test "x$test_shortpath" = x; then
27544    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27545$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27546    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27547  fi
27548
27549  # Call helper function which possibly converts this using DOS-style short mode.
27550  # If so, the updated path is stored in $new_path.
27551
27552  input_path="$new_path"
27553  # Check if we need to convert this using DOS-style short mode. If the path
27554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27555  # take no chances and rewrite it.
27556  # Note: m4 eats our [], so we need to use [ and ] instead.
27557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27558  if test "x$has_forbidden_chars" != x; then
27559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27563      # Going to short mode and back again did indeed matter. Since short mode is
27564      # case insensitive, let's make it lowercase to improve readability.
27565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27566      # Now convert it back to Unix-style (cygpath)
27567      input_path=`$CYGPATH -u "$shortmode_path"`
27568      new_path="$input_path"
27569    fi
27570  fi
27571
27572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27573  if test "x$test_cygdrive_prefix" = x; then
27574    # As a simple fix, exclude /usr/bin since it's not a real path.
27575    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27577      # a path prefixed by /cygdrive for fixpath to work.
27578      new_path="$CYGWIN_ROOT_PATH$input_path"
27579    fi
27580  fi
27581
27582
27583  if test "x$path" != "x$new_path"; then
27584    BOOT_JDK="$new_path"
27585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27586$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27587  fi
27588
27589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27590
27591  path="$BOOT_JDK"
27592  has_colon=`$ECHO $path | $GREP ^.:`
27593  new_path="$path"
27594  if test "x$has_colon" = x; then
27595    # Not in mixed or Windows style, start by that.
27596    new_path=`cmd //c echo $path`
27597  fi
27598
27599
27600  input_path="$new_path"
27601  # Check if we need to convert this using DOS-style short mode. If the path
27602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27603  # take no chances and rewrite it.
27604  # Note: m4 eats our [], so we need to use [ and ] instead.
27605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27606  if test "x$has_forbidden_chars" != x; then
27607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27609  fi
27610
27611
27612  windows_path="$new_path"
27613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27614    unix_path=`$CYGPATH -u "$windows_path"`
27615    new_path="$unix_path"
27616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27618    new_path="$unix_path"
27619  fi
27620
27621  if test "x$path" != "x$new_path"; then
27622    BOOT_JDK="$new_path"
27623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27624$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27625  fi
27626
27627  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27628  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27629
27630    else
27631      # We're on a unix platform. Hooray! :)
27632      path="$BOOT_JDK"
27633      has_space=`$ECHO "$path" | $GREP " "`
27634      if test "x$has_space" != x; then
27635        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27636$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27637        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27638      fi
27639
27640      # Use eval to expand a potential ~
27641      eval path="$path"
27642      if test ! -f "$path" && test ! -d "$path"; then
27643        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27644      fi
27645
27646      if test -d "$path"; then
27647        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27648      else
27649        dir="`$DIRNAME "$path"`"
27650        base="`$BASENAME "$path"`"
27651        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27652      fi
27653    fi
27654  fi
27655
27656            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27657$as_echo_n "checking for Boot JDK... " >&6; }
27658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27659$as_echo "$BOOT_JDK" >&6; }
27660            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27661$as_echo_n "checking Boot JDK version... " >&6; }
27662            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27663            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27664$as_echo "$BOOT_JDK_VERSION" >&6; }
27665          fi # end check jdk version
27666        fi # end check javac
27667      fi # end check java
27668    fi # end check boot jdk found
27669  fi
27670
27671
27672  if test "x$BOOT_JDK_FOUND" = xno; then
27673    # Now execute the test
27674
27675  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27676  BOOT_JDK_SUFFIX=""
27677  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27678  if test "x$ALL_JDKS_FOUND" != x; then
27679    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27680
27681  if test "x$BOOT_JDK_FOUND" = xno; then
27682    # Now execute the test
27683
27684        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27685        if test -d "$BOOT_JDK"; then
27686          BOOT_JDK_FOUND=maybe
27687          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27688$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27689        fi
27690
27691
27692    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27693    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27694      # Do we have a bin/java?
27695      if test ! -x "$BOOT_JDK/bin/java"; then
27696        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27698        BOOT_JDK_FOUND=no
27699      else
27700        # Do we have a bin/javac?
27701        if test ! -x "$BOOT_JDK/bin/javac"; then
27702          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27704          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27705$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27706          BOOT_JDK_FOUND=no
27707        else
27708          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27709          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27710
27711          # Extra M4 quote needed to protect [] in grep expression.
27712          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27713          if test "x$FOUND_CORRECT_VERSION" = x; then
27714            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27716            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27717$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27718            BOOT_JDK_FOUND=no
27719          else
27720            # We're done! :-)
27721            BOOT_JDK_FOUND=yes
27722
27723  # Only process if variable expands to non-empty
27724
27725  if test "x$BOOT_JDK" != x; then
27726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27727
27728  # Input might be given as Windows format, start by converting to
27729  # unix format.
27730  path="$BOOT_JDK"
27731  new_path=`$CYGPATH -u "$path"`
27732
27733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27736  # "foo.exe" is OK but "foo" is an error.
27737  #
27738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27739  # It is also a way to make sure we got the proper file name for the real test later on.
27740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27741  if test "x$test_shortpath" = x; then
27742    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27744    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27745  fi
27746
27747  # Call helper function which possibly converts this using DOS-style short mode.
27748  # If so, the updated path is stored in $new_path.
27749
27750  input_path="$new_path"
27751  # Check if we need to convert this using DOS-style short mode. If the path
27752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27753  # take no chances and rewrite it.
27754  # Note: m4 eats our [], so we need to use [ and ] instead.
27755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27756  if test "x$has_forbidden_chars" != x; then
27757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27761      # Going to short mode and back again did indeed matter. Since short mode is
27762      # case insensitive, let's make it lowercase to improve readability.
27763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27764      # Now convert it back to Unix-style (cygpath)
27765      input_path=`$CYGPATH -u "$shortmode_path"`
27766      new_path="$input_path"
27767    fi
27768  fi
27769
27770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27771  if test "x$test_cygdrive_prefix" = x; then
27772    # As a simple fix, exclude /usr/bin since it's not a real path.
27773    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27775      # a path prefixed by /cygdrive for fixpath to work.
27776      new_path="$CYGWIN_ROOT_PATH$input_path"
27777    fi
27778  fi
27779
27780
27781  if test "x$path" != "x$new_path"; then
27782    BOOT_JDK="$new_path"
27783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27785  fi
27786
27787    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27788
27789  path="$BOOT_JDK"
27790  has_colon=`$ECHO $path | $GREP ^.:`
27791  new_path="$path"
27792  if test "x$has_colon" = x; then
27793    # Not in mixed or Windows style, start by that.
27794    new_path=`cmd //c echo $path`
27795  fi
27796
27797
27798  input_path="$new_path"
27799  # Check if we need to convert this using DOS-style short mode. If the path
27800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27801  # take no chances and rewrite it.
27802  # Note: m4 eats our [], so we need to use [ and ] instead.
27803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27804  if test "x$has_forbidden_chars" != x; then
27805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27807  fi
27808
27809
27810  windows_path="$new_path"
27811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27812    unix_path=`$CYGPATH -u "$windows_path"`
27813    new_path="$unix_path"
27814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27816    new_path="$unix_path"
27817  fi
27818
27819  if test "x$path" != "x$new_path"; then
27820    BOOT_JDK="$new_path"
27821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27822$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27823  fi
27824
27825  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27826  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27827
27828    else
27829      # We're on a unix platform. Hooray! :)
27830      path="$BOOT_JDK"
27831      has_space=`$ECHO "$path" | $GREP " "`
27832      if test "x$has_space" != x; then
27833        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27834$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27835        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27836      fi
27837
27838      # Use eval to expand a potential ~
27839      eval path="$path"
27840      if test ! -f "$path" && test ! -d "$path"; then
27841        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27842      fi
27843
27844      if test -d "$path"; then
27845        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27846      else
27847        dir="`$DIRNAME "$path"`"
27848        base="`$BASENAME "$path"`"
27849        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27850      fi
27851    fi
27852  fi
27853
27854            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27855$as_echo_n "checking for Boot JDK... " >&6; }
27856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27857$as_echo "$BOOT_JDK" >&6; }
27858            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27859$as_echo_n "checking Boot JDK version... " >&6; }
27860            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27862$as_echo "$BOOT_JDK_VERSION" >&6; }
27863          fi # end check jdk version
27864        fi # end check javac
27865      fi # end check java
27866    fi # end check boot jdk found
27867  fi
27868
27869    done
27870  fi
27871
27872
27873    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27874    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27875      # Do we have a bin/java?
27876      if test ! -x "$BOOT_JDK/bin/java"; then
27877        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27879        BOOT_JDK_FOUND=no
27880      else
27881        # Do we have a bin/javac?
27882        if test ! -x "$BOOT_JDK/bin/javac"; then
27883          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27885          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27886$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27887          BOOT_JDK_FOUND=no
27888        else
27889          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27890          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27891
27892          # Extra M4 quote needed to protect [] in grep expression.
27893          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27894          if test "x$FOUND_CORRECT_VERSION" = x; then
27895            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27896$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27897            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27898$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27899            BOOT_JDK_FOUND=no
27900          else
27901            # We're done! :-)
27902            BOOT_JDK_FOUND=yes
27903
27904  # Only process if variable expands to non-empty
27905
27906  if test "x$BOOT_JDK" != x; then
27907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27908
27909  # Input might be given as Windows format, start by converting to
27910  # unix format.
27911  path="$BOOT_JDK"
27912  new_path=`$CYGPATH -u "$path"`
27913
27914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27917  # "foo.exe" is OK but "foo" is an error.
27918  #
27919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27920  # It is also a way to make sure we got the proper file name for the real test later on.
27921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27922  if test "x$test_shortpath" = x; then
27923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27925    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27926  fi
27927
27928  # Call helper function which possibly converts this using DOS-style short mode.
27929  # If so, the updated path is stored in $new_path.
27930
27931  input_path="$new_path"
27932  # Check if we need to convert this using DOS-style short mode. If the path
27933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27934  # take no chances and rewrite it.
27935  # Note: m4 eats our [], so we need to use [ and ] instead.
27936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27937  if test "x$has_forbidden_chars" != x; then
27938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27942      # Going to short mode and back again did indeed matter. Since short mode is
27943      # case insensitive, let's make it lowercase to improve readability.
27944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27945      # Now convert it back to Unix-style (cygpath)
27946      input_path=`$CYGPATH -u "$shortmode_path"`
27947      new_path="$input_path"
27948    fi
27949  fi
27950
27951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27952  if test "x$test_cygdrive_prefix" = x; then
27953    # As a simple fix, exclude /usr/bin since it's not a real path.
27954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27956      # a path prefixed by /cygdrive for fixpath to work.
27957      new_path="$CYGWIN_ROOT_PATH$input_path"
27958    fi
27959  fi
27960
27961
27962  if test "x$path" != "x$new_path"; then
27963    BOOT_JDK="$new_path"
27964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27966  fi
27967
27968    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27969
27970  path="$BOOT_JDK"
27971  has_colon=`$ECHO $path | $GREP ^.:`
27972  new_path="$path"
27973  if test "x$has_colon" = x; then
27974    # Not in mixed or Windows style, start by that.
27975    new_path=`cmd //c echo $path`
27976  fi
27977
27978
27979  input_path="$new_path"
27980  # Check if we need to convert this using DOS-style short mode. If the path
27981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27982  # take no chances and rewrite it.
27983  # Note: m4 eats our [], so we need to use [ and ] instead.
27984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27985  if test "x$has_forbidden_chars" != x; then
27986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27988  fi
27989
27990
27991  windows_path="$new_path"
27992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27993    unix_path=`$CYGPATH -u "$windows_path"`
27994    new_path="$unix_path"
27995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27997    new_path="$unix_path"
27998  fi
27999
28000  if test "x$path" != "x$new_path"; then
28001    BOOT_JDK="$new_path"
28002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28004  fi
28005
28006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28008
28009    else
28010      # We're on a unix platform. Hooray! :)
28011      path="$BOOT_JDK"
28012      has_space=`$ECHO "$path" | $GREP " "`
28013      if test "x$has_space" != x; then
28014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28015$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28016        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28017      fi
28018
28019      # Use eval to expand a potential ~
28020      eval path="$path"
28021      if test ! -f "$path" && test ! -d "$path"; then
28022        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28023      fi
28024
28025      if test -d "$path"; then
28026        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28027      else
28028        dir="`$DIRNAME "$path"`"
28029        base="`$BASENAME "$path"`"
28030        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28031      fi
28032    fi
28033  fi
28034
28035            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28036$as_echo_n "checking for Boot JDK... " >&6; }
28037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28038$as_echo "$BOOT_JDK" >&6; }
28039            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28040$as_echo_n "checking Boot JDK version... " >&6; }
28041            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28042            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28043$as_echo "$BOOT_JDK_VERSION" >&6; }
28044          fi # end check jdk version
28045        fi # end check javac
28046      fi # end check java
28047    fi # end check boot jdk found
28048  fi
28049
28050  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28051
28052  if test "x$BOOT_JDK_FOUND" = xno; then
28053    # Now execute the test
28054
28055  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28056  BOOT_JDK_SUFFIX="/Contents/Home"
28057  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28058  if test "x$ALL_JDKS_FOUND" != x; then
28059    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28060
28061  if test "x$BOOT_JDK_FOUND" = xno; then
28062    # Now execute the test
28063
28064        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28065        if test -d "$BOOT_JDK"; then
28066          BOOT_JDK_FOUND=maybe
28067          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28068$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28069        fi
28070
28071
28072    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28073    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28074      # Do we have a bin/java?
28075      if test ! -x "$BOOT_JDK/bin/java"; then
28076        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28078        BOOT_JDK_FOUND=no
28079      else
28080        # Do we have a bin/javac?
28081        if test ! -x "$BOOT_JDK/bin/javac"; then
28082          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28083$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28084          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28085$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28086          BOOT_JDK_FOUND=no
28087        else
28088          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28089          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28090
28091          # Extra M4 quote needed to protect [] in grep expression.
28092          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28093          if test "x$FOUND_CORRECT_VERSION" = x; then
28094            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28096            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28097$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28098            BOOT_JDK_FOUND=no
28099          else
28100            # We're done! :-)
28101            BOOT_JDK_FOUND=yes
28102
28103  # Only process if variable expands to non-empty
28104
28105  if test "x$BOOT_JDK" != x; then
28106    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28107
28108  # Input might be given as Windows format, start by converting to
28109  # unix format.
28110  path="$BOOT_JDK"
28111  new_path=`$CYGPATH -u "$path"`
28112
28113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28116  # "foo.exe" is OK but "foo" is an error.
28117  #
28118  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28119  # It is also a way to make sure we got the proper file name for the real test later on.
28120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28121  if test "x$test_shortpath" = x; then
28122    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28123$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28124    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28125  fi
28126
28127  # Call helper function which possibly converts this using DOS-style short mode.
28128  # If so, the updated path is stored in $new_path.
28129
28130  input_path="$new_path"
28131  # Check if we need to convert this using DOS-style short mode. If the path
28132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28133  # take no chances and rewrite it.
28134  # Note: m4 eats our [], so we need to use [ and ] instead.
28135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28136  if test "x$has_forbidden_chars" != x; then
28137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28141      # Going to short mode and back again did indeed matter. Since short mode is
28142      # case insensitive, let's make it lowercase to improve readability.
28143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28144      # Now convert it back to Unix-style (cygpath)
28145      input_path=`$CYGPATH -u "$shortmode_path"`
28146      new_path="$input_path"
28147    fi
28148  fi
28149
28150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28151  if test "x$test_cygdrive_prefix" = x; then
28152    # As a simple fix, exclude /usr/bin since it's not a real path.
28153    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28155      # a path prefixed by /cygdrive for fixpath to work.
28156      new_path="$CYGWIN_ROOT_PATH$input_path"
28157    fi
28158  fi
28159
28160
28161  if test "x$path" != "x$new_path"; then
28162    BOOT_JDK="$new_path"
28163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28164$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28165  fi
28166
28167    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28168
28169  path="$BOOT_JDK"
28170  has_colon=`$ECHO $path | $GREP ^.:`
28171  new_path="$path"
28172  if test "x$has_colon" = x; then
28173    # Not in mixed or Windows style, start by that.
28174    new_path=`cmd //c echo $path`
28175  fi
28176
28177
28178  input_path="$new_path"
28179  # Check if we need to convert this using DOS-style short mode. If the path
28180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28181  # take no chances and rewrite it.
28182  # Note: m4 eats our [], so we need to use [ and ] instead.
28183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28184  if test "x$has_forbidden_chars" != x; then
28185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28186    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28187  fi
28188
28189
28190  windows_path="$new_path"
28191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28192    unix_path=`$CYGPATH -u "$windows_path"`
28193    new_path="$unix_path"
28194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28196    new_path="$unix_path"
28197  fi
28198
28199  if test "x$path" != "x$new_path"; then
28200    BOOT_JDK="$new_path"
28201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28202$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28203  fi
28204
28205  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28206  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28207
28208    else
28209      # We're on a unix platform. Hooray! :)
28210      path="$BOOT_JDK"
28211      has_space=`$ECHO "$path" | $GREP " "`
28212      if test "x$has_space" != x; then
28213        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28214$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28215        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28216      fi
28217
28218      # Use eval to expand a potential ~
28219      eval path="$path"
28220      if test ! -f "$path" && test ! -d "$path"; then
28221        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28222      fi
28223
28224      if test -d "$path"; then
28225        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28226      else
28227        dir="`$DIRNAME "$path"`"
28228        base="`$BASENAME "$path"`"
28229        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28230      fi
28231    fi
28232  fi
28233
28234            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28235$as_echo_n "checking for Boot JDK... " >&6; }
28236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28237$as_echo "$BOOT_JDK" >&6; }
28238            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28239$as_echo_n "checking Boot JDK version... " >&6; }
28240            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28242$as_echo "$BOOT_JDK_VERSION" >&6; }
28243          fi # end check jdk version
28244        fi # end check javac
28245      fi # end check java
28246    fi # end check boot jdk found
28247  fi
28248
28249    done
28250  fi
28251
28252
28253    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28254    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28255      # Do we have a bin/java?
28256      if test ! -x "$BOOT_JDK/bin/java"; then
28257        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28259        BOOT_JDK_FOUND=no
28260      else
28261        # Do we have a bin/javac?
28262        if test ! -x "$BOOT_JDK/bin/javac"; then
28263          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28265          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28266$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28267          BOOT_JDK_FOUND=no
28268        else
28269          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28270          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28271
28272          # Extra M4 quote needed to protect [] in grep expression.
28273          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28274          if test "x$FOUND_CORRECT_VERSION" = x; then
28275            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28277            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28278$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28279            BOOT_JDK_FOUND=no
28280          else
28281            # We're done! :-)
28282            BOOT_JDK_FOUND=yes
28283
28284  # Only process if variable expands to non-empty
28285
28286  if test "x$BOOT_JDK" != x; then
28287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28288
28289  # Input might be given as Windows format, start by converting to
28290  # unix format.
28291  path="$BOOT_JDK"
28292  new_path=`$CYGPATH -u "$path"`
28293
28294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28297  # "foo.exe" is OK but "foo" is an error.
28298  #
28299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28300  # It is also a way to make sure we got the proper file name for the real test later on.
28301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28302  if test "x$test_shortpath" = x; then
28303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28305    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28306  fi
28307
28308  # Call helper function which possibly converts this using DOS-style short mode.
28309  # If so, the updated path is stored in $new_path.
28310
28311  input_path="$new_path"
28312  # Check if we need to convert this using DOS-style short mode. If the path
28313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28314  # take no chances and rewrite it.
28315  # Note: m4 eats our [], so we need to use [ and ] instead.
28316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28317  if test "x$has_forbidden_chars" != x; then
28318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28322      # Going to short mode and back again did indeed matter. Since short mode is
28323      # case insensitive, let's make it lowercase to improve readability.
28324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28325      # Now convert it back to Unix-style (cygpath)
28326      input_path=`$CYGPATH -u "$shortmode_path"`
28327      new_path="$input_path"
28328    fi
28329  fi
28330
28331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28332  if test "x$test_cygdrive_prefix" = x; then
28333    # As a simple fix, exclude /usr/bin since it's not a real path.
28334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28336      # a path prefixed by /cygdrive for fixpath to work.
28337      new_path="$CYGWIN_ROOT_PATH$input_path"
28338    fi
28339  fi
28340
28341
28342  if test "x$path" != "x$new_path"; then
28343    BOOT_JDK="$new_path"
28344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28345$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28346  fi
28347
28348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28349
28350  path="$BOOT_JDK"
28351  has_colon=`$ECHO $path | $GREP ^.:`
28352  new_path="$path"
28353  if test "x$has_colon" = x; then
28354    # Not in mixed or Windows style, start by that.
28355    new_path=`cmd //c echo $path`
28356  fi
28357
28358
28359  input_path="$new_path"
28360  # Check if we need to convert this using DOS-style short mode. If the path
28361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28362  # take no chances and rewrite it.
28363  # Note: m4 eats our [], so we need to use [ and ] instead.
28364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28365  if test "x$has_forbidden_chars" != x; then
28366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28368  fi
28369
28370
28371  windows_path="$new_path"
28372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28373    unix_path=`$CYGPATH -u "$windows_path"`
28374    new_path="$unix_path"
28375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28377    new_path="$unix_path"
28378  fi
28379
28380  if test "x$path" != "x$new_path"; then
28381    BOOT_JDK="$new_path"
28382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28383$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28384  fi
28385
28386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28388
28389    else
28390      # We're on a unix platform. Hooray! :)
28391      path="$BOOT_JDK"
28392      has_space=`$ECHO "$path" | $GREP " "`
28393      if test "x$has_space" != x; then
28394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28396        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28397      fi
28398
28399      # Use eval to expand a potential ~
28400      eval path="$path"
28401      if test ! -f "$path" && test ! -d "$path"; then
28402        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28403      fi
28404
28405      if test -d "$path"; then
28406        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28407      else
28408        dir="`$DIRNAME "$path"`"
28409        base="`$BASENAME "$path"`"
28410        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28411      fi
28412    fi
28413  fi
28414
28415            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28416$as_echo_n "checking for Boot JDK... " >&6; }
28417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28418$as_echo "$BOOT_JDK" >&6; }
28419            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28420$as_echo_n "checking Boot JDK version... " >&6; }
28421            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28423$as_echo "$BOOT_JDK_VERSION" >&6; }
28424          fi # end check jdk version
28425        fi # end check javac
28426      fi # end check java
28427    fi # end check boot jdk found
28428  fi
28429
28430
28431  if test "x$BOOT_JDK_FOUND" = xno; then
28432    # Now execute the test
28433
28434  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28435  BOOT_JDK_SUFFIX="/Contents/Home"
28436  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28437  if test "x$ALL_JDKS_FOUND" != x; then
28438    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28439
28440  if test "x$BOOT_JDK_FOUND" = xno; then
28441    # Now execute the test
28442
28443        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28444        if test -d "$BOOT_JDK"; then
28445          BOOT_JDK_FOUND=maybe
28446          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28447$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28448        fi
28449
28450
28451    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28452    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28453      # Do we have a bin/java?
28454      if test ! -x "$BOOT_JDK/bin/java"; then
28455        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28456$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28457        BOOT_JDK_FOUND=no
28458      else
28459        # Do we have a bin/javac?
28460        if test ! -x "$BOOT_JDK/bin/javac"; then
28461          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28462$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28463          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28464$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28465          BOOT_JDK_FOUND=no
28466        else
28467          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28468          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28469
28470          # Extra M4 quote needed to protect [] in grep expression.
28471          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28472          if test "x$FOUND_CORRECT_VERSION" = x; then
28473            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28475            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28476$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28477            BOOT_JDK_FOUND=no
28478          else
28479            # We're done! :-)
28480            BOOT_JDK_FOUND=yes
28481
28482  # Only process if variable expands to non-empty
28483
28484  if test "x$BOOT_JDK" != x; then
28485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28486
28487  # Input might be given as Windows format, start by converting to
28488  # unix format.
28489  path="$BOOT_JDK"
28490  new_path=`$CYGPATH -u "$path"`
28491
28492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28495  # "foo.exe" is OK but "foo" is an error.
28496  #
28497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28498  # It is also a way to make sure we got the proper file name for the real test later on.
28499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28500  if test "x$test_shortpath" = x; then
28501    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28502$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28503    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28504  fi
28505
28506  # Call helper function which possibly converts this using DOS-style short mode.
28507  # If so, the updated path is stored in $new_path.
28508
28509  input_path="$new_path"
28510  # Check if we need to convert this using DOS-style short mode. If the path
28511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28512  # take no chances and rewrite it.
28513  # Note: m4 eats our [], so we need to use [ and ] instead.
28514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28515  if test "x$has_forbidden_chars" != x; then
28516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28520      # Going to short mode and back again did indeed matter. Since short mode is
28521      # case insensitive, let's make it lowercase to improve readability.
28522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28523      # Now convert it back to Unix-style (cygpath)
28524      input_path=`$CYGPATH -u "$shortmode_path"`
28525      new_path="$input_path"
28526    fi
28527  fi
28528
28529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28530  if test "x$test_cygdrive_prefix" = x; then
28531    # As a simple fix, exclude /usr/bin since it's not a real path.
28532    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28534      # a path prefixed by /cygdrive for fixpath to work.
28535      new_path="$CYGWIN_ROOT_PATH$input_path"
28536    fi
28537  fi
28538
28539
28540  if test "x$path" != "x$new_path"; then
28541    BOOT_JDK="$new_path"
28542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28543$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28544  fi
28545
28546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28547
28548  path="$BOOT_JDK"
28549  has_colon=`$ECHO $path | $GREP ^.:`
28550  new_path="$path"
28551  if test "x$has_colon" = x; then
28552    # Not in mixed or Windows style, start by that.
28553    new_path=`cmd //c echo $path`
28554  fi
28555
28556
28557  input_path="$new_path"
28558  # Check if we need to convert this using DOS-style short mode. If the path
28559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28560  # take no chances and rewrite it.
28561  # Note: m4 eats our [], so we need to use [ and ] instead.
28562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28563  if test "x$has_forbidden_chars" != x; then
28564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28566  fi
28567
28568
28569  windows_path="$new_path"
28570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28571    unix_path=`$CYGPATH -u "$windows_path"`
28572    new_path="$unix_path"
28573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28575    new_path="$unix_path"
28576  fi
28577
28578  if test "x$path" != "x$new_path"; then
28579    BOOT_JDK="$new_path"
28580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28582  fi
28583
28584  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28585  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28586
28587    else
28588      # We're on a unix platform. Hooray! :)
28589      path="$BOOT_JDK"
28590      has_space=`$ECHO "$path" | $GREP " "`
28591      if test "x$has_space" != x; then
28592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28593$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28594        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28595      fi
28596
28597      # Use eval to expand a potential ~
28598      eval path="$path"
28599      if test ! -f "$path" && test ! -d "$path"; then
28600        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28601      fi
28602
28603      if test -d "$path"; then
28604        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28605      else
28606        dir="`$DIRNAME "$path"`"
28607        base="`$BASENAME "$path"`"
28608        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28609      fi
28610    fi
28611  fi
28612
28613            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28614$as_echo_n "checking for Boot JDK... " >&6; }
28615            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28616$as_echo "$BOOT_JDK" >&6; }
28617            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28618$as_echo_n "checking Boot JDK version... " >&6; }
28619            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28620            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28621$as_echo "$BOOT_JDK_VERSION" >&6; }
28622          fi # end check jdk version
28623        fi # end check javac
28624      fi # end check java
28625    fi # end check boot jdk found
28626  fi
28627
28628    done
28629  fi
28630
28631
28632    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28633    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28634      # Do we have a bin/java?
28635      if test ! -x "$BOOT_JDK/bin/java"; then
28636        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28638        BOOT_JDK_FOUND=no
28639      else
28640        # Do we have a bin/javac?
28641        if test ! -x "$BOOT_JDK/bin/javac"; then
28642          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28643$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28644          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28645$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28646          BOOT_JDK_FOUND=no
28647        else
28648          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28649          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28650
28651          # Extra M4 quote needed to protect [] in grep expression.
28652          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28653          if test "x$FOUND_CORRECT_VERSION" = x; then
28654            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28656            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28657$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28658            BOOT_JDK_FOUND=no
28659          else
28660            # We're done! :-)
28661            BOOT_JDK_FOUND=yes
28662
28663  # Only process if variable expands to non-empty
28664
28665  if test "x$BOOT_JDK" != x; then
28666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28667
28668  # Input might be given as Windows format, start by converting to
28669  # unix format.
28670  path="$BOOT_JDK"
28671  new_path=`$CYGPATH -u "$path"`
28672
28673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28676  # "foo.exe" is OK but "foo" is an error.
28677  #
28678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28679  # It is also a way to make sure we got the proper file name for the real test later on.
28680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28681  if test "x$test_shortpath" = x; then
28682    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28683$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28684    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28685  fi
28686
28687  # Call helper function which possibly converts this using DOS-style short mode.
28688  # If so, the updated path is stored in $new_path.
28689
28690  input_path="$new_path"
28691  # Check if we need to convert this using DOS-style short mode. If the path
28692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28693  # take no chances and rewrite it.
28694  # Note: m4 eats our [], so we need to use [ and ] instead.
28695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28696  if test "x$has_forbidden_chars" != x; then
28697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28701      # Going to short mode and back again did indeed matter. Since short mode is
28702      # case insensitive, let's make it lowercase to improve readability.
28703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28704      # Now convert it back to Unix-style (cygpath)
28705      input_path=`$CYGPATH -u "$shortmode_path"`
28706      new_path="$input_path"
28707    fi
28708  fi
28709
28710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28711  if test "x$test_cygdrive_prefix" = x; then
28712    # As a simple fix, exclude /usr/bin since it's not a real path.
28713    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28715      # a path prefixed by /cygdrive for fixpath to work.
28716      new_path="$CYGWIN_ROOT_PATH$input_path"
28717    fi
28718  fi
28719
28720
28721  if test "x$path" != "x$new_path"; then
28722    BOOT_JDK="$new_path"
28723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28724$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28725  fi
28726
28727    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28728
28729  path="$BOOT_JDK"
28730  has_colon=`$ECHO $path | $GREP ^.:`
28731  new_path="$path"
28732  if test "x$has_colon" = x; then
28733    # Not in mixed or Windows style, start by that.
28734    new_path=`cmd //c echo $path`
28735  fi
28736
28737
28738  input_path="$new_path"
28739  # Check if we need to convert this using DOS-style short mode. If the path
28740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28741  # take no chances and rewrite it.
28742  # Note: m4 eats our [], so we need to use [ and ] instead.
28743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28744  if test "x$has_forbidden_chars" != x; then
28745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28747  fi
28748
28749
28750  windows_path="$new_path"
28751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28752    unix_path=`$CYGPATH -u "$windows_path"`
28753    new_path="$unix_path"
28754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28756    new_path="$unix_path"
28757  fi
28758
28759  if test "x$path" != "x$new_path"; then
28760    BOOT_JDK="$new_path"
28761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28762$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28763  fi
28764
28765  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28766  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28767
28768    else
28769      # We're on a unix platform. Hooray! :)
28770      path="$BOOT_JDK"
28771      has_space=`$ECHO "$path" | $GREP " "`
28772      if test "x$has_space" != x; then
28773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28774$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28775        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28776      fi
28777
28778      # Use eval to expand a potential ~
28779      eval path="$path"
28780      if test ! -f "$path" && test ! -d "$path"; then
28781        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28782      fi
28783
28784      if test -d "$path"; then
28785        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28786      else
28787        dir="`$DIRNAME "$path"`"
28788        base="`$BASENAME "$path"`"
28789        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28790      fi
28791    fi
28792  fi
28793
28794            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28795$as_echo_n "checking for Boot JDK... " >&6; }
28796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28797$as_echo "$BOOT_JDK" >&6; }
28798            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28799$as_echo_n "checking Boot JDK version... " >&6; }
28800            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28801            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28802$as_echo "$BOOT_JDK_VERSION" >&6; }
28803          fi # end check jdk version
28804        fi # end check javac
28805      fi # end check java
28806    fi # end check boot jdk found
28807  fi
28808
28809  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28810
28811  if test "x$BOOT_JDK_FOUND" = xno; then
28812    # Now execute the test
28813
28814  BOOT_JDK_PREFIX="/usr/lib/jvm"
28815  BOOT_JDK_SUFFIX=""
28816  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28817  if test "x$ALL_JDKS_FOUND" != x; then
28818    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28819
28820  if test "x$BOOT_JDK_FOUND" = xno; then
28821    # Now execute the test
28822
28823        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28824        if test -d "$BOOT_JDK"; then
28825          BOOT_JDK_FOUND=maybe
28826          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28827$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28828        fi
28829
28830
28831    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28832    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28833      # Do we have a bin/java?
28834      if test ! -x "$BOOT_JDK/bin/java"; then
28835        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28837        BOOT_JDK_FOUND=no
28838      else
28839        # Do we have a bin/javac?
28840        if test ! -x "$BOOT_JDK/bin/javac"; then
28841          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28843          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28844$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28845          BOOT_JDK_FOUND=no
28846        else
28847          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28848          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28849
28850          # Extra M4 quote needed to protect [] in grep expression.
28851          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28852          if test "x$FOUND_CORRECT_VERSION" = x; then
28853            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28855            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28856$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28857            BOOT_JDK_FOUND=no
28858          else
28859            # We're done! :-)
28860            BOOT_JDK_FOUND=yes
28861
28862  # Only process if variable expands to non-empty
28863
28864  if test "x$BOOT_JDK" != x; then
28865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28866
28867  # Input might be given as Windows format, start by converting to
28868  # unix format.
28869  path="$BOOT_JDK"
28870  new_path=`$CYGPATH -u "$path"`
28871
28872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28875  # "foo.exe" is OK but "foo" is an error.
28876  #
28877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28878  # It is also a way to make sure we got the proper file name for the real test later on.
28879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28880  if test "x$test_shortpath" = x; then
28881    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28882$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28883    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28884  fi
28885
28886  # Call helper function which possibly converts this using DOS-style short mode.
28887  # If so, the updated path is stored in $new_path.
28888
28889  input_path="$new_path"
28890  # Check if we need to convert this using DOS-style short mode. If the path
28891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28892  # take no chances and rewrite it.
28893  # Note: m4 eats our [], so we need to use [ and ] instead.
28894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28895  if test "x$has_forbidden_chars" != x; then
28896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28900      # Going to short mode and back again did indeed matter. Since short mode is
28901      # case insensitive, let's make it lowercase to improve readability.
28902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28903      # Now convert it back to Unix-style (cygpath)
28904      input_path=`$CYGPATH -u "$shortmode_path"`
28905      new_path="$input_path"
28906    fi
28907  fi
28908
28909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28910  if test "x$test_cygdrive_prefix" = x; then
28911    # As a simple fix, exclude /usr/bin since it's not a real path.
28912    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28914      # a path prefixed by /cygdrive for fixpath to work.
28915      new_path="$CYGWIN_ROOT_PATH$input_path"
28916    fi
28917  fi
28918
28919
28920  if test "x$path" != "x$new_path"; then
28921    BOOT_JDK="$new_path"
28922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28923$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28924  fi
28925
28926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28927
28928  path="$BOOT_JDK"
28929  has_colon=`$ECHO $path | $GREP ^.:`
28930  new_path="$path"
28931  if test "x$has_colon" = x; then
28932    # Not in mixed or Windows style, start by that.
28933    new_path=`cmd //c echo $path`
28934  fi
28935
28936
28937  input_path="$new_path"
28938  # Check if we need to convert this using DOS-style short mode. If the path
28939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28940  # take no chances and rewrite it.
28941  # Note: m4 eats our [], so we need to use [ and ] instead.
28942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28943  if test "x$has_forbidden_chars" != x; then
28944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28946  fi
28947
28948
28949  windows_path="$new_path"
28950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28951    unix_path=`$CYGPATH -u "$windows_path"`
28952    new_path="$unix_path"
28953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28955    new_path="$unix_path"
28956  fi
28957
28958  if test "x$path" != "x$new_path"; then
28959    BOOT_JDK="$new_path"
28960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28961$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28962  fi
28963
28964  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28965  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28966
28967    else
28968      # We're on a unix platform. Hooray! :)
28969      path="$BOOT_JDK"
28970      has_space=`$ECHO "$path" | $GREP " "`
28971      if test "x$has_space" != x; then
28972        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28973$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28974        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28975      fi
28976
28977      # Use eval to expand a potential ~
28978      eval path="$path"
28979      if test ! -f "$path" && test ! -d "$path"; then
28980        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28981      fi
28982
28983      if test -d "$path"; then
28984        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28985      else
28986        dir="`$DIRNAME "$path"`"
28987        base="`$BASENAME "$path"`"
28988        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28989      fi
28990    fi
28991  fi
28992
28993            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28994$as_echo_n "checking for Boot JDK... " >&6; }
28995            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28996$as_echo "$BOOT_JDK" >&6; }
28997            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28998$as_echo_n "checking Boot JDK version... " >&6; }
28999            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29001$as_echo "$BOOT_JDK_VERSION" >&6; }
29002          fi # end check jdk version
29003        fi # end check javac
29004      fi # end check java
29005    fi # end check boot jdk found
29006  fi
29007
29008    done
29009  fi
29010
29011
29012    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29013    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29014      # Do we have a bin/java?
29015      if test ! -x "$BOOT_JDK/bin/java"; then
29016        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29018        BOOT_JDK_FOUND=no
29019      else
29020        # Do we have a bin/javac?
29021        if test ! -x "$BOOT_JDK/bin/javac"; then
29022          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29024          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29025$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29026          BOOT_JDK_FOUND=no
29027        else
29028          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29029          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29030
29031          # Extra M4 quote needed to protect [] in grep expression.
29032          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29033          if test "x$FOUND_CORRECT_VERSION" = x; then
29034            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29036            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29037$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29038            BOOT_JDK_FOUND=no
29039          else
29040            # We're done! :-)
29041            BOOT_JDK_FOUND=yes
29042
29043  # Only process if variable expands to non-empty
29044
29045  if test "x$BOOT_JDK" != x; then
29046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29047
29048  # Input might be given as Windows format, start by converting to
29049  # unix format.
29050  path="$BOOT_JDK"
29051  new_path=`$CYGPATH -u "$path"`
29052
29053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29056  # "foo.exe" is OK but "foo" is an error.
29057  #
29058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29059  # It is also a way to make sure we got the proper file name for the real test later on.
29060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29061  if test "x$test_shortpath" = x; then
29062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29064    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29065  fi
29066
29067  # Call helper function which possibly converts this using DOS-style short mode.
29068  # If so, the updated path is stored in $new_path.
29069
29070  input_path="$new_path"
29071  # Check if we need to convert this using DOS-style short mode. If the path
29072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29073  # take no chances and rewrite it.
29074  # Note: m4 eats our [], so we need to use [ and ] instead.
29075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29076  if test "x$has_forbidden_chars" != x; then
29077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29081      # Going to short mode and back again did indeed matter. Since short mode is
29082      # case insensitive, let's make it lowercase to improve readability.
29083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29084      # Now convert it back to Unix-style (cygpath)
29085      input_path=`$CYGPATH -u "$shortmode_path"`
29086      new_path="$input_path"
29087    fi
29088  fi
29089
29090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29091  if test "x$test_cygdrive_prefix" = x; then
29092    # As a simple fix, exclude /usr/bin since it's not a real path.
29093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29095      # a path prefixed by /cygdrive for fixpath to work.
29096      new_path="$CYGWIN_ROOT_PATH$input_path"
29097    fi
29098  fi
29099
29100
29101  if test "x$path" != "x$new_path"; then
29102    BOOT_JDK="$new_path"
29103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29105  fi
29106
29107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29108
29109  path="$BOOT_JDK"
29110  has_colon=`$ECHO $path | $GREP ^.:`
29111  new_path="$path"
29112  if test "x$has_colon" = x; then
29113    # Not in mixed or Windows style, start by that.
29114    new_path=`cmd //c echo $path`
29115  fi
29116
29117
29118  input_path="$new_path"
29119  # Check if we need to convert this using DOS-style short mode. If the path
29120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29121  # take no chances and rewrite it.
29122  # Note: m4 eats our [], so we need to use [ and ] instead.
29123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29124  if test "x$has_forbidden_chars" != x; then
29125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29127  fi
29128
29129
29130  windows_path="$new_path"
29131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29132    unix_path=`$CYGPATH -u "$windows_path"`
29133    new_path="$unix_path"
29134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29136    new_path="$unix_path"
29137  fi
29138
29139  if test "x$path" != "x$new_path"; then
29140    BOOT_JDK="$new_path"
29141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29143  fi
29144
29145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29147
29148    else
29149      # We're on a unix platform. Hooray! :)
29150      path="$BOOT_JDK"
29151      has_space=`$ECHO "$path" | $GREP " "`
29152      if test "x$has_space" != x; then
29153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29154$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29156      fi
29157
29158      # Use eval to expand a potential ~
29159      eval path="$path"
29160      if test ! -f "$path" && test ! -d "$path"; then
29161        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29162      fi
29163
29164      if test -d "$path"; then
29165        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29166      else
29167        dir="`$DIRNAME "$path"`"
29168        base="`$BASENAME "$path"`"
29169        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29170      fi
29171    fi
29172  fi
29173
29174            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29175$as_echo_n "checking for Boot JDK... " >&6; }
29176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29177$as_echo "$BOOT_JDK" >&6; }
29178            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29179$as_echo_n "checking Boot JDK version... " >&6; }
29180            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29182$as_echo "$BOOT_JDK_VERSION" >&6; }
29183          fi # end check jdk version
29184        fi # end check javac
29185      fi # end check java
29186    fi # end check boot jdk found
29187  fi
29188
29189  fi
29190
29191
29192    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29193    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29194      # Do we have a bin/java?
29195      if test ! -x "$BOOT_JDK/bin/java"; then
29196        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29198        BOOT_JDK_FOUND=no
29199      else
29200        # Do we have a bin/javac?
29201        if test ! -x "$BOOT_JDK/bin/javac"; then
29202          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29204          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29205$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29206          BOOT_JDK_FOUND=no
29207        else
29208          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29209          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29210
29211          # Extra M4 quote needed to protect [] in grep expression.
29212          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29213          if test "x$FOUND_CORRECT_VERSION" = x; then
29214            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29216            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29217$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29218            BOOT_JDK_FOUND=no
29219          else
29220            # We're done! :-)
29221            BOOT_JDK_FOUND=yes
29222
29223  # Only process if variable expands to non-empty
29224
29225  if test "x$BOOT_JDK" != x; then
29226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29227
29228  # Input might be given as Windows format, start by converting to
29229  # unix format.
29230  path="$BOOT_JDK"
29231  new_path=`$CYGPATH -u "$path"`
29232
29233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29236  # "foo.exe" is OK but "foo" is an error.
29237  #
29238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29239  # It is also a way to make sure we got the proper file name for the real test later on.
29240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29241  if test "x$test_shortpath" = x; then
29242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29244    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29245  fi
29246
29247  # Call helper function which possibly converts this using DOS-style short mode.
29248  # If so, the updated path is stored in $new_path.
29249
29250  input_path="$new_path"
29251  # Check if we need to convert this using DOS-style short mode. If the path
29252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29253  # take no chances and rewrite it.
29254  # Note: m4 eats our [], so we need to use [ and ] instead.
29255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29256  if test "x$has_forbidden_chars" != x; then
29257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29261      # Going to short mode and back again did indeed matter. Since short mode is
29262      # case insensitive, let's make it lowercase to improve readability.
29263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29264      # Now convert it back to Unix-style (cygpath)
29265      input_path=`$CYGPATH -u "$shortmode_path"`
29266      new_path="$input_path"
29267    fi
29268  fi
29269
29270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29271  if test "x$test_cygdrive_prefix" = x; then
29272    # As a simple fix, exclude /usr/bin since it's not a real path.
29273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29275      # a path prefixed by /cygdrive for fixpath to work.
29276      new_path="$CYGWIN_ROOT_PATH$input_path"
29277    fi
29278  fi
29279
29280
29281  if test "x$path" != "x$new_path"; then
29282    BOOT_JDK="$new_path"
29283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29285  fi
29286
29287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29288
29289  path="$BOOT_JDK"
29290  has_colon=`$ECHO $path | $GREP ^.:`
29291  new_path="$path"
29292  if test "x$has_colon" = x; then
29293    # Not in mixed or Windows style, start by that.
29294    new_path=`cmd //c echo $path`
29295  fi
29296
29297
29298  input_path="$new_path"
29299  # Check if we need to convert this using DOS-style short mode. If the path
29300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29301  # take no chances and rewrite it.
29302  # Note: m4 eats our [], so we need to use [ and ] instead.
29303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29304  if test "x$has_forbidden_chars" != x; then
29305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29307  fi
29308
29309
29310  windows_path="$new_path"
29311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29312    unix_path=`$CYGPATH -u "$windows_path"`
29313    new_path="$unix_path"
29314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29316    new_path="$unix_path"
29317  fi
29318
29319  if test "x$path" != "x$new_path"; then
29320    BOOT_JDK="$new_path"
29321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29322$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29323  fi
29324
29325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29327
29328    else
29329      # We're on a unix platform. Hooray! :)
29330      path="$BOOT_JDK"
29331      has_space=`$ECHO "$path" | $GREP " "`
29332      if test "x$has_space" != x; then
29333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29335        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29336      fi
29337
29338      # Use eval to expand a potential ~
29339      eval path="$path"
29340      if test ! -f "$path" && test ! -d "$path"; then
29341        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29342      fi
29343
29344      if test -d "$path"; then
29345        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29346      else
29347        dir="`$DIRNAME "$path"`"
29348        base="`$BASENAME "$path"`"
29349        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29350      fi
29351    fi
29352  fi
29353
29354            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29355$as_echo_n "checking for Boot JDK... " >&6; }
29356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29357$as_echo "$BOOT_JDK" >&6; }
29358            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29359$as_echo_n "checking Boot JDK version... " >&6; }
29360            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29362$as_echo "$BOOT_JDK_VERSION" >&6; }
29363          fi # end check jdk version
29364        fi # end check javac
29365      fi # end check java
29366    fi # end check boot jdk found
29367  fi
29368
29369
29370  # If we haven't found anything yet, we've truly lost. Give up.
29371  if test "x$BOOT_JDK_FOUND" = xno; then
29372
29373  # Print a helpful message on how to acquire the necessary build dependency.
29374  # openjdk is the help tag: freetype, cups, alsa etc
29375  MISSING_DEPENDENCY=openjdk
29376
29377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29378    cygwin_help $MISSING_DEPENDENCY
29379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29380    msys_help $MISSING_DEPENDENCY
29381  else
29382    PKGHANDLER_COMMAND=
29383
29384    case $PKGHANDLER in
29385      apt-get)
29386        apt_help     $MISSING_DEPENDENCY ;;
29387      yum)
29388        yum_help     $MISSING_DEPENDENCY ;;
29389      port)
29390        port_help    $MISSING_DEPENDENCY ;;
29391      pkgutil)
29392        pkgutil_help $MISSING_DEPENDENCY ;;
29393      pkgadd)
29394        pkgadd_help  $MISSING_DEPENDENCY ;;
29395    esac
29396
29397    if test "x$PKGHANDLER_COMMAND" != x; then
29398      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29399    fi
29400  fi
29401
29402    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29403$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29404    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29405$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29406    as_fn_error $? "Cannot continue" "$LINENO" 5
29407  fi
29408
29409
29410
29411  # Setup tools from the Boot JDK.
29412
29413  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29414
29415  # Publish this variable in the help.
29416
29417
29418  if [ -z "${JAVA+x}" ]; then
29419    # The variable is not set by user, try to locate tool using the code snippet
29420
29421      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29422$as_echo_n "checking for java in Boot JDK... " >&6; }
29423      JAVA=$BOOT_JDK/bin/java
29424      if test ! -x $JAVA; then
29425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29426$as_echo "not found" >&6; }
29427        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29428$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29429        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29430      fi
29431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29432$as_echo "ok" >&6; }
29433
29434
29435  else
29436    # The variable is set, but is it from the command line or the environment?
29437
29438    # Try to remove the string !JAVA! from our list.
29439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29441      # If it failed, the variable was not from the command line. Ignore it,
29442      # but warn the user (except for BASH, which is always set by the calling BASH).
29443      if test "xJAVA" != xBASH; then
29444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29445$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29446      fi
29447      # Try to locate tool using the code snippet
29448
29449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29450$as_echo_n "checking for java in Boot JDK... " >&6; }
29451      JAVA=$BOOT_JDK/bin/java
29452      if test ! -x $JAVA; then
29453        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29454$as_echo "not found" >&6; }
29455        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29456$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29457        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29458      fi
29459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29460$as_echo "ok" >&6; }
29461
29462
29463    else
29464      # If it succeeded, then it was overridden by the user. We will use it
29465      # for the tool.
29466
29467      # First remove it from the list of overridden variables, so we can test
29468      # for unknown variables in the end.
29469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29470
29471      # Check if we try to supply an empty value
29472      if test "x$JAVA" = x; then
29473        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29474$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29476$as_echo_n "checking for JAVA... " >&6; }
29477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29478$as_echo "disabled" >&6; }
29479      else
29480        # Check if the provided tool contains a complete path.
29481        tool_specified="$JAVA"
29482        tool_basename="${tool_specified##*/}"
29483        if test "x$tool_basename" = "x$tool_specified"; then
29484          # A command without a complete path is provided, search $PATH.
29485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29486$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29487          # Extract the first word of "$tool_basename", so it can be a program name with args.
29488set dummy $tool_basename; ac_word=$2
29489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29490$as_echo_n "checking for $ac_word... " >&6; }
29491if ${ac_cv_path_JAVA+:} false; then :
29492  $as_echo_n "(cached) " >&6
29493else
29494  case $JAVA in
29495  [\\/]* | ?:[\\/]*)
29496  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29497  ;;
29498  *)
29499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29500for as_dir in $PATH
29501do
29502  IFS=$as_save_IFS
29503  test -z "$as_dir" && as_dir=.
29504    for ac_exec_ext in '' $ac_executable_extensions; do
29505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29506    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29508    break 2
29509  fi
29510done
29511  done
29512IFS=$as_save_IFS
29513
29514  ;;
29515esac
29516fi
29517JAVA=$ac_cv_path_JAVA
29518if test -n "$JAVA"; then
29519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29520$as_echo "$JAVA" >&6; }
29521else
29522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29523$as_echo "no" >&6; }
29524fi
29525
29526
29527          if test "x$JAVA" = x; then
29528            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29529          fi
29530        else
29531          # Otherwise we believe it is a complete path. Use it as it is.
29532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29533$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29534          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29535$as_echo_n "checking for JAVA... " >&6; }
29536          if test ! -x "$tool_specified"; then
29537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29538$as_echo "not found" >&6; }
29539            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29540          fi
29541          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29542$as_echo "$tool_specified" >&6; }
29543        fi
29544      fi
29545    fi
29546
29547  fi
29548
29549
29550
29551  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29552
29553  # Publish this variable in the help.
29554
29555
29556  if [ -z "${JAVAC+x}" ]; then
29557    # The variable is not set by user, try to locate tool using the code snippet
29558
29559      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29560$as_echo_n "checking for javac in Boot JDK... " >&6; }
29561      JAVAC=$BOOT_JDK/bin/javac
29562      if test ! -x $JAVAC; then
29563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29564$as_echo "not found" >&6; }
29565        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29566$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29567        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29568      fi
29569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29570$as_echo "ok" >&6; }
29571
29572
29573  else
29574    # The variable is set, but is it from the command line or the environment?
29575
29576    # Try to remove the string !JAVAC! from our list.
29577    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29578    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29579      # If it failed, the variable was not from the command line. Ignore it,
29580      # but warn the user (except for BASH, which is always set by the calling BASH).
29581      if test "xJAVAC" != xBASH; then
29582        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29583$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29584      fi
29585      # Try to locate tool using the code snippet
29586
29587      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29588$as_echo_n "checking for javac in Boot JDK... " >&6; }
29589      JAVAC=$BOOT_JDK/bin/javac
29590      if test ! -x $JAVAC; then
29591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29592$as_echo "not found" >&6; }
29593        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29594$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29595        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29596      fi
29597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29598$as_echo "ok" >&6; }
29599
29600
29601    else
29602      # If it succeeded, then it was overridden by the user. We will use it
29603      # for the tool.
29604
29605      # First remove it from the list of overridden variables, so we can test
29606      # for unknown variables in the end.
29607      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29608
29609      # Check if we try to supply an empty value
29610      if test "x$JAVAC" = x; then
29611        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29612$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29613        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29614$as_echo_n "checking for JAVAC... " >&6; }
29615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29616$as_echo "disabled" >&6; }
29617      else
29618        # Check if the provided tool contains a complete path.
29619        tool_specified="$JAVAC"
29620        tool_basename="${tool_specified##*/}"
29621        if test "x$tool_basename" = "x$tool_specified"; then
29622          # A command without a complete path is provided, search $PATH.
29623          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29624$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29625          # Extract the first word of "$tool_basename", so it can be a program name with args.
29626set dummy $tool_basename; ac_word=$2
29627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29628$as_echo_n "checking for $ac_word... " >&6; }
29629if ${ac_cv_path_JAVAC+:} false; then :
29630  $as_echo_n "(cached) " >&6
29631else
29632  case $JAVAC in
29633  [\\/]* | ?:[\\/]*)
29634  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29635  ;;
29636  *)
29637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29638for as_dir in $PATH
29639do
29640  IFS=$as_save_IFS
29641  test -z "$as_dir" && as_dir=.
29642    for ac_exec_ext in '' $ac_executable_extensions; do
29643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29644    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29646    break 2
29647  fi
29648done
29649  done
29650IFS=$as_save_IFS
29651
29652  ;;
29653esac
29654fi
29655JAVAC=$ac_cv_path_JAVAC
29656if test -n "$JAVAC"; then
29657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29658$as_echo "$JAVAC" >&6; }
29659else
29660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29661$as_echo "no" >&6; }
29662fi
29663
29664
29665          if test "x$JAVAC" = x; then
29666            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29667          fi
29668        else
29669          # Otherwise we believe it is a complete path. Use it as it is.
29670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29671$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29672          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29673$as_echo_n "checking for JAVAC... " >&6; }
29674          if test ! -x "$tool_specified"; then
29675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29676$as_echo "not found" >&6; }
29677            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29678          fi
29679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29680$as_echo "$tool_specified" >&6; }
29681        fi
29682      fi
29683    fi
29684
29685  fi
29686
29687
29688
29689  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29690
29691  # Publish this variable in the help.
29692
29693
29694  if [ -z "${JAVAH+x}" ]; then
29695    # The variable is not set by user, try to locate tool using the code snippet
29696
29697      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29698$as_echo_n "checking for javah in Boot JDK... " >&6; }
29699      JAVAH=$BOOT_JDK/bin/javah
29700      if test ! -x $JAVAH; then
29701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29702$as_echo "not found" >&6; }
29703        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29704$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29705        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29706      fi
29707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29708$as_echo "ok" >&6; }
29709
29710
29711  else
29712    # The variable is set, but is it from the command line or the environment?
29713
29714    # Try to remove the string !JAVAH! from our list.
29715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29717      # If it failed, the variable was not from the command line. Ignore it,
29718      # but warn the user (except for BASH, which is always set by the calling BASH).
29719      if test "xJAVAH" != xBASH; then
29720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29721$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29722      fi
29723      # Try to locate tool using the code snippet
29724
29725      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29726$as_echo_n "checking for javah in Boot JDK... " >&6; }
29727      JAVAH=$BOOT_JDK/bin/javah
29728      if test ! -x $JAVAH; then
29729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29730$as_echo "not found" >&6; }
29731        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29732$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29733        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29734      fi
29735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29736$as_echo "ok" >&6; }
29737
29738
29739    else
29740      # If it succeeded, then it was overridden by the user. We will use it
29741      # for the tool.
29742
29743      # First remove it from the list of overridden variables, so we can test
29744      # for unknown variables in the end.
29745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29746
29747      # Check if we try to supply an empty value
29748      if test "x$JAVAH" = x; then
29749        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29750$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29751        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29752$as_echo_n "checking for JAVAH... " >&6; }
29753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29754$as_echo "disabled" >&6; }
29755      else
29756        # Check if the provided tool contains a complete path.
29757        tool_specified="$JAVAH"
29758        tool_basename="${tool_specified##*/}"
29759        if test "x$tool_basename" = "x$tool_specified"; then
29760          # A command without a complete path is provided, search $PATH.
29761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29762$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29763          # Extract the first word of "$tool_basename", so it can be a program name with args.
29764set dummy $tool_basename; ac_word=$2
29765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29766$as_echo_n "checking for $ac_word... " >&6; }
29767if ${ac_cv_path_JAVAH+:} false; then :
29768  $as_echo_n "(cached) " >&6
29769else
29770  case $JAVAH in
29771  [\\/]* | ?:[\\/]*)
29772  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29773  ;;
29774  *)
29775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29776for as_dir in $PATH
29777do
29778  IFS=$as_save_IFS
29779  test -z "$as_dir" && as_dir=.
29780    for ac_exec_ext in '' $ac_executable_extensions; do
29781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29782    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29784    break 2
29785  fi
29786done
29787  done
29788IFS=$as_save_IFS
29789
29790  ;;
29791esac
29792fi
29793JAVAH=$ac_cv_path_JAVAH
29794if test -n "$JAVAH"; then
29795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29796$as_echo "$JAVAH" >&6; }
29797else
29798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29799$as_echo "no" >&6; }
29800fi
29801
29802
29803          if test "x$JAVAH" = x; then
29804            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29805          fi
29806        else
29807          # Otherwise we believe it is a complete path. Use it as it is.
29808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29809$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29810          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29811$as_echo_n "checking for JAVAH... " >&6; }
29812          if test ! -x "$tool_specified"; then
29813            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29814$as_echo "not found" >&6; }
29815            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29816          fi
29817          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29818$as_echo "$tool_specified" >&6; }
29819        fi
29820      fi
29821    fi
29822
29823  fi
29824
29825
29826
29827  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29828
29829  # Publish this variable in the help.
29830
29831
29832  if [ -z "${JAR+x}" ]; then
29833    # The variable is not set by user, try to locate tool using the code snippet
29834
29835      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29836$as_echo_n "checking for jar in Boot JDK... " >&6; }
29837      JAR=$BOOT_JDK/bin/jar
29838      if test ! -x $JAR; then
29839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29840$as_echo "not found" >&6; }
29841        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29842$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29843        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29844      fi
29845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29846$as_echo "ok" >&6; }
29847
29848
29849  else
29850    # The variable is set, but is it from the command line or the environment?
29851
29852    # Try to remove the string !JAR! from our list.
29853    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29854    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29855      # If it failed, the variable was not from the command line. Ignore it,
29856      # but warn the user (except for BASH, which is always set by the calling BASH).
29857      if test "xJAR" != xBASH; then
29858        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29859$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29860      fi
29861      # Try to locate tool using the code snippet
29862
29863      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29864$as_echo_n "checking for jar in Boot JDK... " >&6; }
29865      JAR=$BOOT_JDK/bin/jar
29866      if test ! -x $JAR; then
29867        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29868$as_echo "not found" >&6; }
29869        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29870$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29871        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29872      fi
29873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29874$as_echo "ok" >&6; }
29875
29876
29877    else
29878      # If it succeeded, then it was overridden by the user. We will use it
29879      # for the tool.
29880
29881      # First remove it from the list of overridden variables, so we can test
29882      # for unknown variables in the end.
29883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29884
29885      # Check if we try to supply an empty value
29886      if test "x$JAR" = x; then
29887        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29888$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29889        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29890$as_echo_n "checking for JAR... " >&6; }
29891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29892$as_echo "disabled" >&6; }
29893      else
29894        # Check if the provided tool contains a complete path.
29895        tool_specified="$JAR"
29896        tool_basename="${tool_specified##*/}"
29897        if test "x$tool_basename" = "x$tool_specified"; then
29898          # A command without a complete path is provided, search $PATH.
29899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29900$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29901          # Extract the first word of "$tool_basename", so it can be a program name with args.
29902set dummy $tool_basename; ac_word=$2
29903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29904$as_echo_n "checking for $ac_word... " >&6; }
29905if ${ac_cv_path_JAR+:} false; then :
29906  $as_echo_n "(cached) " >&6
29907else
29908  case $JAR in
29909  [\\/]* | ?:[\\/]*)
29910  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29911  ;;
29912  *)
29913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29914for as_dir in $PATH
29915do
29916  IFS=$as_save_IFS
29917  test -z "$as_dir" && as_dir=.
29918    for ac_exec_ext in '' $ac_executable_extensions; do
29919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29920    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29922    break 2
29923  fi
29924done
29925  done
29926IFS=$as_save_IFS
29927
29928  ;;
29929esac
29930fi
29931JAR=$ac_cv_path_JAR
29932if test -n "$JAR"; then
29933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29934$as_echo "$JAR" >&6; }
29935else
29936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29937$as_echo "no" >&6; }
29938fi
29939
29940
29941          if test "x$JAR" = x; then
29942            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29943          fi
29944        else
29945          # Otherwise we believe it is a complete path. Use it as it is.
29946          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29947$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29948          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29949$as_echo_n "checking for JAR... " >&6; }
29950          if test ! -x "$tool_specified"; then
29951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29952$as_echo "not found" >&6; }
29953            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29954          fi
29955          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29956$as_echo "$tool_specified" >&6; }
29957        fi
29958      fi
29959    fi
29960
29961  fi
29962
29963
29964
29965  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29966
29967  # Publish this variable in the help.
29968
29969
29970  if [ -z "${JARSIGNER+x}" ]; then
29971    # The variable is not set by user, try to locate tool using the code snippet
29972
29973      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29974$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29975      JARSIGNER=$BOOT_JDK/bin/jarsigner
29976      if test ! -x $JARSIGNER; then
29977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29978$as_echo "not found" >&6; }
29979        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29980$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29981        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29982      fi
29983      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29984$as_echo "ok" >&6; }
29985
29986
29987  else
29988    # The variable is set, but is it from the command line or the environment?
29989
29990    # Try to remove the string !JARSIGNER! from our list.
29991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29993      # If it failed, the variable was not from the command line. Ignore it,
29994      # but warn the user (except for BASH, which is always set by the calling BASH).
29995      if test "xJARSIGNER" != xBASH; then
29996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29997$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29998      fi
29999      # Try to locate tool using the code snippet
30000
30001      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30002$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30003      JARSIGNER=$BOOT_JDK/bin/jarsigner
30004      if test ! -x $JARSIGNER; then
30005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30006$as_echo "not found" >&6; }
30007        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30008$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30009        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30010      fi
30011      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30012$as_echo "ok" >&6; }
30013
30014
30015    else
30016      # If it succeeded, then it was overridden by the user. We will use it
30017      # for the tool.
30018
30019      # First remove it from the list of overridden variables, so we can test
30020      # for unknown variables in the end.
30021      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30022
30023      # Check if we try to supply an empty value
30024      if test "x$JARSIGNER" = x; then
30025        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30026$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30028$as_echo_n "checking for JARSIGNER... " >&6; }
30029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30030$as_echo "disabled" >&6; }
30031      else
30032        # Check if the provided tool contains a complete path.
30033        tool_specified="$JARSIGNER"
30034        tool_basename="${tool_specified##*/}"
30035        if test "x$tool_basename" = "x$tool_specified"; then
30036          # A command without a complete path is provided, search $PATH.
30037          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30038$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30039          # Extract the first word of "$tool_basename", so it can be a program name with args.
30040set dummy $tool_basename; ac_word=$2
30041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30042$as_echo_n "checking for $ac_word... " >&6; }
30043if ${ac_cv_path_JARSIGNER+:} false; then :
30044  $as_echo_n "(cached) " >&6
30045else
30046  case $JARSIGNER in
30047  [\\/]* | ?:[\\/]*)
30048  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30049  ;;
30050  *)
30051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30052for as_dir in $PATH
30053do
30054  IFS=$as_save_IFS
30055  test -z "$as_dir" && as_dir=.
30056    for ac_exec_ext in '' $ac_executable_extensions; do
30057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30058    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30060    break 2
30061  fi
30062done
30063  done
30064IFS=$as_save_IFS
30065
30066  ;;
30067esac
30068fi
30069JARSIGNER=$ac_cv_path_JARSIGNER
30070if test -n "$JARSIGNER"; then
30071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30072$as_echo "$JARSIGNER" >&6; }
30073else
30074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30075$as_echo "no" >&6; }
30076fi
30077
30078
30079          if test "x$JARSIGNER" = x; then
30080            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30081          fi
30082        else
30083          # Otherwise we believe it is a complete path. Use it as it is.
30084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30085$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30086          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30087$as_echo_n "checking for JARSIGNER... " >&6; }
30088          if test ! -x "$tool_specified"; then
30089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30090$as_echo "not found" >&6; }
30091            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30092          fi
30093          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30094$as_echo "$tool_specified" >&6; }
30095        fi
30096      fi
30097    fi
30098
30099  fi
30100
30101
30102
30103  # Finally, set some other options...
30104
30105  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30106  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30107
30108
30109
30110  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30111  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30112  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30113  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30114  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30115  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30116    dummy="$dummy -Xpatch:foo=bar"
30117    JVM_ARG_OK=true
30118  else
30119    $ECHO "Arg failed:" >&5
30120    $ECHO "$OUTPUT" >&5
30121    JVM_ARG_OK=false
30122  fi
30123
30124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30125$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30126  if test "x$JVM_ARG_OK" = "xtrue"; then
30127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30128$as_echo "yes" >&6; }
30129    BOOT_JDK_MODULAR="true"
30130  else
30131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30132$as_echo "no" >&6; }
30133    BOOT_JDK_MODULAR="false"
30134  fi
30135
30136
30137
30138
30139  # Check if the boot jdk is 32 or 64 bit
30140  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30141    BOOT_JDK_BITS="64"
30142  else
30143    BOOT_JDK_BITS="32"
30144  fi
30145  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30146$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30148$as_echo "$BOOT_JDK_BITS" >&6; }
30149
30150
30151
30152
30153# Check whether --with-build-jdk was given.
30154if test "${with_build_jdk+set}" = set; then :
30155  withval=$with_build_jdk;
30156fi
30157
30158
30159  CREATE_BUILDJDK=false
30160  EXTERNAL_BUILDJDK=false
30161  BUILD_JDK_FOUND="no"
30162  if test "x$with_build_jdk" != "x"; then
30163
30164  if test "x$BUILD_JDK_FOUND" = xno; then
30165    # Execute the test
30166
30167       if test "x$with_build_jdk" != x; then
30168         BUILD_JDK=$with_build_jdk
30169         BUILD_JDK_FOUND=maybe
30170         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30171$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30172       fi
30173
30174    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30175    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30176      # Do we have a bin/java?
30177      if test ! -x "$BUILD_JDK/bin/java"; then
30178        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30179$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30180        BUILD_JDK_FOUND=no
30181      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30182        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30183$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30184        BUILD_JDK_FOUND=no
30185      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30186        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30187$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30188        BUILD_JDK_FOUND=no
30189      elif test ! -x "$BUILD_JDK/bin/javac"; then
30190        # Do we have a bin/javac?
30191        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30192$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30193        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30194$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30195        BUILD_JDK_FOUND=no
30196      else
30197        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30198        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30199
30200        # Extra M4 quote needed to protect [] in grep expression.
30201        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30202        if test "x$FOUND_CORRECT_VERSION" = x; then
30203          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30204$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30205          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30206$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30207          BUILD_JDK_FOUND=no
30208        else
30209          # We're done!
30210          BUILD_JDK_FOUND=yes
30211
30212  # Only process if variable expands to non-empty
30213
30214  if test "x$BUILD_JDK" != x; then
30215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30216
30217  # Input might be given as Windows format, start by converting to
30218  # unix format.
30219  path="$BUILD_JDK"
30220  new_path=`$CYGPATH -u "$path"`
30221
30222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30225  # "foo.exe" is OK but "foo" is an error.
30226  #
30227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30228  # It is also a way to make sure we got the proper file name for the real test later on.
30229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30230  if test "x$test_shortpath" = x; then
30231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30232$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30233    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30234  fi
30235
30236  # Call helper function which possibly converts this using DOS-style short mode.
30237  # If so, the updated path is stored in $new_path.
30238
30239  input_path="$new_path"
30240  # Check if we need to convert this using DOS-style short mode. If the path
30241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30242  # take no chances and rewrite it.
30243  # Note: m4 eats our [], so we need to use [ and ] instead.
30244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30245  if test "x$has_forbidden_chars" != x; then
30246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30250      # Going to short mode and back again did indeed matter. Since short mode is
30251      # case insensitive, let's make it lowercase to improve readability.
30252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30253      # Now convert it back to Unix-style (cygpath)
30254      input_path=`$CYGPATH -u "$shortmode_path"`
30255      new_path="$input_path"
30256    fi
30257  fi
30258
30259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30260  if test "x$test_cygdrive_prefix" = x; then
30261    # As a simple fix, exclude /usr/bin since it's not a real path.
30262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30264      # a path prefixed by /cygdrive for fixpath to work.
30265      new_path="$CYGWIN_ROOT_PATH$input_path"
30266    fi
30267  fi
30268
30269
30270  if test "x$path" != "x$new_path"; then
30271    BUILD_JDK="$new_path"
30272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30273$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30274  fi
30275
30276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30277
30278  path="$BUILD_JDK"
30279  has_colon=`$ECHO $path | $GREP ^.:`
30280  new_path="$path"
30281  if test "x$has_colon" = x; then
30282    # Not in mixed or Windows style, start by that.
30283    new_path=`cmd //c echo $path`
30284  fi
30285
30286
30287  input_path="$new_path"
30288  # Check if we need to convert this using DOS-style short mode. If the path
30289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30290  # take no chances and rewrite it.
30291  # Note: m4 eats our [], so we need to use [ and ] instead.
30292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30293  if test "x$has_forbidden_chars" != x; then
30294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30296  fi
30297
30298
30299  windows_path="$new_path"
30300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30301    unix_path=`$CYGPATH -u "$windows_path"`
30302    new_path="$unix_path"
30303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30305    new_path="$unix_path"
30306  fi
30307
30308  if test "x$path" != "x$new_path"; then
30309    BUILD_JDK="$new_path"
30310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30311$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30312  fi
30313
30314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30316
30317    else
30318      # We're on a unix platform. Hooray! :)
30319      path="$BUILD_JDK"
30320      has_space=`$ECHO "$path" | $GREP " "`
30321      if test "x$has_space" != x; then
30322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30323$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30325      fi
30326
30327      # Use eval to expand a potential ~
30328      eval path="$path"
30329      if test ! -f "$path" && test ! -d "$path"; then
30330        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30331      fi
30332
30333      if test -d "$path"; then
30334        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30335      else
30336        dir="`$DIRNAME "$path"`"
30337        base="`$BASENAME "$path"`"
30338        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30339      fi
30340    fi
30341  fi
30342
30343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30344$as_echo_n "checking for Build JDK... " >&6; }
30345          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30346$as_echo "$BUILD_JDK" >&6; }
30347          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30348$as_echo_n "checking Build JDK version... " >&6; }
30349          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30351$as_echo "$BUILD_JDK_VERSION" >&6; }
30352        fi # end check jdk version
30353      fi # end check java
30354    fi # end check build jdk found
30355  fi
30356
30357    EXTERNAL_BUILDJDK=true
30358  else
30359    if test "x$COMPILE_TYPE" = "xcross"; then
30360      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30361      BUILD_JDK_FOUND=yes
30362      CREATE_BUILDJDK=true
30363      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30364$as_echo_n "checking for Build JDK... " >&6; }
30365      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30366$as_echo "yes, will build it for the host platform" >&6; }
30367    else
30368      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30369      BUILD_JDK_FOUND=yes
30370      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30371$as_echo_n "checking for Build JDK... " >&6; }
30372      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30373$as_echo "yes, will use output dir" >&6; }
30374    fi
30375  fi
30376
30377  JMOD="$BUILD_JDK/bin/jmod"
30378  JLINK="$BUILD_JDK/bin/jlink"
30379
30380
30381
30382  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30384$as_echo_n "checking for Build JDK... " >&6; }
30385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30386$as_echo "no" >&6; }
30387    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30388  fi
30389
30390
30391
30392
30393
30394
30395###############################################################################
30396#
30397# Configure the sources to use. We can add or override individual directories.
30398#
30399###############################################################################
30400
30401
30402  # Where are the sources.
30403  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30404  CORBA_TOPDIR="$SRC_ROOT/corba"
30405  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30406  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30407  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30408  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30409  JDK_TOPDIR="$SRC_ROOT/jdk"
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419  # This feature is no longer supported.
30420
30421
30422
30423# Check whether --with-add-source-root was given.
30424if test "${with_add_source_root+set}" = set; then :
30425  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
30426$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30427fi
30428
30429
30430
30431
30432# Check whether --with-override-source-root was given.
30433if test "${with_override_source_root+set}" = set; then :
30434  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
30435$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30436fi
30437
30438
30439
30440
30441# Check whether --with-adds-and-overrides was given.
30442if test "${with_adds_and_overrides+set}" = set; then :
30443  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
30444$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30445fi
30446
30447
30448
30449
30450# Check whether --with-override-langtools was given.
30451if test "${with_override_langtools+set}" = set; then :
30452  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30453$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30454fi
30455
30456
30457
30458
30459# Check whether --with-override-corba was given.
30460if test "${with_override_corba+set}" = set; then :
30461  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30462$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30463fi
30464
30465
30466
30467
30468# Check whether --with-override-jaxp was given.
30469if test "${with_override_jaxp+set}" = set; then :
30470  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30471$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30472fi
30473
30474
30475
30476
30477# Check whether --with-override-jaxws was given.
30478if test "${with_override_jaxws+set}" = set; then :
30479  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30480$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30481fi
30482
30483
30484
30485
30486# Check whether --with-override-hotspot was given.
30487if test "${with_override_hotspot+set}" = set; then :
30488  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30489$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30490fi
30491
30492
30493
30494
30495# Check whether --with-override-nashorn was given.
30496if test "${with_override_nashorn+set}" = set; then :
30497  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30498$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30499fi
30500
30501
30502
30503
30504# Check whether --with-override-jdk was given.
30505if test "${with_override_jdk+set}" = set; then :
30506  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30507$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30508fi
30509
30510
30511
30512
30513  BUILD_OUTPUT="$OUTPUT_ROOT"
30514
30515
30516  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30517  BUILD_HOTSPOT=true
30518
30519
30520
30521# Check whether --with-import-hotspot was given.
30522if test "${with_import_hotspot+set}" = set; then :
30523  withval=$with_import_hotspot;
30524fi
30525
30526  if test "x$with_import_hotspot" != x; then
30527    CURDIR="$PWD"
30528    cd "$with_import_hotspot"
30529    HOTSPOT_DIST="`pwd`"
30530    cd "$CURDIR"
30531    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30532      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30533    fi
30534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30535$as_echo_n "checking if hotspot should be imported... " >&6; }
30536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30537$as_echo "yes from $HOTSPOT_DIST" >&6; }
30538    BUILD_HOTSPOT=false
30539  fi
30540
30541  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30542
30543
30544
30545
30546# Check whether --with-import-modules was given.
30547if test "${with_import_modules+set}" = set; then :
30548  withval=$with_import_modules;
30549fi
30550
30551
30552  if test "x$with_import_modules" != x \
30553      && test "x$with_import_modules" != "xno"; then
30554    if test -d "$with_import_modules"; then
30555      IMPORT_MODULES_TOPDIR="$with_import_modules"
30556
30557  # Only process if variable expands to non-empty
30558
30559  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30561
30562  # Input might be given as Windows format, start by converting to
30563  # unix format.
30564  path="$IMPORT_MODULES_TOPDIR"
30565  new_path=`$CYGPATH -u "$path"`
30566
30567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30570  # "foo.exe" is OK but "foo" is an error.
30571  #
30572  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30573  # It is also a way to make sure we got the proper file name for the real test later on.
30574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30575  if test "x$test_shortpath" = x; then
30576    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30577$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30578    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30579  fi
30580
30581  # Call helper function which possibly converts this using DOS-style short mode.
30582  # If so, the updated path is stored in $new_path.
30583
30584  input_path="$new_path"
30585  # Check if we need to convert this using DOS-style short mode. If the path
30586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30587  # take no chances and rewrite it.
30588  # Note: m4 eats our [], so we need to use [ and ] instead.
30589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30590  if test "x$has_forbidden_chars" != x; then
30591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30595      # Going to short mode and back again did indeed matter. Since short mode is
30596      # case insensitive, let's make it lowercase to improve readability.
30597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30598      # Now convert it back to Unix-style (cygpath)
30599      input_path=`$CYGPATH -u "$shortmode_path"`
30600      new_path="$input_path"
30601    fi
30602  fi
30603
30604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30605  if test "x$test_cygdrive_prefix" = x; then
30606    # As a simple fix, exclude /usr/bin since it's not a real path.
30607    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30609      # a path prefixed by /cygdrive for fixpath to work.
30610      new_path="$CYGWIN_ROOT_PATH$input_path"
30611    fi
30612  fi
30613
30614
30615  if test "x$path" != "x$new_path"; then
30616    IMPORT_MODULES_TOPDIR="$new_path"
30617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30618$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30619  fi
30620
30621    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30622
30623  path="$IMPORT_MODULES_TOPDIR"
30624  has_colon=`$ECHO $path | $GREP ^.:`
30625  new_path="$path"
30626  if test "x$has_colon" = x; then
30627    # Not in mixed or Windows style, start by that.
30628    new_path=`cmd //c echo $path`
30629  fi
30630
30631
30632  input_path="$new_path"
30633  # Check if we need to convert this using DOS-style short mode. If the path
30634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30635  # take no chances and rewrite it.
30636  # Note: m4 eats our [], so we need to use [ and ] instead.
30637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30638  if test "x$has_forbidden_chars" != x; then
30639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30641  fi
30642
30643
30644  windows_path="$new_path"
30645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30646    unix_path=`$CYGPATH -u "$windows_path"`
30647    new_path="$unix_path"
30648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30650    new_path="$unix_path"
30651  fi
30652
30653  if test "x$path" != "x$new_path"; then
30654    IMPORT_MODULES_TOPDIR="$new_path"
30655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30656$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30657  fi
30658
30659  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30660  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30661
30662    else
30663      # We're on a unix platform. Hooray! :)
30664      path="$IMPORT_MODULES_TOPDIR"
30665      has_space=`$ECHO "$path" | $GREP " "`
30666      if test "x$has_space" != x; then
30667        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30668$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30669        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30670      fi
30671
30672      # Use eval to expand a potential ~
30673      eval path="$path"
30674      if test ! -f "$path" && test ! -d "$path"; then
30675        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30676      fi
30677
30678      if test -d "$path"; then
30679        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30680      else
30681        dir="`$DIRNAME "$path"`"
30682        base="`$BASENAME "$path"`"
30683        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30684      fi
30685    fi
30686  fi
30687
30688    elif test -e "$with_import_modules"; then
30689      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30690      $RM -rf "$IMPORT_MODULES_TOPDIR"
30691      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30692      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30693        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30694      fi
30695    else
30696      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30697    fi
30698  fi
30699
30700  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30701    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30702  fi
30703  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30704    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30705  fi
30706  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30707    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30708  fi
30709  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30710    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30711  fi
30712  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30713    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30714  fi
30715  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30716    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30717  fi
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727###############################################################################
30728#
30729# Setup the toolchain (compilers etc), i.e. tools used to compile and process
30730# native code.
30731#
30732###############################################################################
30733
30734# See if we are doing a complete static build or not
30735
30736  # Check whether --enable-static-build was given.
30737if test "${enable_static_build+set}" = set; then :
30738  enableval=$enable_static_build;
30739fi
30740
30741  STATIC_BUILD=false
30742  if test "x$enable_static_build" = "xyes"; then
30743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30744$as_echo_n "checking if static build is enabled... " >&6; }
30745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30746$as_echo "yes" >&6; }
30747    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30748      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30749    fi
30750    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30751    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30752    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30753    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30754    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30755    STATIC_BUILD=true
30756  elif test "x$enable_static_build" = "xno"; then
30757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30758$as_echo_n "checking if static build is enabled... " >&6; }
30759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30760$as_echo "no" >&6; }
30761  elif test "x$enable_static_build" != "x"; then
30762    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30763  fi
30764
30765
30766
30767
30768# First determine the toolchain type (compiler family)
30769
30770
30771# Check whether --with-toolchain-type was given.
30772if test "${with_toolchain_type+set}" = set; then :
30773  withval=$with_toolchain_type;
30774fi
30775
30776
30777  # Use indirect variable referencing
30778  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30779  VALID_TOOLCHAINS=${!toolchain_var_name}
30780
30781  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30782    if test -n "$XCODEBUILD"; then
30783      # On Mac OS X, default toolchain to clang after Xcode 5
30784      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30785      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30786      if test $? -ne 0; then
30787        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30788      fi
30789      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30790          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30791          $CUT -f 1 -d .`
30792      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30793$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30794      if test $XCODE_MAJOR_VERSION -ge 5; then
30795          DEFAULT_TOOLCHAIN="clang"
30796      else
30797          DEFAULT_TOOLCHAIN="gcc"
30798      fi
30799    else
30800      # If Xcode is not installed, but the command line tools are
30801      # then we can't run xcodebuild. On these systems we should
30802      # default to clang
30803      DEFAULT_TOOLCHAIN="clang"
30804    fi
30805  else
30806    # First toolchain type in the list is the default
30807    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30808  fi
30809
30810  if test "x$with_toolchain_type" = xlist; then
30811    # List all toolchains
30812    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30813$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30814    for toolchain in $VALID_TOOLCHAINS; do
30815      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30816      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30817      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30818    done
30819
30820    exit 0
30821  elif test "x$with_toolchain_type" != x; then
30822    # User override; check that it is valid
30823    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30824      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30825$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30826      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30827$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30828      as_fn_error $? "Cannot continue." "$LINENO" 5
30829    fi
30830    TOOLCHAIN_TYPE=$with_toolchain_type
30831  else
30832    # No flag given, use default
30833    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30834  fi
30835
30836
30837  TOOLCHAIN_CC_BINARY_clang="clang"
30838  TOOLCHAIN_CC_BINARY_gcc="gcc"
30839  TOOLCHAIN_CC_BINARY_microsoft="cl"
30840  TOOLCHAIN_CC_BINARY_solstudio="cc"
30841  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30842
30843  TOOLCHAIN_CXX_BINARY_clang="clang++"
30844  TOOLCHAIN_CXX_BINARY_gcc="g++"
30845  TOOLCHAIN_CXX_BINARY_microsoft="cl"
30846  TOOLCHAIN_CXX_BINARY_solstudio="CC"
30847  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30848
30849  # Use indirect variable referencing
30850  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30851  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30852  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30853  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30854  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30855  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30856  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30857  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30858
30859
30860  # Define filename patterns
30861  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30862    LIBRARY_PREFIX=
30863    SHARED_LIBRARY_SUFFIX='.dll'
30864    STATIC_LIBRARY_SUFFIX='.lib'
30865    SHARED_LIBRARY='$1.dll'
30866    STATIC_LIBRARY='$1.lib'
30867    OBJ_SUFFIX='.obj'
30868    EXE_SUFFIX='.exe'
30869  else
30870    LIBRARY_PREFIX=lib
30871    SHARED_LIBRARY_SUFFIX='.so'
30872    STATIC_LIBRARY_SUFFIX='.a'
30873    SHARED_LIBRARY='lib$1.so'
30874    STATIC_LIBRARY='lib$1.a'
30875    OBJ_SUFFIX='.o'
30876    EXE_SUFFIX=''
30877    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30878      # For full static builds, we're overloading the SHARED_LIBRARY
30879      # variables in order to limit the amount of changes required.
30880      # It would be better to remove SHARED and just use LIBRARY and
30881      # LIBRARY_SUFFIX for libraries that can be built either
30882      # shared or static and use STATIC_* for libraries that are
30883      # always built statically.
30884      if test "x$STATIC_BUILD" = xtrue; then
30885        SHARED_LIBRARY='lib$1.a'
30886        SHARED_LIBRARY_SUFFIX='.a'
30887      else
30888        SHARED_LIBRARY='lib$1.dylib'
30889        SHARED_LIBRARY_SUFFIX='.dylib'
30890      fi
30891    fi
30892  fi
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30904    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30905$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30906  else
30907    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30908$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30909  fi
30910
30911
30912# User supplied flags should be used when configure detects compilers
30913
30914  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30915    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30916$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30917  fi
30918
30919  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30920    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30921$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30922  fi
30923
30924  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30925    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30926$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30927  fi
30928
30929
30930# Check whether --with-extra-cflags was given.
30931if test "${with_extra_cflags+set}" = set; then :
30932  withval=$with_extra_cflags;
30933fi
30934
30935
30936
30937# Check whether --with-extra-cxxflags was given.
30938if test "${with_extra_cxxflags+set}" = set; then :
30939  withval=$with_extra_cxxflags;
30940fi
30941
30942
30943
30944# Check whether --with-extra-ldflags was given.
30945if test "${with_extra_ldflags+set}" = set; then :
30946  withval=$with_extra_ldflags;
30947fi
30948
30949
30950  EXTRA_CFLAGS="$with_extra_cflags"
30951  EXTRA_CXXFLAGS="$with_extra_cxxflags"
30952  EXTRA_LDFLAGS="$with_extra_ldflags"
30953
30954  # Hotspot needs these set in their legacy form
30955  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30956  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30957  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967  # The global CFLAGS and LDLAGS variables are used by configure tests and
30968  # should include the extra parameters
30969  CFLAGS="$EXTRA_CFLAGS"
30970  CXXFLAGS="$EXTRA_CXXFLAGS"
30971  LDFLAGS="$EXTRA_LDFLAGS"
30972  CPPFLAGS=""
30973
30974# The sysroot cflags are needed for configure to be able to run the compilers
30975
30976  if test "x$SYSROOT" != "x"; then
30977    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30978      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30979        # Solaris Studio does not have a concept of sysroot. Instead we must
30980        # make sure the default include and lib dirs are appended to each
30981        # compile and link command line. Must also add -I-xbuiltin to enable
30982        # inlining of system functions and intrinsics.
30983        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30984        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30985            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30986            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30987      fi
30988    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30989      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30990      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30991    elif test "x$TOOLCHAIN_TYPE" = xclang; then
30992      SYSROOT_CFLAGS="-isysroot $SYSROOT"
30993      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30994    fi
30995    # Propagate the sysroot args to hotspot
30996    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30997    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30998    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30999    # The global CFLAGS and LDFLAGS variables need these for configure to function
31000    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31001    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31002    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31003    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31004  fi
31005
31006  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31007    # We also need -iframework<path>/System/Library/Frameworks
31008    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31009    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31010    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31011    # set this here so it doesn't have to be peppered throughout the forest
31012    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31013    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31014  fi
31015
31016
31017
31018
31019
31020# Then detect the actual binaries needed
31021
31022  # FIXME: Is this needed?
31023  ac_ext=cpp
31024ac_cpp='$CXXCPP $CPPFLAGS'
31025ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31026ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31027ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31028
31029
31030  # Store the CFLAGS etc passed to the configure script.
31031  ORG_CFLAGS="$CFLAGS"
31032  ORG_CXXFLAGS="$CXXFLAGS"
31033
31034  # autoconf magic only relies on PATH, so update it if tools dir is specified
31035  OLD_PATH="$PATH"
31036
31037  # On Windows, we need to detect the visual studio installation first.
31038  # This will change the PATH, but we need to keep that new PATH even
31039  # after toolchain detection is done, since the compiler (on x86) uses
31040  # it for DLL resolution in runtime.
31041  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31042      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31043
31044  # Store path to cygwin link.exe to help excluding it when searching for
31045  # VS linker. This must be done before changing the PATH when looking for VS.
31046  # Extract the first word of "link", so it can be a program name with args.
31047set dummy link; ac_word=$2
31048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31049$as_echo_n "checking for $ac_word... " >&6; }
31050if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31051  $as_echo_n "(cached) " >&6
31052else
31053  case $CYGWIN_LINK in
31054  [\\/]* | ?:[\\/]*)
31055  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31056  ;;
31057  *)
31058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31059for as_dir in $PATH
31060do
31061  IFS=$as_save_IFS
31062  test -z "$as_dir" && as_dir=.
31063    for ac_exec_ext in '' $ac_executable_extensions; do
31064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31065    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31067    break 2
31068  fi
31069done
31070  done
31071IFS=$as_save_IFS
31072
31073  ;;
31074esac
31075fi
31076CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31077if test -n "$CYGWIN_LINK"; then
31078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31079$as_echo "$CYGWIN_LINK" >&6; }
31080else
31081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31082$as_echo "no" >&6; }
31083fi
31084
31085
31086  if test "x$CYGWIN_LINK" != x; then
31087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31088$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31089    "$CYGWIN_LINK" --version > /dev/null
31090    if test $? -eq 0 ; then
31091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31092$as_echo "yes" >&6; }
31093    else
31094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31095$as_echo "no" >&6; }
31096      # This might be the VS linker. Don't exclude it later on.
31097      CYGWIN_LINK=""
31098    fi
31099  fi
31100
31101  # First-hand choice is to locate and run the vsvars bat file.
31102
31103
31104# Check whether --with-toolchain-version was given.
31105if test "${with_toolchain_version+set}" = set; then :
31106  withval=$with_toolchain_version;
31107fi
31108
31109
31110  if test "x$with_toolchain_version" = xlist; then
31111    # List all toolchains
31112    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31113$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31114    for version in $VALID_VS_VERSIONS; do
31115      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31116      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31117    done
31118
31119    exit 0
31120  elif test "x$DEVKIT_VS_VERSION" != x; then
31121    VS_VERSION=$DEVKIT_VS_VERSION
31122    TOOLCHAIN_VERSION=$VS_VERSION
31123    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31124    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31125    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31126    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31127    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31128    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31129
31130    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31131    # can still be exported as INCLUDE for compiler invocations without
31132    # SYSROOT_CFLAGS
31133    OLDIFS="$IFS"
31134    IFS=";"
31135    for i in $DEVKIT_VS_INCLUDE; do
31136      ipath=$i
31137
31138  unix_path="$ipath"
31139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31140    windows_path=`$CYGPATH -m "$unix_path"`
31141    ipath="$windows_path"
31142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31143    windows_path=`cmd //c echo $unix_path`
31144    ipath="$windows_path"
31145  fi
31146
31147      VS_INCLUDE="$VS_INCLUDE;$ipath"
31148    done
31149    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31150    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31151    for i in $DEVKIT_VS_LIB; do
31152      libpath=$i
31153
31154  unix_path="$libpath"
31155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31156    windows_path=`$CYGPATH -m "$unix_path"`
31157    libpath="$windows_path"
31158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31159    windows_path=`cmd //c echo $unix_path`
31160    libpath="$windows_path"
31161  fi
31162
31163      VS_LIB="$VS_LIB;$libpath"
31164    done
31165    IFS="$OLDIFS"
31166
31167    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31168$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31169
31170  elif test "x$with_toolchain_version" != x; then
31171    # User override; check that it is valid
31172    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31173      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31174$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31175      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31176$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31177      as_fn_error $? "Cannot continue." "$LINENO" 5
31178    fi
31179    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31180  else
31181    # No flag given, use default
31182    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31183  fi
31184
31185  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31186
31187  VS_VERSION="$VS_VERSION"
31188  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31189  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31190  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31191  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31192
31193  # When using --with-tools-dir, assume it points to the correct and default
31194  # version of Visual Studio or that --with-toolchain-version was also set.
31195  if test "x$with_tools_dir" != x; then
31196
31197  if test "x$VS_ENV_CMD" = x; then
31198    VS_VERSION="${VS_VERSION}"
31199    VS_BASE="$with_tools_dir/../.."
31200    METHOD="--with-tools-dir"
31201
31202    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31203      VCVARSFILE="vc/bin/vcvars32.bat"
31204    else
31205      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31206    fi
31207
31208
31209  windows_path="$VS_BASE"
31210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31211    unix_path=`$CYGPATH -u "$windows_path"`
31212    VS_BASE="$unix_path"
31213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31215    VS_BASE="$unix_path"
31216  fi
31217
31218    if test -d "$VS_BASE"; then
31219      if test -f "$VS_BASE/$VCVARSFILE"; then
31220        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31221$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31222        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31223        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31224        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31225        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31226      else
31227        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31228$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31229        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31230$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31231      fi
31232    fi
31233  fi
31234
31235
31236  if test "x$VS_ENV_CMD" = x; then
31237    VS_VERSION="${VS_VERSION}"
31238    VS_BASE="$with_tools_dir/../../.."
31239    METHOD="--with-tools-dir"
31240
31241    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31242      VCVARSFILE="vc/bin/vcvars32.bat"
31243    else
31244      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31245    fi
31246
31247
31248  windows_path="$VS_BASE"
31249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31250    unix_path=`$CYGPATH -u "$windows_path"`
31251    VS_BASE="$unix_path"
31252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31254    VS_BASE="$unix_path"
31255  fi
31256
31257    if test -d "$VS_BASE"; then
31258      if test -f "$VS_BASE/$VCVARSFILE"; then
31259        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31260$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31261        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31262        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31263        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31264        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31265      else
31266        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31267$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31268        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31269$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31270      fi
31271    fi
31272  fi
31273
31274    if test "x$VS_ENV_CMD" = x; then
31275      # Having specified an argument which is incorrect will produce an instant failure;
31276      # we should not go on looking
31277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31278$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31279      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31280$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31281      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31282$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31283      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31284    fi
31285  fi
31286
31287  VS_ENV_CMD=""
31288  VS_ENV_ARGS=""
31289
31290  if test "x$VS_COMNTOOLS" != x; then
31291
31292  if test "x$VS_ENV_CMD" = x; then
31293    VS_VERSION="${VS_VERSION}"
31294    VS_BASE="$VS_COMNTOOLS/../.."
31295    METHOD="$VS_COMNTOOLS_VAR variable"
31296
31297    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31298      VCVARSFILE="vc/bin/vcvars32.bat"
31299    else
31300      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31301    fi
31302
31303
31304  windows_path="$VS_BASE"
31305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31306    unix_path=`$CYGPATH -u "$windows_path"`
31307    VS_BASE="$unix_path"
31308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31310    VS_BASE="$unix_path"
31311  fi
31312
31313    if test -d "$VS_BASE"; then
31314      if test -f "$VS_BASE/$VCVARSFILE"; then
31315        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31316$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31317        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31318        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31319        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31320        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31321      else
31322        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31323$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31324        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31325$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31326      fi
31327    fi
31328  fi
31329
31330  fi
31331  if test "x$PROGRAMFILES" != x; then
31332
31333  if test "x$VS_ENV_CMD" = x; then
31334    VS_VERSION="${VS_VERSION}"
31335    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31336    METHOD="well-known name"
31337
31338    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31339      VCVARSFILE="vc/bin/vcvars32.bat"
31340    else
31341      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31342    fi
31343
31344
31345  windows_path="$VS_BASE"
31346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31347    unix_path=`$CYGPATH -u "$windows_path"`
31348    VS_BASE="$unix_path"
31349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31351    VS_BASE="$unix_path"
31352  fi
31353
31354    if test -d "$VS_BASE"; then
31355      if test -f "$VS_BASE/$VCVARSFILE"; then
31356        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31357$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31358        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31359        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31360        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31361        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31362      else
31363        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31364$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31365        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31366$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31367      fi
31368    fi
31369  fi
31370
31371  fi
31372  # Work around the insanely named ProgramFiles(x86) env variable
31373  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31374  if test "x$PROGRAMFILES_X86" != x; then
31375
31376  if test "x$VS_ENV_CMD" = x; then
31377    VS_VERSION="${VS_VERSION}"
31378    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31379    METHOD="well-known name"
31380
31381    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31382      VCVARSFILE="vc/bin/vcvars32.bat"
31383    else
31384      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31385    fi
31386
31387
31388  windows_path="$VS_BASE"
31389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31390    unix_path=`$CYGPATH -u "$windows_path"`
31391    VS_BASE="$unix_path"
31392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31394    VS_BASE="$unix_path"
31395  fi
31396
31397    if test -d "$VS_BASE"; then
31398      if test -f "$VS_BASE/$VCVARSFILE"; then
31399        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31400$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31401        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31402        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31403        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31404        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31405      else
31406        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31407$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31408        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31409$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31410      fi
31411    fi
31412  fi
31413
31414  fi
31415
31416  if test "x$VS_ENV_CMD" = x; then
31417    VS_VERSION="${VS_VERSION}"
31418    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31419    METHOD="well-known name"
31420
31421    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31422      VCVARSFILE="vc/bin/vcvars32.bat"
31423    else
31424      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31425    fi
31426
31427
31428  windows_path="$VS_BASE"
31429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31430    unix_path=`$CYGPATH -u "$windows_path"`
31431    VS_BASE="$unix_path"
31432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31434    VS_BASE="$unix_path"
31435  fi
31436
31437    if test -d "$VS_BASE"; then
31438      if test -f "$VS_BASE/$VCVARSFILE"; then
31439        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31440$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31441        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31442        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31443        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31444        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31445      else
31446        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31447$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31448        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31449$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31450      fi
31451    fi
31452  fi
31453
31454
31455  if test "x$VS_ENV_CMD" = x; then
31456    VS_VERSION="${VS_VERSION}"
31457    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31458    METHOD="well-known name"
31459
31460    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31461      VCVARSFILE="vc/bin/vcvars32.bat"
31462    else
31463      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31464    fi
31465
31466
31467  windows_path="$VS_BASE"
31468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31469    unix_path=`$CYGPATH -u "$windows_path"`
31470    VS_BASE="$unix_path"
31471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31473    VS_BASE="$unix_path"
31474  fi
31475
31476    if test -d "$VS_BASE"; then
31477      if test -f "$VS_BASE/$VCVARSFILE"; then
31478        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31479$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31480        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31481        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31482        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31483        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31484      else
31485        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31486$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31487        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31488$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31489      fi
31490    fi
31491  fi
31492
31493
31494  if test "x$SDK_INSTALL_DIR" != x; then
31495    if test "x$ProgramW6432" != x; then
31496
31497  if test "x$VS_ENV_CMD" = x; then
31498    VS_VERSION="${VS_VERSION}"
31499    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31500    METHOD="well-known name"
31501
31502  windows_path="$WIN_SDK_BASE"
31503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31504    unix_path=`$CYGPATH -u "$windows_path"`
31505    WIN_SDK_BASE="$unix_path"
31506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31508    WIN_SDK_BASE="$unix_path"
31509  fi
31510
31511    if test -d "$WIN_SDK_BASE"; then
31512      # There have been cases of partial or broken SDK installations. A missing
31513      # lib dir is not going to work.
31514      if test ! -d "$WIN_SDK_BASE/lib"; then
31515        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31516$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31517        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31518$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31519      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31520        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31521$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31522        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31523        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31524          VS_ENV_ARGS="/x86"
31525        else
31526          VS_ENV_ARGS="/x64"
31527        fi
31528        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31529        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31530        # TODO: improve detection for other versions of SDK
31531        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31532      else
31533        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31534$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31535        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31536$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31537      fi
31538    fi
31539  fi
31540
31541    fi
31542    if test "x$PROGRAMW6432" != x; then
31543
31544  if test "x$VS_ENV_CMD" = x; then
31545    VS_VERSION="${VS_VERSION}"
31546    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31547    METHOD="well-known name"
31548
31549  windows_path="$WIN_SDK_BASE"
31550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31551    unix_path=`$CYGPATH -u "$windows_path"`
31552    WIN_SDK_BASE="$unix_path"
31553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31555    WIN_SDK_BASE="$unix_path"
31556  fi
31557
31558    if test -d "$WIN_SDK_BASE"; then
31559      # There have been cases of partial or broken SDK installations. A missing
31560      # lib dir is not going to work.
31561      if test ! -d "$WIN_SDK_BASE/lib"; then
31562        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31563$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31564        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31565$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31566      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31567        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31568$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31569        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31570        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31571          VS_ENV_ARGS="/x86"
31572        else
31573          VS_ENV_ARGS="/x64"
31574        fi
31575        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31576        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31577        # TODO: improve detection for other versions of SDK
31578        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31579      else
31580        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31581$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31582        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31583$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31584      fi
31585    fi
31586  fi
31587
31588    fi
31589    if test "x$PROGRAMFILES" != x; then
31590
31591  if test "x$VS_ENV_CMD" = x; then
31592    VS_VERSION="${VS_VERSION}"
31593    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31594    METHOD="well-known name"
31595
31596  windows_path="$WIN_SDK_BASE"
31597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31598    unix_path=`$CYGPATH -u "$windows_path"`
31599    WIN_SDK_BASE="$unix_path"
31600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31602    WIN_SDK_BASE="$unix_path"
31603  fi
31604
31605    if test -d "$WIN_SDK_BASE"; then
31606      # There have been cases of partial or broken SDK installations. A missing
31607      # lib dir is not going to work.
31608      if test ! -d "$WIN_SDK_BASE/lib"; then
31609        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31610$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31611        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31612$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31613      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31614        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31615$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31616        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31617        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31618          VS_ENV_ARGS="/x86"
31619        else
31620          VS_ENV_ARGS="/x64"
31621        fi
31622        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31623        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31624        # TODO: improve detection for other versions of SDK
31625        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31626      else
31627        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31628$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31629        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31630$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31631      fi
31632    fi
31633  fi
31634
31635    fi
31636
31637  if test "x$VS_ENV_CMD" = x; then
31638    VS_VERSION="${VS_VERSION}"
31639    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31640    METHOD="well-known name"
31641
31642  windows_path="$WIN_SDK_BASE"
31643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31644    unix_path=`$CYGPATH -u "$windows_path"`
31645    WIN_SDK_BASE="$unix_path"
31646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31648    WIN_SDK_BASE="$unix_path"
31649  fi
31650
31651    if test -d "$WIN_SDK_BASE"; then
31652      # There have been cases of partial or broken SDK installations. A missing
31653      # lib dir is not going to work.
31654      if test ! -d "$WIN_SDK_BASE/lib"; then
31655        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31656$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31657        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31658$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31659      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31660        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31661$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31662        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31663        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31664          VS_ENV_ARGS="/x86"
31665        else
31666          VS_ENV_ARGS="/x64"
31667        fi
31668        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31669        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31670        # TODO: improve detection for other versions of SDK
31671        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31672      else
31673        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31674$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31675        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31676$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31677      fi
31678    fi
31679  fi
31680
31681
31682  if test "x$VS_ENV_CMD" = x; then
31683    VS_VERSION="${VS_VERSION}"
31684    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31685    METHOD="well-known name"
31686
31687  windows_path="$WIN_SDK_BASE"
31688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31689    unix_path=`$CYGPATH -u "$windows_path"`
31690    WIN_SDK_BASE="$unix_path"
31691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31693    WIN_SDK_BASE="$unix_path"
31694  fi
31695
31696    if test -d "$WIN_SDK_BASE"; then
31697      # There have been cases of partial or broken SDK installations. A missing
31698      # lib dir is not going to work.
31699      if test ! -d "$WIN_SDK_BASE/lib"; then
31700        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31701$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31702        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31703$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31704      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31705        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31706$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31707        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31708        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31709          VS_ENV_ARGS="/x86"
31710        else
31711          VS_ENV_ARGS="/x64"
31712        fi
31713        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31714        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31715        # TODO: improve detection for other versions of SDK
31716        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31717      else
31718        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31719$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31720        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31721$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31722      fi
31723    fi
31724  fi
31725
31726  fi
31727
31728    if test "x$VS_ENV_CMD" != x; then
31729      TOOLCHAIN_VERSION=$VS_VERSION
31730      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31731      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31732      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31733      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31734      # The rest of the variables are already evaled while probing
31735      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31736$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31737      break
31738    fi
31739  done
31740
31741
31742  # If we have a devkit, skip all of the below.
31743  if test "x$DEVKIT_VS_VERSION" = x; then
31744    if test "x$VS_ENV_CMD" != x; then
31745      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31746
31747  # Only process if variable expands to non-empty
31748
31749  if test "x$VS_ENV_CMD" != x; then
31750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31751
31752  # First separate the path from the arguments. This will split at the first
31753  # space.
31754  complete="$VS_ENV_CMD"
31755  path="${complete%% *}"
31756  tmp="$complete EOL"
31757  arguments="${tmp#* }"
31758
31759  # Input might be given as Windows format, start by converting to
31760  # unix format.
31761  new_path=`$CYGPATH -u "$path"`
31762
31763  # Now try to locate executable using which
31764  new_path=`$WHICH "$new_path" 2> /dev/null`
31765  # bat and cmd files are not always considered executable in cygwin causing which
31766  # to not find them
31767  if test "x$new_path" = x \
31768      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31769      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31770    new_path=`$CYGPATH -u "$path"`
31771  fi
31772  if test "x$new_path" = x; then
31773    # Oops. Which didn't find the executable.
31774    # The splitting of arguments from the executable at a space might have been incorrect,
31775    # since paths with space are more likely in Windows. Give it another try with the whole
31776    # argument.
31777    path="$complete"
31778    arguments="EOL"
31779    new_path=`$CYGPATH -u "$path"`
31780    new_path=`$WHICH "$new_path" 2> /dev/null`
31781    # bat and cmd files are not always considered executable in cygwin causing which
31782    # to not find them
31783    if test "x$new_path" = x \
31784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31786      new_path=`$CYGPATH -u "$path"`
31787    fi
31788    if test "x$new_path" = x; then
31789      # It's still not found. Now this is an unrecoverable error.
31790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31791$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31792      has_space=`$ECHO "$complete" | $GREP " "`
31793      if test "x$has_space" != x; then
31794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31796      fi
31797      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31798    fi
31799  fi
31800
31801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31804  # "foo.exe" is OK but "foo" is an error.
31805  #
31806  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31807  # It is also a way to make sure we got the proper file name for the real test later on.
31808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31809  if test "x$test_shortpath" = x; then
31810    # Short path failed, file does not exist as specified.
31811    # Try adding .exe or .cmd
31812    if test -f "${new_path}.exe"; then
31813      input_to_shortpath="${new_path}.exe"
31814    elif test -f "${new_path}.cmd"; then
31815      input_to_shortpath="${new_path}.cmd"
31816    else
31817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31818$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31821      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31822    fi
31823  else
31824    input_to_shortpath="$new_path"
31825  fi
31826
31827  # Call helper function which possibly converts this using DOS-style short mode.
31828  # If so, the updated path is stored in $new_path.
31829  new_path="$input_to_shortpath"
31830
31831  input_path="$input_to_shortpath"
31832  # Check if we need to convert this using DOS-style short mode. If the path
31833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31834  # take no chances and rewrite it.
31835  # Note: m4 eats our [], so we need to use [ and ] instead.
31836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31837  if test "x$has_forbidden_chars" != x; then
31838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31842      # Going to short mode and back again did indeed matter. Since short mode is
31843      # case insensitive, let's make it lowercase to improve readability.
31844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31845      # Now convert it back to Unix-style (cygpath)
31846      input_path=`$CYGPATH -u "$shortmode_path"`
31847      new_path="$input_path"
31848    fi
31849  fi
31850
31851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31852  if test "x$test_cygdrive_prefix" = x; then
31853    # As a simple fix, exclude /usr/bin since it's not a real path.
31854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31856      # a path prefixed by /cygdrive for fixpath to work.
31857      new_path="$CYGWIN_ROOT_PATH$input_path"
31858    fi
31859  fi
31860
31861  # remove trailing .exe if any
31862  new_path="${new_path/%.exe/}"
31863
31864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31865
31866  # First separate the path from the arguments. This will split at the first
31867  # space.
31868  complete="$VS_ENV_CMD"
31869  path="${complete%% *}"
31870  tmp="$complete EOL"
31871  arguments="${tmp#* }"
31872
31873  # Input might be given as Windows format, start by converting to
31874  # unix format.
31875  new_path="$path"
31876
31877  windows_path="$new_path"
31878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31879    unix_path=`$CYGPATH -u "$windows_path"`
31880    new_path="$unix_path"
31881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31883    new_path="$unix_path"
31884  fi
31885
31886
31887  # Now try to locate executable using which
31888  new_path=`$WHICH "$new_path" 2> /dev/null`
31889
31890  if test "x$new_path" = x; then
31891    # Oops. Which didn't find the executable.
31892    # The splitting of arguments from the executable at a space might have been incorrect,
31893    # since paths with space are more likely in Windows. Give it another try with the whole
31894    # argument.
31895    path="$complete"
31896    arguments="EOL"
31897    new_path="$path"
31898
31899  windows_path="$new_path"
31900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31901    unix_path=`$CYGPATH -u "$windows_path"`
31902    new_path="$unix_path"
31903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31905    new_path="$unix_path"
31906  fi
31907
31908
31909    new_path=`$WHICH "$new_path" 2> /dev/null`
31910    # bat and cmd files are not always considered executable in MSYS causing which
31911    # to not find them
31912    if test "x$new_path" = x \
31913        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31914        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31915      new_path="$path"
31916
31917  windows_path="$new_path"
31918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31919    unix_path=`$CYGPATH -u "$windows_path"`
31920    new_path="$unix_path"
31921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31923    new_path="$unix_path"
31924  fi
31925
31926    fi
31927
31928    if test "x$new_path" = x; then
31929      # It's still not found. Now this is an unrecoverable error.
31930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31931$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31932      has_space=`$ECHO "$complete" | $GREP " "`
31933      if test "x$has_space" != x; then
31934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31936      fi
31937      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31938    fi
31939  fi
31940
31941  # Now new_path has a complete unix path to the binary
31942  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31943    # Keep paths in /bin as-is, but remove trailing .exe if any
31944    new_path="${new_path/%.exe/}"
31945    # Do not save /bin paths to all_fixpath_prefixes!
31946  else
31947    # Not in mixed or Windows style, start by that.
31948    new_path=`cmd //c echo $new_path`
31949
31950  input_path="$new_path"
31951  # Check if we need to convert this using DOS-style short mode. If the path
31952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31953  # take no chances and rewrite it.
31954  # Note: m4 eats our [], so we need to use [ and ] instead.
31955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31956  if test "x$has_forbidden_chars" != x; then
31957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31959  fi
31960
31961    # Output is in $new_path
31962
31963  windows_path="$new_path"
31964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31965    unix_path=`$CYGPATH -u "$windows_path"`
31966    new_path="$unix_path"
31967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31969    new_path="$unix_path"
31970  fi
31971
31972    # remove trailing .exe if any
31973    new_path="${new_path/%.exe/}"
31974
31975    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31976    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31977  fi
31978
31979    else
31980      # We're on a unix platform. Hooray! :)
31981      # First separate the path from the arguments. This will split at the first
31982      # space.
31983      complete="$VS_ENV_CMD"
31984      path="${complete%% *}"
31985      tmp="$complete EOL"
31986      arguments="${tmp#* }"
31987
31988      # Cannot rely on the command "which" here since it doesn't always work.
31989      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31990      if test -z "$is_absolute_path"; then
31991        # Path to executable is not absolute. Find it.
31992        IFS_save="$IFS"
31993        IFS=:
31994        for p in $PATH; do
31995          if test -f "$p/$path" && test -x "$p/$path"; then
31996            new_path="$p/$path"
31997            break
31998          fi
31999        done
32000        IFS="$IFS_save"
32001      else
32002        # This is an absolute path, we can use it without further modifications.
32003        new_path="$path"
32004      fi
32005
32006      if test "x$new_path" = x; then
32007        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32008$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32009        has_space=`$ECHO "$complete" | $GREP " "`
32010        if test "x$has_space" != x; then
32011          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32012$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32013        fi
32014        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32015      fi
32016    fi
32017
32018    # Now join together the path and the arguments once again
32019    if test "x$arguments" != xEOL; then
32020      new_complete="$new_path ${arguments% *}"
32021    else
32022      new_complete="$new_path"
32023    fi
32024
32025    if test "x$complete" != "x$new_complete"; then
32026      VS_ENV_CMD="$new_complete"
32027      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32028$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32029    fi
32030  fi
32031
32032
32033      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32034      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32035$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32036
32037      # We need to create a couple of temporary files.
32038      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32039      $MKDIR -p $VS_ENV_TMP_DIR
32040
32041      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32042      # Instead create a shell script which will set the relevant variables when run.
32043      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32044
32045  unix_path="$WINPATH_VS_ENV_CMD"
32046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32047    windows_path=`$CYGPATH -m "$unix_path"`
32048    WINPATH_VS_ENV_CMD="$windows_path"
32049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32050    windows_path=`cmd //c echo $unix_path`
32051    WINPATH_VS_ENV_CMD="$windows_path"
32052  fi
32053
32054      WINPATH_BASH="$BASH"
32055
32056  unix_path="$WINPATH_BASH"
32057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32058    windows_path=`$CYGPATH -m "$unix_path"`
32059    WINPATH_BASH="$windows_path"
32060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32061    windows_path=`cmd //c echo $unix_path`
32062    WINPATH_BASH="$windows_path"
32063  fi
32064
32065
32066      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32067      # script (executable by bash) that will setup the important variables.
32068      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32069      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32070      # This will end up something like:
32071      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32072      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32073      # These will end up something like:
32074      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32075      # The trailing space for everyone except PATH is no typo, but is needed due
32076      # to trailing \ in the Windows paths. These will be stripped later.
32077      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32078          >> $EXTRACT_VC_ENV_BAT_FILE
32079      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32080          >> $EXTRACT_VC_ENV_BAT_FILE
32081      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32082          >> $EXTRACT_VC_ENV_BAT_FILE
32083      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32084          >> $EXTRACT_VC_ENV_BAT_FILE
32085      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32086          >> $EXTRACT_VC_ENV_BAT_FILE
32087      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32088          >> $EXTRACT_VC_ENV_BAT_FILE
32089
32090      # Now execute the newly created bat file.
32091      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32092      # Change directory so we don't need to mess with Windows paths in redirects.
32093      cd $VS_ENV_TMP_DIR
32094      cmd /c extract-vs-env.bat | $CAT
32095      cd $CURDIR
32096
32097      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32098        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32099$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32100        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32101$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32102        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32103$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32104        as_fn_error $? "Cannot continue" "$LINENO" 5
32105      fi
32106
32107      # Now set all paths and other env variables. This will allow the rest of
32108      # the configure script to find and run the compiler in the proper way.
32109      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32110$as_echo "$as_me: Setting extracted environment variables" >&6;}
32111      . $VS_ENV_TMP_DIR/set-vs-env.sh
32112      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32113      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32114    else
32115      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32116      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32117$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32118    fi
32119  fi
32120
32121  # At this point, we should have correct variables in the environment, or we can't continue.
32122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32123$as_echo_n "checking for Visual Studio variables... " >&6; }
32124
32125  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32126      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32127    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32128      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32129$as_echo "present but broken" >&6; }
32130      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32131    else
32132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32133$as_echo "ok" >&6; }
32134      # Remove any trailing "\" ";" and " " from the variables.
32135      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32136      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32137      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32138      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32139      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32140      # Remove any paths containing # (typically F#) as that messes up make. This
32141      # is needed if visual studio was installed with F# support.
32142      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32143
32144
32145
32146
32147
32148      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32149      OLDIFS="$IFS"
32150      IFS=";"
32151      for i in $VS_INCLUDE; do
32152        ipath=$i
32153        # Only process non-empty elements
32154        if test "x$ipath" != x; then
32155          IFS="$OLDIFS"
32156          # Check that directory exists before calling fixup_path
32157          testpath=$ipath
32158
32159  windows_path="$testpath"
32160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32161    unix_path=`$CYGPATH -u "$windows_path"`
32162    testpath="$unix_path"
32163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32165    testpath="$unix_path"
32166  fi
32167
32168          if test -d "$testpath"; then
32169
32170  # Only process if variable expands to non-empty
32171
32172  if test "x$ipath" != x; then
32173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32174
32175  # Input might be given as Windows format, start by converting to
32176  # unix format.
32177  path="$ipath"
32178  new_path=`$CYGPATH -u "$path"`
32179
32180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32183  # "foo.exe" is OK but "foo" is an error.
32184  #
32185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32186  # It is also a way to make sure we got the proper file name for the real test later on.
32187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32188  if test "x$test_shortpath" = x; then
32189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32190$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32191    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32192  fi
32193
32194  # Call helper function which possibly converts this using DOS-style short mode.
32195  # If so, the updated path is stored in $new_path.
32196
32197  input_path="$new_path"
32198  # Check if we need to convert this using DOS-style short mode. If the path
32199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32200  # take no chances and rewrite it.
32201  # Note: m4 eats our [], so we need to use [ and ] instead.
32202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32203  if test "x$has_forbidden_chars" != x; then
32204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32208      # Going to short mode and back again did indeed matter. Since short mode is
32209      # case insensitive, let's make it lowercase to improve readability.
32210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32211      # Now convert it back to Unix-style (cygpath)
32212      input_path=`$CYGPATH -u "$shortmode_path"`
32213      new_path="$input_path"
32214    fi
32215  fi
32216
32217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32218  if test "x$test_cygdrive_prefix" = x; then
32219    # As a simple fix, exclude /usr/bin since it's not a real path.
32220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32222      # a path prefixed by /cygdrive for fixpath to work.
32223      new_path="$CYGWIN_ROOT_PATH$input_path"
32224    fi
32225  fi
32226
32227
32228  if test "x$path" != "x$new_path"; then
32229    ipath="$new_path"
32230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32231$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32232  fi
32233
32234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32235
32236  path="$ipath"
32237  has_colon=`$ECHO $path | $GREP ^.:`
32238  new_path="$path"
32239  if test "x$has_colon" = x; then
32240    # Not in mixed or Windows style, start by that.
32241    new_path=`cmd //c echo $path`
32242  fi
32243
32244
32245  input_path="$new_path"
32246  # Check if we need to convert this using DOS-style short mode. If the path
32247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32248  # take no chances and rewrite it.
32249  # Note: m4 eats our [], so we need to use [ and ] instead.
32250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32251  if test "x$has_forbidden_chars" != x; then
32252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32254  fi
32255
32256
32257  windows_path="$new_path"
32258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32259    unix_path=`$CYGPATH -u "$windows_path"`
32260    new_path="$unix_path"
32261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32263    new_path="$unix_path"
32264  fi
32265
32266  if test "x$path" != "x$new_path"; then
32267    ipath="$new_path"
32268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32269$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32270  fi
32271
32272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32274
32275    else
32276      # We're on a unix platform. Hooray! :)
32277      path="$ipath"
32278      has_space=`$ECHO "$path" | $GREP " "`
32279      if test "x$has_space" != x; then
32280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32281$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32283      fi
32284
32285      # Use eval to expand a potential ~
32286      eval path="$path"
32287      if test ! -f "$path" && test ! -d "$path"; then
32288        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32289      fi
32290
32291      if test -d "$path"; then
32292        ipath="`cd "$path"; $THEPWDCMD -L`"
32293      else
32294        dir="`$DIRNAME "$path"`"
32295        base="`$BASENAME "$path"`"
32296        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32297      fi
32298    fi
32299  fi
32300
32301            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32302          fi
32303          IFS=";"
32304        fi
32305      done
32306      # Convert VS_LIB into SYSROOT_LDFLAGS
32307      for i in $VS_LIB; do
32308        libpath=$i
32309        # Only process non-empty elements
32310        if test "x$libpath" != x; then
32311          IFS="$OLDIFS"
32312          # Check that directory exists before calling fixup_path
32313          testpath=$libpath
32314
32315  windows_path="$testpath"
32316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32317    unix_path=`$CYGPATH -u "$windows_path"`
32318    testpath="$unix_path"
32319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32321    testpath="$unix_path"
32322  fi
32323
32324          if test -d "$testpath"; then
32325
32326  # Only process if variable expands to non-empty
32327
32328  if test "x$libpath" != x; then
32329    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32330
32331  # Input might be given as Windows format, start by converting to
32332  # unix format.
32333  path="$libpath"
32334  new_path=`$CYGPATH -u "$path"`
32335
32336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32339  # "foo.exe" is OK but "foo" is an error.
32340  #
32341  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32342  # It is also a way to make sure we got the proper file name for the real test later on.
32343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32344  if test "x$test_shortpath" = x; then
32345    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32346$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32347    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32348  fi
32349
32350  # Call helper function which possibly converts this using DOS-style short mode.
32351  # If so, the updated path is stored in $new_path.
32352
32353  input_path="$new_path"
32354  # Check if we need to convert this using DOS-style short mode. If the path
32355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32356  # take no chances and rewrite it.
32357  # Note: m4 eats our [], so we need to use [ and ] instead.
32358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32359  if test "x$has_forbidden_chars" != x; then
32360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32364      # Going to short mode and back again did indeed matter. Since short mode is
32365      # case insensitive, let's make it lowercase to improve readability.
32366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32367      # Now convert it back to Unix-style (cygpath)
32368      input_path=`$CYGPATH -u "$shortmode_path"`
32369      new_path="$input_path"
32370    fi
32371  fi
32372
32373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32374  if test "x$test_cygdrive_prefix" = x; then
32375    # As a simple fix, exclude /usr/bin since it's not a real path.
32376    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32378      # a path prefixed by /cygdrive for fixpath to work.
32379      new_path="$CYGWIN_ROOT_PATH$input_path"
32380    fi
32381  fi
32382
32383
32384  if test "x$path" != "x$new_path"; then
32385    libpath="$new_path"
32386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32387$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32388  fi
32389
32390    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32391
32392  path="$libpath"
32393  has_colon=`$ECHO $path | $GREP ^.:`
32394  new_path="$path"
32395  if test "x$has_colon" = x; then
32396    # Not in mixed or Windows style, start by that.
32397    new_path=`cmd //c echo $path`
32398  fi
32399
32400
32401  input_path="$new_path"
32402  # Check if we need to convert this using DOS-style short mode. If the path
32403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32404  # take no chances and rewrite it.
32405  # Note: m4 eats our [], so we need to use [ and ] instead.
32406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32407  if test "x$has_forbidden_chars" != x; then
32408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32410  fi
32411
32412
32413  windows_path="$new_path"
32414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32415    unix_path=`$CYGPATH -u "$windows_path"`
32416    new_path="$unix_path"
32417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32419    new_path="$unix_path"
32420  fi
32421
32422  if test "x$path" != "x$new_path"; then
32423    libpath="$new_path"
32424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32425$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32426  fi
32427
32428  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32429  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32430
32431    else
32432      # We're on a unix platform. Hooray! :)
32433      path="$libpath"
32434      has_space=`$ECHO "$path" | $GREP " "`
32435      if test "x$has_space" != x; then
32436        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32437$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32438        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32439      fi
32440
32441      # Use eval to expand a potential ~
32442      eval path="$path"
32443      if test ! -f "$path" && test ! -d "$path"; then
32444        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32445      fi
32446
32447      if test -d "$path"; then
32448        libpath="`cd "$path"; $THEPWDCMD -L`"
32449      else
32450        dir="`$DIRNAME "$path"`"
32451        base="`$BASENAME "$path"`"
32452        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32453      fi
32454    fi
32455  fi
32456
32457            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32458          fi
32459          IFS=";"
32460        fi
32461      done
32462      IFS="$OLDIFS"
32463    fi
32464  else
32465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32466$as_echo "not found" >&6; }
32467
32468    if test "x$VS_ENV_CMD" = x; then
32469      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32470$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32471      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32472$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32473    else
32474      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32475$as_echo "$as_me: Running the extraction script failed." >&6;}
32476    fi
32477    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32478$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32479    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32480$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32481    as_fn_error $? "Cannot continue" "$LINENO" 5
32482  fi
32483
32484    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32485    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32486    PATH="$VS_PATH"
32487    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32488    export INCLUDE="$VS_INCLUDE"
32489    export LIB="$VS_LIB"
32490  else
32491    if test "x$XCODE_VERSION_OUTPUT" != x; then
32492      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32493      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32494      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32495    else
32496      # Currently we do not define this for other toolchains. This might change as the need arise.
32497      TOOLCHAIN_VERSION=
32498    fi
32499  fi
32500
32501
32502  # For solaris we really need solaris tools, and not the GNU equivalent.
32503  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32504  # so add that to path before starting to probe.
32505  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32506  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32507    PATH="/usr/ccs/bin:$PATH"
32508  fi
32509
32510  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32511  # override all other locations.
32512  if test "x$TOOLCHAIN_PATH" != x; then
32513    PATH=$TOOLCHAIN_PATH:$PATH
32514  fi
32515
32516
32517  #
32518  # Setup the compilers (CC and CXX)
32519  #
32520
32521  COMPILER_NAME=C
32522  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32523
32524  if test "x$CC" != x; then
32525    # User has supplied compiler name already, always let that override.
32526    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32527$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32528    if test "x`basename $CC`" = "x$CC"; then
32529      # A command without a complete path is provided, search $PATH.
32530
32531      for ac_prog in $CC
32532do
32533  # Extract the first word of "$ac_prog", so it can be a program name with args.
32534set dummy $ac_prog; ac_word=$2
32535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32536$as_echo_n "checking for $ac_word... " >&6; }
32537if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32538  $as_echo_n "(cached) " >&6
32539else
32540  case $POTENTIAL_CC in
32541  [\\/]* | ?:[\\/]*)
32542  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32543  ;;
32544  *)
32545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32546for as_dir in $PATH
32547do
32548  IFS=$as_save_IFS
32549  test -z "$as_dir" && as_dir=.
32550    for ac_exec_ext in '' $ac_executable_extensions; do
32551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32552    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32554    break 2
32555  fi
32556done
32557  done
32558IFS=$as_save_IFS
32559
32560  ;;
32561esac
32562fi
32563POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32564if test -n "$POTENTIAL_CC"; then
32565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32566$as_echo "$POTENTIAL_CC" >&6; }
32567else
32568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32569$as_echo "no" >&6; }
32570fi
32571
32572
32573  test -n "$POTENTIAL_CC" && break
32574done
32575
32576      if test "x$POTENTIAL_CC" != x; then
32577        CC=$POTENTIAL_CC
32578      else
32579        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32580      fi
32581    else
32582      # Otherwise it might already be a complete path
32583      if test ! -x "$CC"; then
32584        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32585      fi
32586    fi
32587  else
32588    # No user supplied value. Locate compiler ourselves.
32589
32590    # If we are cross compiling, assume cross compilation tools follows the
32591    # cross compilation standard where they are prefixed with the autoconf
32592    # standard name for the target. For example the binary
32593    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32594    # If we are not cross compiling, then the default compiler name will be
32595    # used.
32596
32597    CC=
32598    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32599    # before checking the rest of the PATH.
32600    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32601    # step, this should not be necessary.
32602    if test -n "$TOOLCHAIN_PATH"; then
32603      PATH_save="$PATH"
32604      PATH="$TOOLCHAIN_PATH"
32605      for ac_prog in $SEARCH_LIST
32606do
32607  # Extract the first word of "$ac_prog", so it can be a program name with args.
32608set dummy $ac_prog; ac_word=$2
32609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32610$as_echo_n "checking for $ac_word... " >&6; }
32611if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32612  $as_echo_n "(cached) " >&6
32613else
32614  case $TOOLCHAIN_PATH_CC in
32615  [\\/]* | ?:[\\/]*)
32616  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32617  ;;
32618  *)
32619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32620for as_dir in $PATH
32621do
32622  IFS=$as_save_IFS
32623  test -z "$as_dir" && as_dir=.
32624    for ac_exec_ext in '' $ac_executable_extensions; do
32625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32626    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32628    break 2
32629  fi
32630done
32631  done
32632IFS=$as_save_IFS
32633
32634  ;;
32635esac
32636fi
32637TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32638if test -n "$TOOLCHAIN_PATH_CC"; then
32639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32640$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32641else
32642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32643$as_echo "no" >&6; }
32644fi
32645
32646
32647  test -n "$TOOLCHAIN_PATH_CC" && break
32648done
32649
32650      CC=$TOOLCHAIN_PATH_CC
32651      PATH="$PATH_save"
32652    fi
32653
32654    # AC_PATH_PROGS can't be run multiple times with the same variable,
32655    # so create a new name for this run.
32656    if test "x$CC" = x; then
32657      for ac_prog in $SEARCH_LIST
32658do
32659  # Extract the first word of "$ac_prog", so it can be a program name with args.
32660set dummy $ac_prog; ac_word=$2
32661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32662$as_echo_n "checking for $ac_word... " >&6; }
32663if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32664  $as_echo_n "(cached) " >&6
32665else
32666  case $POTENTIAL_CC in
32667  [\\/]* | ?:[\\/]*)
32668  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32669  ;;
32670  *)
32671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32672for as_dir in $PATH
32673do
32674  IFS=$as_save_IFS
32675  test -z "$as_dir" && as_dir=.
32676    for ac_exec_ext in '' $ac_executable_extensions; do
32677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32678    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32680    break 2
32681  fi
32682done
32683  done
32684IFS=$as_save_IFS
32685
32686  ;;
32687esac
32688fi
32689POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32690if test -n "$POTENTIAL_CC"; then
32691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32692$as_echo "$POTENTIAL_CC" >&6; }
32693else
32694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32695$as_echo "no" >&6; }
32696fi
32697
32698
32699  test -n "$POTENTIAL_CC" && break
32700done
32701
32702      CC=$POTENTIAL_CC
32703    fi
32704
32705    if test "x$CC" = x; then
32706
32707  # Print a helpful message on how to acquire the necessary build dependency.
32708  # devkit is the help tag: freetype, cups, alsa etc
32709  MISSING_DEPENDENCY=devkit
32710
32711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32712    cygwin_help $MISSING_DEPENDENCY
32713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32714    msys_help $MISSING_DEPENDENCY
32715  else
32716    PKGHANDLER_COMMAND=
32717
32718    case $PKGHANDLER in
32719      apt-get)
32720        apt_help     $MISSING_DEPENDENCY ;;
32721      yum)
32722        yum_help     $MISSING_DEPENDENCY ;;
32723      port)
32724        port_help    $MISSING_DEPENDENCY ;;
32725      pkgutil)
32726        pkgutil_help $MISSING_DEPENDENCY ;;
32727      pkgadd)
32728        pkgadd_help  $MISSING_DEPENDENCY ;;
32729    esac
32730
32731    if test "x$PKGHANDLER_COMMAND" != x; then
32732      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32733    fi
32734  fi
32735
32736      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32737    fi
32738  fi
32739
32740  # Now we have a compiler binary in CC. Make sure it's okay.
32741
32742  # Only process if variable expands to non-empty
32743
32744  if test "x$CC" != x; then
32745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32746
32747  # First separate the path from the arguments. This will split at the first
32748  # space.
32749  complete="$CC"
32750  path="${complete%% *}"
32751  tmp="$complete EOL"
32752  arguments="${tmp#* }"
32753
32754  # Input might be given as Windows format, start by converting to
32755  # unix format.
32756  new_path=`$CYGPATH -u "$path"`
32757
32758  # Now try to locate executable using which
32759  new_path=`$WHICH "$new_path" 2> /dev/null`
32760  # bat and cmd files are not always considered executable in cygwin causing which
32761  # to not find them
32762  if test "x$new_path" = x \
32763      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32764      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32765    new_path=`$CYGPATH -u "$path"`
32766  fi
32767  if test "x$new_path" = x; then
32768    # Oops. Which didn't find the executable.
32769    # The splitting of arguments from the executable at a space might have been incorrect,
32770    # since paths with space are more likely in Windows. Give it another try with the whole
32771    # argument.
32772    path="$complete"
32773    arguments="EOL"
32774    new_path=`$CYGPATH -u "$path"`
32775    new_path=`$WHICH "$new_path" 2> /dev/null`
32776    # bat and cmd files are not always considered executable in cygwin causing which
32777    # to not find them
32778    if test "x$new_path" = x \
32779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32781      new_path=`$CYGPATH -u "$path"`
32782    fi
32783    if test "x$new_path" = x; then
32784      # It's still not found. Now this is an unrecoverable error.
32785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32786$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32787      has_space=`$ECHO "$complete" | $GREP " "`
32788      if test "x$has_space" != x; then
32789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32791      fi
32792      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32793    fi
32794  fi
32795
32796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32799  # "foo.exe" is OK but "foo" is an error.
32800  #
32801  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32802  # It is also a way to make sure we got the proper file name for the real test later on.
32803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32804  if test "x$test_shortpath" = x; then
32805    # Short path failed, file does not exist as specified.
32806    # Try adding .exe or .cmd
32807    if test -f "${new_path}.exe"; then
32808      input_to_shortpath="${new_path}.exe"
32809    elif test -f "${new_path}.cmd"; then
32810      input_to_shortpath="${new_path}.cmd"
32811    else
32812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32813$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32814      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32815$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32816      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32817    fi
32818  else
32819    input_to_shortpath="$new_path"
32820  fi
32821
32822  # Call helper function which possibly converts this using DOS-style short mode.
32823  # If so, the updated path is stored in $new_path.
32824  new_path="$input_to_shortpath"
32825
32826  input_path="$input_to_shortpath"
32827  # Check if we need to convert this using DOS-style short mode. If the path
32828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32829  # take no chances and rewrite it.
32830  # Note: m4 eats our [], so we need to use [ and ] instead.
32831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32832  if test "x$has_forbidden_chars" != x; then
32833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32837      # Going to short mode and back again did indeed matter. Since short mode is
32838      # case insensitive, let's make it lowercase to improve readability.
32839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32840      # Now convert it back to Unix-style (cygpath)
32841      input_path=`$CYGPATH -u "$shortmode_path"`
32842      new_path="$input_path"
32843    fi
32844  fi
32845
32846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32847  if test "x$test_cygdrive_prefix" = x; then
32848    # As a simple fix, exclude /usr/bin since it's not a real path.
32849    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32851      # a path prefixed by /cygdrive for fixpath to work.
32852      new_path="$CYGWIN_ROOT_PATH$input_path"
32853    fi
32854  fi
32855
32856  # remove trailing .exe if any
32857  new_path="${new_path/%.exe/}"
32858
32859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32860
32861  # First separate the path from the arguments. This will split at the first
32862  # space.
32863  complete="$CC"
32864  path="${complete%% *}"
32865  tmp="$complete EOL"
32866  arguments="${tmp#* }"
32867
32868  # Input might be given as Windows format, start by converting to
32869  # unix format.
32870  new_path="$path"
32871
32872  windows_path="$new_path"
32873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32874    unix_path=`$CYGPATH -u "$windows_path"`
32875    new_path="$unix_path"
32876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32878    new_path="$unix_path"
32879  fi
32880
32881
32882  # Now try to locate executable using which
32883  new_path=`$WHICH "$new_path" 2> /dev/null`
32884
32885  if test "x$new_path" = x; then
32886    # Oops. Which didn't find the executable.
32887    # The splitting of arguments from the executable at a space might have been incorrect,
32888    # since paths with space are more likely in Windows. Give it another try with the whole
32889    # argument.
32890    path="$complete"
32891    arguments="EOL"
32892    new_path="$path"
32893
32894  windows_path="$new_path"
32895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32896    unix_path=`$CYGPATH -u "$windows_path"`
32897    new_path="$unix_path"
32898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32900    new_path="$unix_path"
32901  fi
32902
32903
32904    new_path=`$WHICH "$new_path" 2> /dev/null`
32905    # bat and cmd files are not always considered executable in MSYS causing which
32906    # to not find them
32907    if test "x$new_path" = x \
32908        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32909        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32910      new_path="$path"
32911
32912  windows_path="$new_path"
32913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32914    unix_path=`$CYGPATH -u "$windows_path"`
32915    new_path="$unix_path"
32916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32918    new_path="$unix_path"
32919  fi
32920
32921    fi
32922
32923    if test "x$new_path" = x; then
32924      # It's still not found. Now this is an unrecoverable error.
32925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32926$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32927      has_space=`$ECHO "$complete" | $GREP " "`
32928      if test "x$has_space" != x; then
32929        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32930$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32931      fi
32932      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32933    fi
32934  fi
32935
32936  # Now new_path has a complete unix path to the binary
32937  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32938    # Keep paths in /bin as-is, but remove trailing .exe if any
32939    new_path="${new_path/%.exe/}"
32940    # Do not save /bin paths to all_fixpath_prefixes!
32941  else
32942    # Not in mixed or Windows style, start by that.
32943    new_path=`cmd //c echo $new_path`
32944
32945  input_path="$new_path"
32946  # Check if we need to convert this using DOS-style short mode. If the path
32947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32948  # take no chances and rewrite it.
32949  # Note: m4 eats our [], so we need to use [ and ] instead.
32950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32951  if test "x$has_forbidden_chars" != x; then
32952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32954  fi
32955
32956    # Output is in $new_path
32957
32958  windows_path="$new_path"
32959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32960    unix_path=`$CYGPATH -u "$windows_path"`
32961    new_path="$unix_path"
32962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32964    new_path="$unix_path"
32965  fi
32966
32967    # remove trailing .exe if any
32968    new_path="${new_path/%.exe/}"
32969
32970    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32971    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32972  fi
32973
32974    else
32975      # We're on a unix platform. Hooray! :)
32976      # First separate the path from the arguments. This will split at the first
32977      # space.
32978      complete="$CC"
32979      path="${complete%% *}"
32980      tmp="$complete EOL"
32981      arguments="${tmp#* }"
32982
32983      # Cannot rely on the command "which" here since it doesn't always work.
32984      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32985      if test -z "$is_absolute_path"; then
32986        # Path to executable is not absolute. Find it.
32987        IFS_save="$IFS"
32988        IFS=:
32989        for p in $PATH; do
32990          if test -f "$p/$path" && test -x "$p/$path"; then
32991            new_path="$p/$path"
32992            break
32993          fi
32994        done
32995        IFS="$IFS_save"
32996      else
32997        # This is an absolute path, we can use it without further modifications.
32998        new_path="$path"
32999      fi
33000
33001      if test "x$new_path" = x; then
33002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33003$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33004        has_space=`$ECHO "$complete" | $GREP " "`
33005        if test "x$has_space" != x; then
33006          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33007$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33008        fi
33009        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33010      fi
33011    fi
33012
33013    # Now join together the path and the arguments once again
33014    if test "x$arguments" != xEOL; then
33015      new_complete="$new_path ${arguments% *}"
33016    else
33017      new_complete="$new_path"
33018    fi
33019
33020    if test "x$complete" != "x$new_complete"; then
33021      CC="$new_complete"
33022      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33023$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33024    fi
33025  fi
33026
33027  TEST_COMPILER="$CC"
33028
33029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33030$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33031  SYMLINK_ORIGINAL="$TEST_COMPILER"
33032
33033  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33034    # Follow a chain of symbolic links. Use readlink
33035    # where it exists, else fall back to horribly
33036    # complicated shell code.
33037    if test "x$READLINK_TESTED" != yes; then
33038      # On MacOSX there is a readlink tool with a different
33039      # purpose than the GNU readlink tool. Check the found readlink.
33040      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33041      if test "x$ISGNU" = x; then
33042        # A readlink that we do not know how to use.
33043        # Are there other non-GNU readlinks out there?
33044        READLINK_TESTED=yes
33045        READLINK=
33046      fi
33047    fi
33048
33049    if test "x$READLINK" != x; then
33050      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33051    else
33052      # Save the current directory for restoring afterwards
33053      STARTDIR=$PWD
33054      COUNTER=0
33055      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33056      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33057      cd $sym_link_dir
33058      # Use -P flag to resolve symlinks in directories.
33059      cd `$THEPWDCMD -P`
33060      sym_link_dir=`$THEPWDCMD -P`
33061      # Resolve file symlinks
33062      while test $COUNTER -lt 20; do
33063        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33064        if test "x$ISLINK" == x; then
33065          # This is not a symbolic link! We are done!
33066          break
33067        fi
33068        # Again resolve directory symlinks since the target of the just found
33069        # link could be in a different directory
33070        cd `$DIRNAME $ISLINK`
33071        sym_link_dir=`$THEPWDCMD -P`
33072        sym_link_file=`$BASENAME $ISLINK`
33073        let COUNTER=COUNTER+1
33074      done
33075      cd $STARTDIR
33076      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33077    fi
33078  fi
33079
33080  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33082$as_echo "no symlink" >&6; }
33083  else
33084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33085$as_echo "$SYMLINK_ORIGINAL" >&6; }
33086
33087    # We can't handle ccache by gcc wrappers, since we need to know if we're
33088    # using ccache. Instead ccache usage must be controlled by a configure option.
33089    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33090    if test "x$COMPILER_BASENAME" = "xccache"; then
33091      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33092$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33093      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33094    fi
33095  fi
33096
33097
33098  COMPILER=$CC
33099  COMPILER_NAME=$COMPILER_NAME
33100
33101  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33102    # cc -V output typically looks like
33103    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33104    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33105    # Check that this is likely to be the Solaris Studio cc.
33106    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33107    if test $? -ne 0; then
33108      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33109      { $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
33110$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33111      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33112$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33113      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33114$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33115      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33116    fi
33117    # Remove usage instructions (if present), and
33118    # collapse compiler output into a single line
33119    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33120        $SED -e 's/ *[Uu]sage:.*//'`
33121    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33122        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33123  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33124    # xlc -qversion output typically looks like
33125    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33126    #     Version: 11.01.0000.0015
33127    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33128    # Check that this is likely to be the IBM XL C compiler.
33129    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33130    if test $? -ne 0; then
33131      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33132      { $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
33133$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33134      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33135$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33136      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33137$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33138      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33139    fi
33140    # Collapse compiler output into a single line
33141    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33142    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33143        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33144  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33145    # There is no specific version flag, but all output starts with a version string.
33146    # First line typically looks something like:
33147    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33148    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33149    # Check that this is likely to be Microsoft CL.EXE.
33150    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33151    if test $? -ne 0; then
33152      { $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
33153$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33154      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33155$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33156      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33157    fi
33158    # Collapse compiler output into a single line
33159    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33160    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33161        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33162  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33163    # gcc --version output typically looks like
33164    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33165    #     Copyright (C) 2013 Free Software Foundation, Inc.
33166    #     This is free software; see the source for copying conditions.  There is NO
33167    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33168    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33169    # Check that this is likely to be GCC.
33170    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33171    if test $? -ne 0; then
33172      { $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
33173$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33174      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33175$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33176      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33177    fi
33178    # Remove Copyright and legalese from version string, and
33179    # collapse into a single line
33180    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33181        $SED -e 's/ *Copyright .*//'`
33182    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33183        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33184  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33185    # clang --version output typically looks like
33186    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33187    #    clang version 3.3 (tags/RELEASE_33/final)
33188    # or
33189    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33190    #    Target: x86_64-pc-linux-gnu
33191    #    Thread model: posix
33192    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33193    # Check that this is likely to be clang
33194    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33195    if test $? -ne 0; then
33196      { $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
33197$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33198      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33199$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33200      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33201    fi
33202    # Collapse compiler output into a single line
33203    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33204    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33205        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33206  else
33207      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33208  fi
33209  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33210  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33211  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33212  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33213
33214  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33215$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33216
33217
33218  # Now that we have resolved CC ourself, let autoconf have its go at it
33219  ac_ext=c
33220ac_cpp='$CPP $CPPFLAGS'
33221ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33222ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33223ac_compiler_gnu=$ac_cv_c_compiler_gnu
33224if test -n "$ac_tool_prefix"; then
33225  for ac_prog in $CC
33226  do
33227    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33228set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33230$as_echo_n "checking for $ac_word... " >&6; }
33231if ${ac_cv_prog_CC+:} false; then :
33232  $as_echo_n "(cached) " >&6
33233else
33234  if test -n "$CC"; then
33235  ac_cv_prog_CC="$CC" # Let the user override the test.
33236else
33237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33238for as_dir in $PATH
33239do
33240  IFS=$as_save_IFS
33241  test -z "$as_dir" && as_dir=.
33242    for ac_exec_ext in '' $ac_executable_extensions; do
33243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33244    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33246    break 2
33247  fi
33248done
33249  done
33250IFS=$as_save_IFS
33251
33252fi
33253fi
33254CC=$ac_cv_prog_CC
33255if test -n "$CC"; then
33256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33257$as_echo "$CC" >&6; }
33258else
33259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33260$as_echo "no" >&6; }
33261fi
33262
33263
33264    test -n "$CC" && break
33265  done
33266fi
33267if test -z "$CC"; then
33268  ac_ct_CC=$CC
33269  for ac_prog in $CC
33270do
33271  # Extract the first word of "$ac_prog", so it can be a program name with args.
33272set dummy $ac_prog; ac_word=$2
33273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33274$as_echo_n "checking for $ac_word... " >&6; }
33275if ${ac_cv_prog_ac_ct_CC+:} false; then :
33276  $as_echo_n "(cached) " >&6
33277else
33278  if test -n "$ac_ct_CC"; then
33279  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33280else
33281as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33282for as_dir in $PATH
33283do
33284  IFS=$as_save_IFS
33285  test -z "$as_dir" && as_dir=.
33286    for ac_exec_ext in '' $ac_executable_extensions; do
33287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33288    ac_cv_prog_ac_ct_CC="$ac_prog"
33289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33290    break 2
33291  fi
33292done
33293  done
33294IFS=$as_save_IFS
33295
33296fi
33297fi
33298ac_ct_CC=$ac_cv_prog_ac_ct_CC
33299if test -n "$ac_ct_CC"; then
33300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33301$as_echo "$ac_ct_CC" >&6; }
33302else
33303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33304$as_echo "no" >&6; }
33305fi
33306
33307
33308  test -n "$ac_ct_CC" && break
33309done
33310
33311  if test "x$ac_ct_CC" = x; then
33312    CC=""
33313  else
33314    case $cross_compiling:$ac_tool_warned in
33315yes:)
33316{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33317$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33318ac_tool_warned=yes ;;
33319esac
33320    CC=$ac_ct_CC
33321  fi
33322fi
33323
33324
33325test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33326$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33327as_fn_error $? "no acceptable C compiler found in \$PATH
33328See \`config.log' for more details" "$LINENO" 5; }
33329
33330# Provide some information about the compiler.
33331$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33332set X $ac_compile
33333ac_compiler=$2
33334for ac_option in --version -v -V -qversion; do
33335  { { ac_try="$ac_compiler $ac_option >&5"
33336case "(($ac_try" in
33337  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33338  *) ac_try_echo=$ac_try;;
33339esac
33340eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33341$as_echo "$ac_try_echo"; } >&5
33342  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33343  ac_status=$?
33344  if test -s conftest.err; then
33345    sed '10a\
33346... rest of stderr output deleted ...
33347         10q' conftest.err >conftest.er1
33348    cat conftest.er1 >&5
33349  fi
33350  rm -f conftest.er1 conftest.err
33351  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33352  test $ac_status = 0; }
33353done
33354
33355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33356/* end confdefs.h.  */
33357
33358int
33359main ()
33360{
33361
33362  ;
33363  return 0;
33364}
33365_ACEOF
33366ac_clean_files_save=$ac_clean_files
33367ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33368# Try to create an executable without -o first, disregard a.out.
33369# It will help us diagnose broken compilers, and finding out an intuition
33370# of exeext.
33371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33372$as_echo_n "checking whether the C compiler works... " >&6; }
33373ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33374
33375# The possible output files:
33376ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33377
33378ac_rmfiles=
33379for ac_file in $ac_files
33380do
33381  case $ac_file in
33382    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33383    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33384  esac
33385done
33386rm -f $ac_rmfiles
33387
33388if { { ac_try="$ac_link_default"
33389case "(($ac_try" in
33390  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33391  *) ac_try_echo=$ac_try;;
33392esac
33393eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33394$as_echo "$ac_try_echo"; } >&5
33395  (eval "$ac_link_default") 2>&5
33396  ac_status=$?
33397  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33398  test $ac_status = 0; }; then :
33399  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33400# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33401# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33402# so that the user can short-circuit this test for compilers unknown to
33403# Autoconf.
33404for ac_file in $ac_files ''
33405do
33406  test -f "$ac_file" || continue
33407  case $ac_file in
33408    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33409	;;
33410    [ab].out )
33411	# We found the default executable, but exeext='' is most
33412	# certainly right.
33413	break;;
33414    *.* )
33415	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33416	then :; else
33417	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33418	fi
33419	# We set ac_cv_exeext here because the later test for it is not
33420	# safe: cross compilers may not add the suffix if given an `-o'
33421	# argument, so we may need to know it at that point already.
33422	# Even if this section looks crufty: it has the advantage of
33423	# actually working.
33424	break;;
33425    * )
33426	break;;
33427  esac
33428done
33429test "$ac_cv_exeext" = no && ac_cv_exeext=
33430
33431else
33432  ac_file=''
33433fi
33434if test -z "$ac_file"; then :
33435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33436$as_echo "no" >&6; }
33437$as_echo "$as_me: failed program was:" >&5
33438sed 's/^/| /' conftest.$ac_ext >&5
33439
33440{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33441$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33442as_fn_error 77 "C compiler cannot create executables
33443See \`config.log' for more details" "$LINENO" 5; }
33444else
33445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33446$as_echo "yes" >&6; }
33447fi
33448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33449$as_echo_n "checking for C compiler default output file name... " >&6; }
33450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33451$as_echo "$ac_file" >&6; }
33452ac_exeext=$ac_cv_exeext
33453
33454rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33455ac_clean_files=$ac_clean_files_save
33456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33457$as_echo_n "checking for suffix of executables... " >&6; }
33458if { { ac_try="$ac_link"
33459case "(($ac_try" in
33460  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33461  *) ac_try_echo=$ac_try;;
33462esac
33463eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33464$as_echo "$ac_try_echo"; } >&5
33465  (eval "$ac_link") 2>&5
33466  ac_status=$?
33467  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33468  test $ac_status = 0; }; then :
33469  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33470# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33471# work properly (i.e., refer to `conftest.exe'), while it won't with
33472# `rm'.
33473for ac_file in conftest.exe conftest conftest.*; do
33474  test -f "$ac_file" || continue
33475  case $ac_file in
33476    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33477    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33478	  break;;
33479    * ) break;;
33480  esac
33481done
33482else
33483  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33485as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33486See \`config.log' for more details" "$LINENO" 5; }
33487fi
33488rm -f conftest conftest$ac_cv_exeext
33489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33490$as_echo "$ac_cv_exeext" >&6; }
33491
33492rm -f conftest.$ac_ext
33493EXEEXT=$ac_cv_exeext
33494ac_exeext=$EXEEXT
33495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33496/* end confdefs.h.  */
33497#include <stdio.h>
33498int
33499main ()
33500{
33501FILE *f = fopen ("conftest.out", "w");
33502 return ferror (f) || fclose (f) != 0;
33503
33504  ;
33505  return 0;
33506}
33507_ACEOF
33508ac_clean_files="$ac_clean_files conftest.out"
33509# Check that the compiler produces executables we can run.  If not, either
33510# the compiler is broken, or we cross compile.
33511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33512$as_echo_n "checking whether we are cross compiling... " >&6; }
33513if test "$cross_compiling" != yes; then
33514  { { ac_try="$ac_link"
33515case "(($ac_try" in
33516  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33517  *) ac_try_echo=$ac_try;;
33518esac
33519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33520$as_echo "$ac_try_echo"; } >&5
33521  (eval "$ac_link") 2>&5
33522  ac_status=$?
33523  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33524  test $ac_status = 0; }
33525  if { ac_try='./conftest$ac_cv_exeext'
33526  { { case "(($ac_try" in
33527  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33528  *) ac_try_echo=$ac_try;;
33529esac
33530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33531$as_echo "$ac_try_echo"; } >&5
33532  (eval "$ac_try") 2>&5
33533  ac_status=$?
33534  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33535  test $ac_status = 0; }; }; then
33536    cross_compiling=no
33537  else
33538    if test "$cross_compiling" = maybe; then
33539	cross_compiling=yes
33540    else
33541	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33543as_fn_error $? "cannot run C compiled programs.
33544If you meant to cross compile, use \`--host'.
33545See \`config.log' for more details" "$LINENO" 5; }
33546    fi
33547  fi
33548fi
33549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33550$as_echo "$cross_compiling" >&6; }
33551
33552rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33553ac_clean_files=$ac_clean_files_save
33554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33555$as_echo_n "checking for suffix of object files... " >&6; }
33556if ${ac_cv_objext+:} false; then :
33557  $as_echo_n "(cached) " >&6
33558else
33559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33560/* end confdefs.h.  */
33561
33562int
33563main ()
33564{
33565
33566  ;
33567  return 0;
33568}
33569_ACEOF
33570rm -f conftest.o conftest.obj
33571if { { ac_try="$ac_compile"
33572case "(($ac_try" in
33573  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33574  *) ac_try_echo=$ac_try;;
33575esac
33576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33577$as_echo "$ac_try_echo"; } >&5
33578  (eval "$ac_compile") 2>&5
33579  ac_status=$?
33580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33581  test $ac_status = 0; }; then :
33582  for ac_file in conftest.o conftest.obj conftest.*; do
33583  test -f "$ac_file" || continue;
33584  case $ac_file in
33585    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33586    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33587       break;;
33588  esac
33589done
33590else
33591  $as_echo "$as_me: failed program was:" >&5
33592sed 's/^/| /' conftest.$ac_ext >&5
33593
33594{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33596as_fn_error $? "cannot compute suffix of object files: cannot compile
33597See \`config.log' for more details" "$LINENO" 5; }
33598fi
33599rm -f conftest.$ac_cv_objext conftest.$ac_ext
33600fi
33601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33602$as_echo "$ac_cv_objext" >&6; }
33603OBJEXT=$ac_cv_objext
33604ac_objext=$OBJEXT
33605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33606$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33607if ${ac_cv_c_compiler_gnu+:} false; then :
33608  $as_echo_n "(cached) " >&6
33609else
33610  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33611/* end confdefs.h.  */
33612
33613int
33614main ()
33615{
33616#ifndef __GNUC__
33617       choke me
33618#endif
33619
33620  ;
33621  return 0;
33622}
33623_ACEOF
33624if ac_fn_c_try_compile "$LINENO"; then :
33625  ac_compiler_gnu=yes
33626else
33627  ac_compiler_gnu=no
33628fi
33629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33630ac_cv_c_compiler_gnu=$ac_compiler_gnu
33631
33632fi
33633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33634$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33635if test $ac_compiler_gnu = yes; then
33636  GCC=yes
33637else
33638  GCC=
33639fi
33640ac_test_CFLAGS=${CFLAGS+set}
33641ac_save_CFLAGS=$CFLAGS
33642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33643$as_echo_n "checking whether $CC accepts -g... " >&6; }
33644if ${ac_cv_prog_cc_g+:} false; then :
33645  $as_echo_n "(cached) " >&6
33646else
33647  ac_save_c_werror_flag=$ac_c_werror_flag
33648   ac_c_werror_flag=yes
33649   ac_cv_prog_cc_g=no
33650   CFLAGS="-g"
33651   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33652/* end confdefs.h.  */
33653
33654int
33655main ()
33656{
33657
33658  ;
33659  return 0;
33660}
33661_ACEOF
33662if ac_fn_c_try_compile "$LINENO"; then :
33663  ac_cv_prog_cc_g=yes
33664else
33665  CFLAGS=""
33666      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33667/* end confdefs.h.  */
33668
33669int
33670main ()
33671{
33672
33673  ;
33674  return 0;
33675}
33676_ACEOF
33677if ac_fn_c_try_compile "$LINENO"; then :
33678
33679else
33680  ac_c_werror_flag=$ac_save_c_werror_flag
33681	 CFLAGS="-g"
33682	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33683/* end confdefs.h.  */
33684
33685int
33686main ()
33687{
33688
33689  ;
33690  return 0;
33691}
33692_ACEOF
33693if ac_fn_c_try_compile "$LINENO"; then :
33694  ac_cv_prog_cc_g=yes
33695fi
33696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33697fi
33698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33699fi
33700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33701   ac_c_werror_flag=$ac_save_c_werror_flag
33702fi
33703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33704$as_echo "$ac_cv_prog_cc_g" >&6; }
33705if test "$ac_test_CFLAGS" = set; then
33706  CFLAGS=$ac_save_CFLAGS
33707elif test $ac_cv_prog_cc_g = yes; then
33708  if test "$GCC" = yes; then
33709    CFLAGS="-g -O2"
33710  else
33711    CFLAGS="-g"
33712  fi
33713else
33714  if test "$GCC" = yes; then
33715    CFLAGS="-O2"
33716  else
33717    CFLAGS=
33718  fi
33719fi
33720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33721$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33722if ${ac_cv_prog_cc_c89+:} false; then :
33723  $as_echo_n "(cached) " >&6
33724else
33725  ac_cv_prog_cc_c89=no
33726ac_save_CC=$CC
33727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33728/* end confdefs.h.  */
33729#include <stdarg.h>
33730#include <stdio.h>
33731struct stat;
33732/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33733struct buf { int x; };
33734FILE * (*rcsopen) (struct buf *, struct stat *, int);
33735static char *e (p, i)
33736     char **p;
33737     int i;
33738{
33739  return p[i];
33740}
33741static char *f (char * (*g) (char **, int), char **p, ...)
33742{
33743  char *s;
33744  va_list v;
33745  va_start (v,p);
33746  s = g (p, va_arg (v,int));
33747  va_end (v);
33748  return s;
33749}
33750
33751/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33752   function prototypes and stuff, but not '\xHH' hex character constants.
33753   These don't provoke an error unfortunately, instead are silently treated
33754   as 'x'.  The following induces an error, until -std is added to get
33755   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33756   array size at least.  It's necessary to write '\x00'==0 to get something
33757   that's true only with -std.  */
33758int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33759
33760/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33761   inside strings and character constants.  */
33762#define FOO(x) 'x'
33763int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33764
33765int test (int i, double x);
33766struct s1 {int (*f) (int a);};
33767struct s2 {int (*f) (double a);};
33768int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33769int argc;
33770char **argv;
33771int
33772main ()
33773{
33774return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33775  ;
33776  return 0;
33777}
33778_ACEOF
33779for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33780	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33781do
33782  CC="$ac_save_CC $ac_arg"
33783  if ac_fn_c_try_compile "$LINENO"; then :
33784  ac_cv_prog_cc_c89=$ac_arg
33785fi
33786rm -f core conftest.err conftest.$ac_objext
33787  test "x$ac_cv_prog_cc_c89" != "xno" && break
33788done
33789rm -f conftest.$ac_ext
33790CC=$ac_save_CC
33791
33792fi
33793# AC_CACHE_VAL
33794case "x$ac_cv_prog_cc_c89" in
33795  x)
33796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33797$as_echo "none needed" >&6; } ;;
33798  xno)
33799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33800$as_echo "unsupported" >&6; } ;;
33801  *)
33802    CC="$CC $ac_cv_prog_cc_c89"
33803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33804$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33805esac
33806if test "x$ac_cv_prog_cc_c89" != xno; then :
33807
33808fi
33809
33810ac_ext=cpp
33811ac_cpp='$CXXCPP $CPPFLAGS'
33812ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33813ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33814ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33815
33816
33817
33818  COMPILER_NAME=C++
33819  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33820
33821  if test "x$CXX" != x; then
33822    # User has supplied compiler name already, always let that override.
33823    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33824$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33825    if test "x`basename $CXX`" = "x$CXX"; then
33826      # A command without a complete path is provided, search $PATH.
33827
33828      for ac_prog in $CXX
33829do
33830  # Extract the first word of "$ac_prog", so it can be a program name with args.
33831set dummy $ac_prog; ac_word=$2
33832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33833$as_echo_n "checking for $ac_word... " >&6; }
33834if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33835  $as_echo_n "(cached) " >&6
33836else
33837  case $POTENTIAL_CXX in
33838  [\\/]* | ?:[\\/]*)
33839  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33840  ;;
33841  *)
33842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33843for as_dir in $PATH
33844do
33845  IFS=$as_save_IFS
33846  test -z "$as_dir" && as_dir=.
33847    for ac_exec_ext in '' $ac_executable_extensions; do
33848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33849    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33851    break 2
33852  fi
33853done
33854  done
33855IFS=$as_save_IFS
33856
33857  ;;
33858esac
33859fi
33860POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33861if test -n "$POTENTIAL_CXX"; then
33862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33863$as_echo "$POTENTIAL_CXX" >&6; }
33864else
33865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33866$as_echo "no" >&6; }
33867fi
33868
33869
33870  test -n "$POTENTIAL_CXX" && break
33871done
33872
33873      if test "x$POTENTIAL_CXX" != x; then
33874        CXX=$POTENTIAL_CXX
33875      else
33876        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33877      fi
33878    else
33879      # Otherwise it might already be a complete path
33880      if test ! -x "$CXX"; then
33881        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33882      fi
33883    fi
33884  else
33885    # No user supplied value. Locate compiler ourselves.
33886
33887    # If we are cross compiling, assume cross compilation tools follows the
33888    # cross compilation standard where they are prefixed with the autoconf
33889    # standard name for the target. For example the binary
33890    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33891    # If we are not cross compiling, then the default compiler name will be
33892    # used.
33893
33894    CXX=
33895    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33896    # before checking the rest of the PATH.
33897    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33898    # step, this should not be necessary.
33899    if test -n "$TOOLCHAIN_PATH"; then
33900      PATH_save="$PATH"
33901      PATH="$TOOLCHAIN_PATH"
33902      for ac_prog in $SEARCH_LIST
33903do
33904  # Extract the first word of "$ac_prog", so it can be a program name with args.
33905set dummy $ac_prog; ac_word=$2
33906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33907$as_echo_n "checking for $ac_word... " >&6; }
33908if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33909  $as_echo_n "(cached) " >&6
33910else
33911  case $TOOLCHAIN_PATH_CXX in
33912  [\\/]* | ?:[\\/]*)
33913  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33914  ;;
33915  *)
33916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33917for as_dir in $PATH
33918do
33919  IFS=$as_save_IFS
33920  test -z "$as_dir" && as_dir=.
33921    for ac_exec_ext in '' $ac_executable_extensions; do
33922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33923    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33925    break 2
33926  fi
33927done
33928  done
33929IFS=$as_save_IFS
33930
33931  ;;
33932esac
33933fi
33934TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33935if test -n "$TOOLCHAIN_PATH_CXX"; then
33936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33937$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33938else
33939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33940$as_echo "no" >&6; }
33941fi
33942
33943
33944  test -n "$TOOLCHAIN_PATH_CXX" && break
33945done
33946
33947      CXX=$TOOLCHAIN_PATH_CXX
33948      PATH="$PATH_save"
33949    fi
33950
33951    # AC_PATH_PROGS can't be run multiple times with the same variable,
33952    # so create a new name for this run.
33953    if test "x$CXX" = x; then
33954      for ac_prog in $SEARCH_LIST
33955do
33956  # Extract the first word of "$ac_prog", so it can be a program name with args.
33957set dummy $ac_prog; ac_word=$2
33958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33959$as_echo_n "checking for $ac_word... " >&6; }
33960if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33961  $as_echo_n "(cached) " >&6
33962else
33963  case $POTENTIAL_CXX in
33964  [\\/]* | ?:[\\/]*)
33965  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33966  ;;
33967  *)
33968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33969for as_dir in $PATH
33970do
33971  IFS=$as_save_IFS
33972  test -z "$as_dir" && as_dir=.
33973    for ac_exec_ext in '' $ac_executable_extensions; do
33974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33975    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33977    break 2
33978  fi
33979done
33980  done
33981IFS=$as_save_IFS
33982
33983  ;;
33984esac
33985fi
33986POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33987if test -n "$POTENTIAL_CXX"; then
33988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33989$as_echo "$POTENTIAL_CXX" >&6; }
33990else
33991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33992$as_echo "no" >&6; }
33993fi
33994
33995
33996  test -n "$POTENTIAL_CXX" && break
33997done
33998
33999      CXX=$POTENTIAL_CXX
34000    fi
34001
34002    if test "x$CXX" = x; then
34003
34004  # Print a helpful message on how to acquire the necessary build dependency.
34005  # devkit is the help tag: freetype, cups, alsa etc
34006  MISSING_DEPENDENCY=devkit
34007
34008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34009    cygwin_help $MISSING_DEPENDENCY
34010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34011    msys_help $MISSING_DEPENDENCY
34012  else
34013    PKGHANDLER_COMMAND=
34014
34015    case $PKGHANDLER in
34016      apt-get)
34017        apt_help     $MISSING_DEPENDENCY ;;
34018      yum)
34019        yum_help     $MISSING_DEPENDENCY ;;
34020      port)
34021        port_help    $MISSING_DEPENDENCY ;;
34022      pkgutil)
34023        pkgutil_help $MISSING_DEPENDENCY ;;
34024      pkgadd)
34025        pkgadd_help  $MISSING_DEPENDENCY ;;
34026    esac
34027
34028    if test "x$PKGHANDLER_COMMAND" != x; then
34029      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34030    fi
34031  fi
34032
34033      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34034    fi
34035  fi
34036
34037  # Now we have a compiler binary in CXX. Make sure it's okay.
34038
34039  # Only process if variable expands to non-empty
34040
34041  if test "x$CXX" != x; then
34042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34043
34044  # First separate the path from the arguments. This will split at the first
34045  # space.
34046  complete="$CXX"
34047  path="${complete%% *}"
34048  tmp="$complete EOL"
34049  arguments="${tmp#* }"
34050
34051  # Input might be given as Windows format, start by converting to
34052  # unix format.
34053  new_path=`$CYGPATH -u "$path"`
34054
34055  # Now try to locate executable using which
34056  new_path=`$WHICH "$new_path" 2> /dev/null`
34057  # bat and cmd files are not always considered executable in cygwin causing which
34058  # to not find them
34059  if test "x$new_path" = x \
34060      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34061      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34062    new_path=`$CYGPATH -u "$path"`
34063  fi
34064  if test "x$new_path" = x; then
34065    # Oops. Which didn't find the executable.
34066    # The splitting of arguments from the executable at a space might have been incorrect,
34067    # since paths with space are more likely in Windows. Give it another try with the whole
34068    # argument.
34069    path="$complete"
34070    arguments="EOL"
34071    new_path=`$CYGPATH -u "$path"`
34072    new_path=`$WHICH "$new_path" 2> /dev/null`
34073    # bat and cmd files are not always considered executable in cygwin causing which
34074    # to not find them
34075    if test "x$new_path" = x \
34076        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34077        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34078      new_path=`$CYGPATH -u "$path"`
34079    fi
34080    if test "x$new_path" = x; then
34081      # It's still not found. Now this is an unrecoverable error.
34082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34083$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34084      has_space=`$ECHO "$complete" | $GREP " "`
34085      if test "x$has_space" != x; then
34086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34088      fi
34089      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34090    fi
34091  fi
34092
34093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34096  # "foo.exe" is OK but "foo" is an error.
34097  #
34098  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34099  # It is also a way to make sure we got the proper file name for the real test later on.
34100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34101  if test "x$test_shortpath" = x; then
34102    # Short path failed, file does not exist as specified.
34103    # Try adding .exe or .cmd
34104    if test -f "${new_path}.exe"; then
34105      input_to_shortpath="${new_path}.exe"
34106    elif test -f "${new_path}.cmd"; then
34107      input_to_shortpath="${new_path}.cmd"
34108    else
34109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34110$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34111      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34112$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34113      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34114    fi
34115  else
34116    input_to_shortpath="$new_path"
34117  fi
34118
34119  # Call helper function which possibly converts this using DOS-style short mode.
34120  # If so, the updated path is stored in $new_path.
34121  new_path="$input_to_shortpath"
34122
34123  input_path="$input_to_shortpath"
34124  # Check if we need to convert this using DOS-style short mode. If the path
34125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34126  # take no chances and rewrite it.
34127  # Note: m4 eats our [], so we need to use [ and ] instead.
34128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34129  if test "x$has_forbidden_chars" != x; then
34130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34134      # Going to short mode and back again did indeed matter. Since short mode is
34135      # case insensitive, let's make it lowercase to improve readability.
34136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34137      # Now convert it back to Unix-style (cygpath)
34138      input_path=`$CYGPATH -u "$shortmode_path"`
34139      new_path="$input_path"
34140    fi
34141  fi
34142
34143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34144  if test "x$test_cygdrive_prefix" = x; then
34145    # As a simple fix, exclude /usr/bin since it's not a real path.
34146    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34148      # a path prefixed by /cygdrive for fixpath to work.
34149      new_path="$CYGWIN_ROOT_PATH$input_path"
34150    fi
34151  fi
34152
34153  # remove trailing .exe if any
34154  new_path="${new_path/%.exe/}"
34155
34156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34157
34158  # First separate the path from the arguments. This will split at the first
34159  # space.
34160  complete="$CXX"
34161  path="${complete%% *}"
34162  tmp="$complete EOL"
34163  arguments="${tmp#* }"
34164
34165  # Input might be given as Windows format, start by converting to
34166  # unix format.
34167  new_path="$path"
34168
34169  windows_path="$new_path"
34170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34171    unix_path=`$CYGPATH -u "$windows_path"`
34172    new_path="$unix_path"
34173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34175    new_path="$unix_path"
34176  fi
34177
34178
34179  # Now try to locate executable using which
34180  new_path=`$WHICH "$new_path" 2> /dev/null`
34181
34182  if test "x$new_path" = x; then
34183    # Oops. Which didn't find the executable.
34184    # The splitting of arguments from the executable at a space might have been incorrect,
34185    # since paths with space are more likely in Windows. Give it another try with the whole
34186    # argument.
34187    path="$complete"
34188    arguments="EOL"
34189    new_path="$path"
34190
34191  windows_path="$new_path"
34192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34193    unix_path=`$CYGPATH -u "$windows_path"`
34194    new_path="$unix_path"
34195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34197    new_path="$unix_path"
34198  fi
34199
34200
34201    new_path=`$WHICH "$new_path" 2> /dev/null`
34202    # bat and cmd files are not always considered executable in MSYS causing which
34203    # to not find them
34204    if test "x$new_path" = x \
34205        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34206        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34207      new_path="$path"
34208
34209  windows_path="$new_path"
34210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34211    unix_path=`$CYGPATH -u "$windows_path"`
34212    new_path="$unix_path"
34213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34215    new_path="$unix_path"
34216  fi
34217
34218    fi
34219
34220    if test "x$new_path" = x; then
34221      # It's still not found. Now this is an unrecoverable error.
34222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34223$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34224      has_space=`$ECHO "$complete" | $GREP " "`
34225      if test "x$has_space" != x; then
34226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34228      fi
34229      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34230    fi
34231  fi
34232
34233  # Now new_path has a complete unix path to the binary
34234  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34235    # Keep paths in /bin as-is, but remove trailing .exe if any
34236    new_path="${new_path/%.exe/}"
34237    # Do not save /bin paths to all_fixpath_prefixes!
34238  else
34239    # Not in mixed or Windows style, start by that.
34240    new_path=`cmd //c echo $new_path`
34241
34242  input_path="$new_path"
34243  # Check if we need to convert this using DOS-style short mode. If the path
34244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34245  # take no chances and rewrite it.
34246  # Note: m4 eats our [], so we need to use [ and ] instead.
34247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34248  if test "x$has_forbidden_chars" != x; then
34249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34251  fi
34252
34253    # Output is in $new_path
34254
34255  windows_path="$new_path"
34256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34257    unix_path=`$CYGPATH -u "$windows_path"`
34258    new_path="$unix_path"
34259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34261    new_path="$unix_path"
34262  fi
34263
34264    # remove trailing .exe if any
34265    new_path="${new_path/%.exe/}"
34266
34267    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34268    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34269  fi
34270
34271    else
34272      # We're on a unix platform. Hooray! :)
34273      # First separate the path from the arguments. This will split at the first
34274      # space.
34275      complete="$CXX"
34276      path="${complete%% *}"
34277      tmp="$complete EOL"
34278      arguments="${tmp#* }"
34279
34280      # Cannot rely on the command "which" here since it doesn't always work.
34281      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34282      if test -z "$is_absolute_path"; then
34283        # Path to executable is not absolute. Find it.
34284        IFS_save="$IFS"
34285        IFS=:
34286        for p in $PATH; do
34287          if test -f "$p/$path" && test -x "$p/$path"; then
34288            new_path="$p/$path"
34289            break
34290          fi
34291        done
34292        IFS="$IFS_save"
34293      else
34294        # This is an absolute path, we can use it without further modifications.
34295        new_path="$path"
34296      fi
34297
34298      if test "x$new_path" = x; then
34299        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34300$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34301        has_space=`$ECHO "$complete" | $GREP " "`
34302        if test "x$has_space" != x; then
34303          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34304$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34305        fi
34306        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34307      fi
34308    fi
34309
34310    # Now join together the path and the arguments once again
34311    if test "x$arguments" != xEOL; then
34312      new_complete="$new_path ${arguments% *}"
34313    else
34314      new_complete="$new_path"
34315    fi
34316
34317    if test "x$complete" != "x$new_complete"; then
34318      CXX="$new_complete"
34319      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34320$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34321    fi
34322  fi
34323
34324  TEST_COMPILER="$CXX"
34325
34326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34327$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34328  SYMLINK_ORIGINAL="$TEST_COMPILER"
34329
34330  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34331    # Follow a chain of symbolic links. Use readlink
34332    # where it exists, else fall back to horribly
34333    # complicated shell code.
34334    if test "x$READLINK_TESTED" != yes; then
34335      # On MacOSX there is a readlink tool with a different
34336      # purpose than the GNU readlink tool. Check the found readlink.
34337      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34338      if test "x$ISGNU" = x; then
34339        # A readlink that we do not know how to use.
34340        # Are there other non-GNU readlinks out there?
34341        READLINK_TESTED=yes
34342        READLINK=
34343      fi
34344    fi
34345
34346    if test "x$READLINK" != x; then
34347      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34348    else
34349      # Save the current directory for restoring afterwards
34350      STARTDIR=$PWD
34351      COUNTER=0
34352      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34353      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34354      cd $sym_link_dir
34355      # Use -P flag to resolve symlinks in directories.
34356      cd `$THEPWDCMD -P`
34357      sym_link_dir=`$THEPWDCMD -P`
34358      # Resolve file symlinks
34359      while test $COUNTER -lt 20; do
34360        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34361        if test "x$ISLINK" == x; then
34362          # This is not a symbolic link! We are done!
34363          break
34364        fi
34365        # Again resolve directory symlinks since the target of the just found
34366        # link could be in a different directory
34367        cd `$DIRNAME $ISLINK`
34368        sym_link_dir=`$THEPWDCMD -P`
34369        sym_link_file=`$BASENAME $ISLINK`
34370        let COUNTER=COUNTER+1
34371      done
34372      cd $STARTDIR
34373      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34374    fi
34375  fi
34376
34377  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34379$as_echo "no symlink" >&6; }
34380  else
34381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34382$as_echo "$SYMLINK_ORIGINAL" >&6; }
34383
34384    # We can't handle ccache by gcc wrappers, since we need to know if we're
34385    # using ccache. Instead ccache usage must be controlled by a configure option.
34386    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34387    if test "x$COMPILER_BASENAME" = "xccache"; then
34388      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34389$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34390      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34391    fi
34392  fi
34393
34394
34395  COMPILER=$CXX
34396  COMPILER_NAME=$COMPILER_NAME
34397
34398  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34399    # cc -V output typically looks like
34400    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34401    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34402    # Check that this is likely to be the Solaris Studio cc.
34403    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34404    if test $? -ne 0; then
34405      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34406      { $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
34407$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34408      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34409$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34410      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34411$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34412      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34413    fi
34414    # Remove usage instructions (if present), and
34415    # collapse compiler output into a single line
34416    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34417        $SED -e 's/ *[Uu]sage:.*//'`
34418    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34419        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34420  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34421    # xlc -qversion output typically looks like
34422    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34423    #     Version: 11.01.0000.0015
34424    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34425    # Check that this is likely to be the IBM XL C compiler.
34426    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34427    if test $? -ne 0; then
34428      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34429      { $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
34430$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34431      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34432$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34433      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34434$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34435      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34436    fi
34437    # Collapse compiler output into a single line
34438    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34439    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34440        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34441  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34442    # There is no specific version flag, but all output starts with a version string.
34443    # First line typically looks something like:
34444    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34445    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34446    # Check that this is likely to be Microsoft CL.EXE.
34447    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34448    if test $? -ne 0; then
34449      { $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
34450$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34451      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34452$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34453      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34454    fi
34455    # Collapse compiler output into a single line
34456    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34457    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34458        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34459  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34460    # gcc --version output typically looks like
34461    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34462    #     Copyright (C) 2013 Free Software Foundation, Inc.
34463    #     This is free software; see the source for copying conditions.  There is NO
34464    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34465    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34466    # Check that this is likely to be GCC.
34467    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34468    if test $? -ne 0; then
34469      { $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
34470$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34471      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34472$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34473      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34474    fi
34475    # Remove Copyright and legalese from version string, and
34476    # collapse into a single line
34477    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34478        $SED -e 's/ *Copyright .*//'`
34479    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34480        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34481  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34482    # clang --version output typically looks like
34483    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34484    #    clang version 3.3 (tags/RELEASE_33/final)
34485    # or
34486    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34487    #    Target: x86_64-pc-linux-gnu
34488    #    Thread model: posix
34489    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34490    # Check that this is likely to be clang
34491    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34492    if test $? -ne 0; then
34493      { $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
34494$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34495      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34496$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34497      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34498    fi
34499    # Collapse compiler output into a single line
34500    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34501    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34502        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34503  else
34504      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34505  fi
34506  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34507  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34508  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34509  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34510
34511  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34512$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34513
34514
34515  # Now that we have resolved CXX ourself, let autoconf have its go at it
34516  ac_ext=cpp
34517ac_cpp='$CXXCPP $CPPFLAGS'
34518ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34519ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34520ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34521if test -z "$CXX"; then
34522  if test -n "$CCC"; then
34523    CXX=$CCC
34524  else
34525    if test -n "$ac_tool_prefix"; then
34526  for ac_prog in $CXX
34527  do
34528    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34529set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34531$as_echo_n "checking for $ac_word... " >&6; }
34532if ${ac_cv_prog_CXX+:} false; then :
34533  $as_echo_n "(cached) " >&6
34534else
34535  if test -n "$CXX"; then
34536  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34537else
34538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34539for as_dir in $PATH
34540do
34541  IFS=$as_save_IFS
34542  test -z "$as_dir" && as_dir=.
34543    for ac_exec_ext in '' $ac_executable_extensions; do
34544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34545    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34547    break 2
34548  fi
34549done
34550  done
34551IFS=$as_save_IFS
34552
34553fi
34554fi
34555CXX=$ac_cv_prog_CXX
34556if test -n "$CXX"; then
34557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34558$as_echo "$CXX" >&6; }
34559else
34560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34561$as_echo "no" >&6; }
34562fi
34563
34564
34565    test -n "$CXX" && break
34566  done
34567fi
34568if test -z "$CXX"; then
34569  ac_ct_CXX=$CXX
34570  for ac_prog in $CXX
34571do
34572  # Extract the first word of "$ac_prog", so it can be a program name with args.
34573set dummy $ac_prog; ac_word=$2
34574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34575$as_echo_n "checking for $ac_word... " >&6; }
34576if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34577  $as_echo_n "(cached) " >&6
34578else
34579  if test -n "$ac_ct_CXX"; then
34580  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34581else
34582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34583for as_dir in $PATH
34584do
34585  IFS=$as_save_IFS
34586  test -z "$as_dir" && as_dir=.
34587    for ac_exec_ext in '' $ac_executable_extensions; do
34588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34589    ac_cv_prog_ac_ct_CXX="$ac_prog"
34590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34591    break 2
34592  fi
34593done
34594  done
34595IFS=$as_save_IFS
34596
34597fi
34598fi
34599ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34600if test -n "$ac_ct_CXX"; then
34601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34602$as_echo "$ac_ct_CXX" >&6; }
34603else
34604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34605$as_echo "no" >&6; }
34606fi
34607
34608
34609  test -n "$ac_ct_CXX" && break
34610done
34611
34612  if test "x$ac_ct_CXX" = x; then
34613    CXX="g++"
34614  else
34615    case $cross_compiling:$ac_tool_warned in
34616yes:)
34617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34619ac_tool_warned=yes ;;
34620esac
34621    CXX=$ac_ct_CXX
34622  fi
34623fi
34624
34625  fi
34626fi
34627# Provide some information about the compiler.
34628$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34629set X $ac_compile
34630ac_compiler=$2
34631for ac_option in --version -v -V -qversion; do
34632  { { ac_try="$ac_compiler $ac_option >&5"
34633case "(($ac_try" in
34634  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34635  *) ac_try_echo=$ac_try;;
34636esac
34637eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34638$as_echo "$ac_try_echo"; } >&5
34639  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34640  ac_status=$?
34641  if test -s conftest.err; then
34642    sed '10a\
34643... rest of stderr output deleted ...
34644         10q' conftest.err >conftest.er1
34645    cat conftest.er1 >&5
34646  fi
34647  rm -f conftest.er1 conftest.err
34648  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34649  test $ac_status = 0; }
34650done
34651
34652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34653$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34654if ${ac_cv_cxx_compiler_gnu+:} false; then :
34655  $as_echo_n "(cached) " >&6
34656else
34657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34658/* end confdefs.h.  */
34659
34660int
34661main ()
34662{
34663#ifndef __GNUC__
34664       choke me
34665#endif
34666
34667  ;
34668  return 0;
34669}
34670_ACEOF
34671if ac_fn_cxx_try_compile "$LINENO"; then :
34672  ac_compiler_gnu=yes
34673else
34674  ac_compiler_gnu=no
34675fi
34676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34677ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34678
34679fi
34680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34681$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34682if test $ac_compiler_gnu = yes; then
34683  GXX=yes
34684else
34685  GXX=
34686fi
34687ac_test_CXXFLAGS=${CXXFLAGS+set}
34688ac_save_CXXFLAGS=$CXXFLAGS
34689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34690$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34691if ${ac_cv_prog_cxx_g+:} false; then :
34692  $as_echo_n "(cached) " >&6
34693else
34694  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34695   ac_cxx_werror_flag=yes
34696   ac_cv_prog_cxx_g=no
34697   CXXFLAGS="-g"
34698   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34699/* end confdefs.h.  */
34700
34701int
34702main ()
34703{
34704
34705  ;
34706  return 0;
34707}
34708_ACEOF
34709if ac_fn_cxx_try_compile "$LINENO"; then :
34710  ac_cv_prog_cxx_g=yes
34711else
34712  CXXFLAGS=""
34713      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34714/* end confdefs.h.  */
34715
34716int
34717main ()
34718{
34719
34720  ;
34721  return 0;
34722}
34723_ACEOF
34724if ac_fn_cxx_try_compile "$LINENO"; then :
34725
34726else
34727  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34728	 CXXFLAGS="-g"
34729	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34730/* end confdefs.h.  */
34731
34732int
34733main ()
34734{
34735
34736  ;
34737  return 0;
34738}
34739_ACEOF
34740if ac_fn_cxx_try_compile "$LINENO"; then :
34741  ac_cv_prog_cxx_g=yes
34742fi
34743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34744fi
34745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34746fi
34747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34748   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34749fi
34750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34751$as_echo "$ac_cv_prog_cxx_g" >&6; }
34752if test "$ac_test_CXXFLAGS" = set; then
34753  CXXFLAGS=$ac_save_CXXFLAGS
34754elif test $ac_cv_prog_cxx_g = yes; then
34755  if test "$GXX" = yes; then
34756    CXXFLAGS="-g -O2"
34757  else
34758    CXXFLAGS="-g"
34759  fi
34760else
34761  if test "$GXX" = yes; then
34762    CXXFLAGS="-O2"
34763  else
34764    CXXFLAGS=
34765  fi
34766fi
34767ac_ext=cpp
34768ac_cpp='$CXXCPP $CPPFLAGS'
34769ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34770ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34771ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34772
34773
34774  # This is the compiler version number on the form X.Y[.Z]
34775
34776
34777
34778
34779  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34780    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34781$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34782    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34783$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34784  fi
34785
34786  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34787  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34788    { $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
34789$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;}
34790  fi
34791
34792  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34793    { $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
34794$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34795  fi
34796
34797  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34798
34799
34800  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34801
34802
34803
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820
34821
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    # Execute function body
34851
34852  # Need to assign to a variable since m4 is blocked from modifying parts in [].
34853  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34854
34855  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34856    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34857  fi
34858
34859  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34860    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34861  fi
34862
34863  # Version comparison method inspired by http://stackoverflow.com/a/24067243
34864  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34865
34866  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34867    :
34868
34869  else
34870    :
34871
34872          { $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
34873$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34874
34875
34876  fi
34877
34878
34879
34880
34881
34882
34883
34884
34885
34886
34887
34888
34889
34890
34891  fi
34892
34893  #
34894  # Setup the preprocessor (CPP and CXXCPP)
34895  #
34896  ac_ext=c
34897ac_cpp='$CPP $CPPFLAGS'
34898ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34899ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34900ac_compiler_gnu=$ac_cv_c_compiler_gnu
34901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34902$as_echo_n "checking how to run the C preprocessor... " >&6; }
34903# On Suns, sometimes $CPP names a directory.
34904if test -n "$CPP" && test -d "$CPP"; then
34905  CPP=
34906fi
34907if test -z "$CPP"; then
34908  if ${ac_cv_prog_CPP+:} false; then :
34909  $as_echo_n "(cached) " >&6
34910else
34911      # Double quotes because CPP needs to be expanded
34912    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34913    do
34914      ac_preproc_ok=false
34915for ac_c_preproc_warn_flag in '' yes
34916do
34917  # Use a header file that comes with gcc, so configuring glibc
34918  # with a fresh cross-compiler works.
34919  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34920  # <limits.h> exists even on freestanding compilers.
34921  # On the NeXT, cc -E runs the code through the compiler's parser,
34922  # not just through cpp. "Syntax error" is here to catch this case.
34923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34924/* end confdefs.h.  */
34925#ifdef __STDC__
34926# include <limits.h>
34927#else
34928# include <assert.h>
34929#endif
34930		     Syntax error
34931_ACEOF
34932if ac_fn_c_try_cpp "$LINENO"; then :
34933
34934else
34935  # Broken: fails on valid input.
34936continue
34937fi
34938rm -f conftest.err conftest.i conftest.$ac_ext
34939
34940  # OK, works on sane cases.  Now check whether nonexistent headers
34941  # can be detected and how.
34942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34943/* end confdefs.h.  */
34944#include <ac_nonexistent.h>
34945_ACEOF
34946if ac_fn_c_try_cpp "$LINENO"; then :
34947  # Broken: success on invalid input.
34948continue
34949else
34950  # Passes both tests.
34951ac_preproc_ok=:
34952break
34953fi
34954rm -f conftest.err conftest.i conftest.$ac_ext
34955
34956done
34957# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34958rm -f conftest.i conftest.err conftest.$ac_ext
34959if $ac_preproc_ok; then :
34960  break
34961fi
34962
34963    done
34964    ac_cv_prog_CPP=$CPP
34965
34966fi
34967  CPP=$ac_cv_prog_CPP
34968else
34969  ac_cv_prog_CPP=$CPP
34970fi
34971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34972$as_echo "$CPP" >&6; }
34973ac_preproc_ok=false
34974for ac_c_preproc_warn_flag in '' yes
34975do
34976  # Use a header file that comes with gcc, so configuring glibc
34977  # with a fresh cross-compiler works.
34978  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34979  # <limits.h> exists even on freestanding compilers.
34980  # On the NeXT, cc -E runs the code through the compiler's parser,
34981  # not just through cpp. "Syntax error" is here to catch this case.
34982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34983/* end confdefs.h.  */
34984#ifdef __STDC__
34985# include <limits.h>
34986#else
34987# include <assert.h>
34988#endif
34989		     Syntax error
34990_ACEOF
34991if ac_fn_c_try_cpp "$LINENO"; then :
34992
34993else
34994  # Broken: fails on valid input.
34995continue
34996fi
34997rm -f conftest.err conftest.i conftest.$ac_ext
34998
34999  # OK, works on sane cases.  Now check whether nonexistent headers
35000  # can be detected and how.
35001  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35002/* end confdefs.h.  */
35003#include <ac_nonexistent.h>
35004_ACEOF
35005if ac_fn_c_try_cpp "$LINENO"; then :
35006  # Broken: success on invalid input.
35007continue
35008else
35009  # Passes both tests.
35010ac_preproc_ok=:
35011break
35012fi
35013rm -f conftest.err conftest.i conftest.$ac_ext
35014
35015done
35016# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35017rm -f conftest.i conftest.err conftest.$ac_ext
35018if $ac_preproc_ok; then :
35019
35020else
35021  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35023as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35024See \`config.log' for more details" "$LINENO" 5; }
35025fi
35026
35027ac_ext=cpp
35028ac_cpp='$CXXCPP $CPPFLAGS'
35029ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35030ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35031ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35032
35033
35034  # Only process if variable expands to non-empty
35035
35036  if test "x$CPP" != x; then
35037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35038
35039  # First separate the path from the arguments. This will split at the first
35040  # space.
35041  complete="$CPP"
35042  path="${complete%% *}"
35043  tmp="$complete EOL"
35044  arguments="${tmp#* }"
35045
35046  # Input might be given as Windows format, start by converting to
35047  # unix format.
35048  new_path=`$CYGPATH -u "$path"`
35049
35050  # Now try to locate executable using which
35051  new_path=`$WHICH "$new_path" 2> /dev/null`
35052  # bat and cmd files are not always considered executable in cygwin causing which
35053  # to not find them
35054  if test "x$new_path" = x \
35055      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35056      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35057    new_path=`$CYGPATH -u "$path"`
35058  fi
35059  if test "x$new_path" = x; then
35060    # Oops. Which didn't find the executable.
35061    # The splitting of arguments from the executable at a space might have been incorrect,
35062    # since paths with space are more likely in Windows. Give it another try with the whole
35063    # argument.
35064    path="$complete"
35065    arguments="EOL"
35066    new_path=`$CYGPATH -u "$path"`
35067    new_path=`$WHICH "$new_path" 2> /dev/null`
35068    # bat and cmd files are not always considered executable in cygwin causing which
35069    # to not find them
35070    if test "x$new_path" = x \
35071        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35072        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35073      new_path=`$CYGPATH -u "$path"`
35074    fi
35075    if test "x$new_path" = x; then
35076      # It's still not found. Now this is an unrecoverable error.
35077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35078$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35079      has_space=`$ECHO "$complete" | $GREP " "`
35080      if test "x$has_space" != x; then
35081        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35082$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35083      fi
35084      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35085    fi
35086  fi
35087
35088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35091  # "foo.exe" is OK but "foo" is an error.
35092  #
35093  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35094  # It is also a way to make sure we got the proper file name for the real test later on.
35095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35096  if test "x$test_shortpath" = x; then
35097    # Short path failed, file does not exist as specified.
35098    # Try adding .exe or .cmd
35099    if test -f "${new_path}.exe"; then
35100      input_to_shortpath="${new_path}.exe"
35101    elif test -f "${new_path}.cmd"; then
35102      input_to_shortpath="${new_path}.cmd"
35103    else
35104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35105$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35106      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35107$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35108      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35109    fi
35110  else
35111    input_to_shortpath="$new_path"
35112  fi
35113
35114  # Call helper function which possibly converts this using DOS-style short mode.
35115  # If so, the updated path is stored in $new_path.
35116  new_path="$input_to_shortpath"
35117
35118  input_path="$input_to_shortpath"
35119  # Check if we need to convert this using DOS-style short mode. If the path
35120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35121  # take no chances and rewrite it.
35122  # Note: m4 eats our [], so we need to use [ and ] instead.
35123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35124  if test "x$has_forbidden_chars" != x; then
35125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35129      # Going to short mode and back again did indeed matter. Since short mode is
35130      # case insensitive, let's make it lowercase to improve readability.
35131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35132      # Now convert it back to Unix-style (cygpath)
35133      input_path=`$CYGPATH -u "$shortmode_path"`
35134      new_path="$input_path"
35135    fi
35136  fi
35137
35138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35139  if test "x$test_cygdrive_prefix" = x; then
35140    # As a simple fix, exclude /usr/bin since it's not a real path.
35141    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35143      # a path prefixed by /cygdrive for fixpath to work.
35144      new_path="$CYGWIN_ROOT_PATH$input_path"
35145    fi
35146  fi
35147
35148  # remove trailing .exe if any
35149  new_path="${new_path/%.exe/}"
35150
35151    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35152
35153  # First separate the path from the arguments. This will split at the first
35154  # space.
35155  complete="$CPP"
35156  path="${complete%% *}"
35157  tmp="$complete EOL"
35158  arguments="${tmp#* }"
35159
35160  # Input might be given as Windows format, start by converting to
35161  # unix format.
35162  new_path="$path"
35163
35164  windows_path="$new_path"
35165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35166    unix_path=`$CYGPATH -u "$windows_path"`
35167    new_path="$unix_path"
35168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35170    new_path="$unix_path"
35171  fi
35172
35173
35174  # Now try to locate executable using which
35175  new_path=`$WHICH "$new_path" 2> /dev/null`
35176
35177  if test "x$new_path" = x; then
35178    # Oops. Which didn't find the executable.
35179    # The splitting of arguments from the executable at a space might have been incorrect,
35180    # since paths with space are more likely in Windows. Give it another try with the whole
35181    # argument.
35182    path="$complete"
35183    arguments="EOL"
35184    new_path="$path"
35185
35186  windows_path="$new_path"
35187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35188    unix_path=`$CYGPATH -u "$windows_path"`
35189    new_path="$unix_path"
35190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35192    new_path="$unix_path"
35193  fi
35194
35195
35196    new_path=`$WHICH "$new_path" 2> /dev/null`
35197    # bat and cmd files are not always considered executable in MSYS causing which
35198    # to not find them
35199    if test "x$new_path" = x \
35200        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35201        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35202      new_path="$path"
35203
35204  windows_path="$new_path"
35205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35206    unix_path=`$CYGPATH -u "$windows_path"`
35207    new_path="$unix_path"
35208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35210    new_path="$unix_path"
35211  fi
35212
35213    fi
35214
35215    if test "x$new_path" = x; then
35216      # It's still not found. Now this is an unrecoverable error.
35217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35218$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35219      has_space=`$ECHO "$complete" | $GREP " "`
35220      if test "x$has_space" != x; then
35221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35223      fi
35224      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35225    fi
35226  fi
35227
35228  # Now new_path has a complete unix path to the binary
35229  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35230    # Keep paths in /bin as-is, but remove trailing .exe if any
35231    new_path="${new_path/%.exe/}"
35232    # Do not save /bin paths to all_fixpath_prefixes!
35233  else
35234    # Not in mixed or Windows style, start by that.
35235    new_path=`cmd //c echo $new_path`
35236
35237  input_path="$new_path"
35238  # Check if we need to convert this using DOS-style short mode. If the path
35239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35240  # take no chances and rewrite it.
35241  # Note: m4 eats our [], so we need to use [ and ] instead.
35242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35243  if test "x$has_forbidden_chars" != x; then
35244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35246  fi
35247
35248    # Output is in $new_path
35249
35250  windows_path="$new_path"
35251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35252    unix_path=`$CYGPATH -u "$windows_path"`
35253    new_path="$unix_path"
35254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35256    new_path="$unix_path"
35257  fi
35258
35259    # remove trailing .exe if any
35260    new_path="${new_path/%.exe/}"
35261
35262    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35263    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35264  fi
35265
35266    else
35267      # We're on a unix platform. Hooray! :)
35268      # First separate the path from the arguments. This will split at the first
35269      # space.
35270      complete="$CPP"
35271      path="${complete%% *}"
35272      tmp="$complete EOL"
35273      arguments="${tmp#* }"
35274
35275      # Cannot rely on the command "which" here since it doesn't always work.
35276      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35277      if test -z "$is_absolute_path"; then
35278        # Path to executable is not absolute. Find it.
35279        IFS_save="$IFS"
35280        IFS=:
35281        for p in $PATH; do
35282          if test -f "$p/$path" && test -x "$p/$path"; then
35283            new_path="$p/$path"
35284            break
35285          fi
35286        done
35287        IFS="$IFS_save"
35288      else
35289        # This is an absolute path, we can use it without further modifications.
35290        new_path="$path"
35291      fi
35292
35293      if test "x$new_path" = x; then
35294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35295$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35296        has_space=`$ECHO "$complete" | $GREP " "`
35297        if test "x$has_space" != x; then
35298          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35299$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35300        fi
35301        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35302      fi
35303    fi
35304
35305    # Now join together the path and the arguments once again
35306    if test "x$arguments" != xEOL; then
35307      new_complete="$new_path ${arguments% *}"
35308    else
35309      new_complete="$new_path"
35310    fi
35311
35312    if test "x$complete" != "x$new_complete"; then
35313      CPP="$new_complete"
35314      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35315$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35316    fi
35317  fi
35318
35319  ac_ext=cpp
35320ac_cpp='$CXXCPP $CPPFLAGS'
35321ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35322ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35323ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35325$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35326if test -z "$CXXCPP"; then
35327  if ${ac_cv_prog_CXXCPP+:} false; then :
35328  $as_echo_n "(cached) " >&6
35329else
35330      # Double quotes because CXXCPP needs to be expanded
35331    for CXXCPP in "$CXX -E" "/lib/cpp"
35332    do
35333      ac_preproc_ok=false
35334for ac_cxx_preproc_warn_flag in '' yes
35335do
35336  # Use a header file that comes with gcc, so configuring glibc
35337  # with a fresh cross-compiler works.
35338  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35339  # <limits.h> exists even on freestanding compilers.
35340  # On the NeXT, cc -E runs the code through the compiler's parser,
35341  # not just through cpp. "Syntax error" is here to catch this case.
35342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35343/* end confdefs.h.  */
35344#ifdef __STDC__
35345# include <limits.h>
35346#else
35347# include <assert.h>
35348#endif
35349		     Syntax error
35350_ACEOF
35351if ac_fn_cxx_try_cpp "$LINENO"; then :
35352
35353else
35354  # Broken: fails on valid input.
35355continue
35356fi
35357rm -f conftest.err conftest.i conftest.$ac_ext
35358
35359  # OK, works on sane cases.  Now check whether nonexistent headers
35360  # can be detected and how.
35361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35362/* end confdefs.h.  */
35363#include <ac_nonexistent.h>
35364_ACEOF
35365if ac_fn_cxx_try_cpp "$LINENO"; then :
35366  # Broken: success on invalid input.
35367continue
35368else
35369  # Passes both tests.
35370ac_preproc_ok=:
35371break
35372fi
35373rm -f conftest.err conftest.i conftest.$ac_ext
35374
35375done
35376# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35377rm -f conftest.i conftest.err conftest.$ac_ext
35378if $ac_preproc_ok; then :
35379  break
35380fi
35381
35382    done
35383    ac_cv_prog_CXXCPP=$CXXCPP
35384
35385fi
35386  CXXCPP=$ac_cv_prog_CXXCPP
35387else
35388  ac_cv_prog_CXXCPP=$CXXCPP
35389fi
35390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35391$as_echo "$CXXCPP" >&6; }
35392ac_preproc_ok=false
35393for ac_cxx_preproc_warn_flag in '' yes
35394do
35395  # Use a header file that comes with gcc, so configuring glibc
35396  # with a fresh cross-compiler works.
35397  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35398  # <limits.h> exists even on freestanding compilers.
35399  # On the NeXT, cc -E runs the code through the compiler's parser,
35400  # not just through cpp. "Syntax error" is here to catch this case.
35401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35402/* end confdefs.h.  */
35403#ifdef __STDC__
35404# include <limits.h>
35405#else
35406# include <assert.h>
35407#endif
35408		     Syntax error
35409_ACEOF
35410if ac_fn_cxx_try_cpp "$LINENO"; then :
35411
35412else
35413  # Broken: fails on valid input.
35414continue
35415fi
35416rm -f conftest.err conftest.i conftest.$ac_ext
35417
35418  # OK, works on sane cases.  Now check whether nonexistent headers
35419  # can be detected and how.
35420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35421/* end confdefs.h.  */
35422#include <ac_nonexistent.h>
35423_ACEOF
35424if ac_fn_cxx_try_cpp "$LINENO"; then :
35425  # Broken: success on invalid input.
35426continue
35427else
35428  # Passes both tests.
35429ac_preproc_ok=:
35430break
35431fi
35432rm -f conftest.err conftest.i conftest.$ac_ext
35433
35434done
35435# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35436rm -f conftest.i conftest.err conftest.$ac_ext
35437if $ac_preproc_ok; then :
35438
35439else
35440  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35441$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35442as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35443See \`config.log' for more details" "$LINENO" 5; }
35444fi
35445
35446ac_ext=cpp
35447ac_cpp='$CXXCPP $CPPFLAGS'
35448ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35449ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35450ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35451
35452
35453  # Only process if variable expands to non-empty
35454
35455  if test "x$CXXCPP" != x; then
35456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35457
35458  # First separate the path from the arguments. This will split at the first
35459  # space.
35460  complete="$CXXCPP"
35461  path="${complete%% *}"
35462  tmp="$complete EOL"
35463  arguments="${tmp#* }"
35464
35465  # Input might be given as Windows format, start by converting to
35466  # unix format.
35467  new_path=`$CYGPATH -u "$path"`
35468
35469  # Now try to locate executable using which
35470  new_path=`$WHICH "$new_path" 2> /dev/null`
35471  # bat and cmd files are not always considered executable in cygwin causing which
35472  # to not find them
35473  if test "x$new_path" = x \
35474      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35475      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35476    new_path=`$CYGPATH -u "$path"`
35477  fi
35478  if test "x$new_path" = x; then
35479    # Oops. Which didn't find the executable.
35480    # The splitting of arguments from the executable at a space might have been incorrect,
35481    # since paths with space are more likely in Windows. Give it another try with the whole
35482    # argument.
35483    path="$complete"
35484    arguments="EOL"
35485    new_path=`$CYGPATH -u "$path"`
35486    new_path=`$WHICH "$new_path" 2> /dev/null`
35487    # bat and cmd files are not always considered executable in cygwin causing which
35488    # to not find them
35489    if test "x$new_path" = x \
35490        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35491        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35492      new_path=`$CYGPATH -u "$path"`
35493    fi
35494    if test "x$new_path" = x; then
35495      # It's still not found. Now this is an unrecoverable error.
35496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35497$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35498      has_space=`$ECHO "$complete" | $GREP " "`
35499      if test "x$has_space" != x; then
35500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35502      fi
35503      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35504    fi
35505  fi
35506
35507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35510  # "foo.exe" is OK but "foo" is an error.
35511  #
35512  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35513  # It is also a way to make sure we got the proper file name for the real test later on.
35514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35515  if test "x$test_shortpath" = x; then
35516    # Short path failed, file does not exist as specified.
35517    # Try adding .exe or .cmd
35518    if test -f "${new_path}.exe"; then
35519      input_to_shortpath="${new_path}.exe"
35520    elif test -f "${new_path}.cmd"; then
35521      input_to_shortpath="${new_path}.cmd"
35522    else
35523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35524$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35525      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35526$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35527      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35528    fi
35529  else
35530    input_to_shortpath="$new_path"
35531  fi
35532
35533  # Call helper function which possibly converts this using DOS-style short mode.
35534  # If so, the updated path is stored in $new_path.
35535  new_path="$input_to_shortpath"
35536
35537  input_path="$input_to_shortpath"
35538  # Check if we need to convert this using DOS-style short mode. If the path
35539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35540  # take no chances and rewrite it.
35541  # Note: m4 eats our [], so we need to use [ and ] instead.
35542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35543  if test "x$has_forbidden_chars" != x; then
35544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35548      # Going to short mode and back again did indeed matter. Since short mode is
35549      # case insensitive, let's make it lowercase to improve readability.
35550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35551      # Now convert it back to Unix-style (cygpath)
35552      input_path=`$CYGPATH -u "$shortmode_path"`
35553      new_path="$input_path"
35554    fi
35555  fi
35556
35557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35558  if test "x$test_cygdrive_prefix" = x; then
35559    # As a simple fix, exclude /usr/bin since it's not a real path.
35560    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35562      # a path prefixed by /cygdrive for fixpath to work.
35563      new_path="$CYGWIN_ROOT_PATH$input_path"
35564    fi
35565  fi
35566
35567  # remove trailing .exe if any
35568  new_path="${new_path/%.exe/}"
35569
35570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35571
35572  # First separate the path from the arguments. This will split at the first
35573  # space.
35574  complete="$CXXCPP"
35575  path="${complete%% *}"
35576  tmp="$complete EOL"
35577  arguments="${tmp#* }"
35578
35579  # Input might be given as Windows format, start by converting to
35580  # unix format.
35581  new_path="$path"
35582
35583  windows_path="$new_path"
35584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35585    unix_path=`$CYGPATH -u "$windows_path"`
35586    new_path="$unix_path"
35587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35589    new_path="$unix_path"
35590  fi
35591
35592
35593  # Now try to locate executable using which
35594  new_path=`$WHICH "$new_path" 2> /dev/null`
35595
35596  if test "x$new_path" = x; then
35597    # Oops. Which didn't find the executable.
35598    # The splitting of arguments from the executable at a space might have been incorrect,
35599    # since paths with space are more likely in Windows. Give it another try with the whole
35600    # argument.
35601    path="$complete"
35602    arguments="EOL"
35603    new_path="$path"
35604
35605  windows_path="$new_path"
35606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35607    unix_path=`$CYGPATH -u "$windows_path"`
35608    new_path="$unix_path"
35609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35611    new_path="$unix_path"
35612  fi
35613
35614
35615    new_path=`$WHICH "$new_path" 2> /dev/null`
35616    # bat and cmd files are not always considered executable in MSYS causing which
35617    # to not find them
35618    if test "x$new_path" = x \
35619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35621      new_path="$path"
35622
35623  windows_path="$new_path"
35624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35625    unix_path=`$CYGPATH -u "$windows_path"`
35626    new_path="$unix_path"
35627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35629    new_path="$unix_path"
35630  fi
35631
35632    fi
35633
35634    if test "x$new_path" = x; then
35635      # It's still not found. Now this is an unrecoverable error.
35636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35637$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35638      has_space=`$ECHO "$complete" | $GREP " "`
35639      if test "x$has_space" != x; then
35640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35642      fi
35643      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35644    fi
35645  fi
35646
35647  # Now new_path has a complete unix path to the binary
35648  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35649    # Keep paths in /bin as-is, but remove trailing .exe if any
35650    new_path="${new_path/%.exe/}"
35651    # Do not save /bin paths to all_fixpath_prefixes!
35652  else
35653    # Not in mixed or Windows style, start by that.
35654    new_path=`cmd //c echo $new_path`
35655
35656  input_path="$new_path"
35657  # Check if we need to convert this using DOS-style short mode. If the path
35658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35659  # take no chances and rewrite it.
35660  # Note: m4 eats our [], so we need to use [ and ] instead.
35661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35662  if test "x$has_forbidden_chars" != x; then
35663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35665  fi
35666
35667    # Output is in $new_path
35668
35669  windows_path="$new_path"
35670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35671    unix_path=`$CYGPATH -u "$windows_path"`
35672    new_path="$unix_path"
35673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35675    new_path="$unix_path"
35676  fi
35677
35678    # remove trailing .exe if any
35679    new_path="${new_path/%.exe/}"
35680
35681    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35682    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35683  fi
35684
35685    else
35686      # We're on a unix platform. Hooray! :)
35687      # First separate the path from the arguments. This will split at the first
35688      # space.
35689      complete="$CXXCPP"
35690      path="${complete%% *}"
35691      tmp="$complete EOL"
35692      arguments="${tmp#* }"
35693
35694      # Cannot rely on the command "which" here since it doesn't always work.
35695      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35696      if test -z "$is_absolute_path"; then
35697        # Path to executable is not absolute. Find it.
35698        IFS_save="$IFS"
35699        IFS=:
35700        for p in $PATH; do
35701          if test -f "$p/$path" && test -x "$p/$path"; then
35702            new_path="$p/$path"
35703            break
35704          fi
35705        done
35706        IFS="$IFS_save"
35707      else
35708        # This is an absolute path, we can use it without further modifications.
35709        new_path="$path"
35710      fi
35711
35712      if test "x$new_path" = x; then
35713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35714$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35715        has_space=`$ECHO "$complete" | $GREP " "`
35716        if test "x$has_space" != x; then
35717          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35718$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35719        fi
35720        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35721      fi
35722    fi
35723
35724    # Now join together the path and the arguments once again
35725    if test "x$arguments" != xEOL; then
35726      new_complete="$new_path ${arguments% *}"
35727    else
35728      new_complete="$new_path"
35729    fi
35730
35731    if test "x$complete" != "x$new_complete"; then
35732      CXXCPP="$new_complete"
35733      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35734$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35735    fi
35736  fi
35737
35738
35739  #
35740  # Setup the linker (LD)
35741  #
35742  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35743    # In the Microsoft toolchain we have a separate LD command "link".
35744    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35745    # a cygwin program for something completely different.
35746    # Extract the first word of "link", so it can be a program name with args.
35747set dummy link; ac_word=$2
35748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35749$as_echo_n "checking for $ac_word... " >&6; }
35750if ${ac_cv_prog_LD+:} false; then :
35751  $as_echo_n "(cached) " >&6
35752else
35753  if test -n "$LD"; then
35754  ac_cv_prog_LD="$LD" # Let the user override the test.
35755else
35756  ac_prog_rejected=no
35757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35758for as_dir in $PATH
35759do
35760  IFS=$as_save_IFS
35761  test -z "$as_dir" && as_dir=.
35762    for ac_exec_ext in '' $ac_executable_extensions; do
35763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35764    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35765       ac_prog_rejected=yes
35766       continue
35767     fi
35768    ac_cv_prog_LD="link"
35769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35770    break 2
35771  fi
35772done
35773  done
35774IFS=$as_save_IFS
35775
35776if test $ac_prog_rejected = yes; then
35777  # We found a bogon in the path, so make sure we never use it.
35778  set dummy $ac_cv_prog_LD
35779  shift
35780  if test $# != 0; then
35781    # We chose a different compiler from the bogus one.
35782    # However, it has the same basename, so the bogon will be chosen
35783    # first if we set LD to just the basename; use the full file name.
35784    shift
35785    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35786  fi
35787fi
35788fi
35789fi
35790LD=$ac_cv_prog_LD
35791if test -n "$LD"; then
35792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35793$as_echo "$LD" >&6; }
35794else
35795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35796$as_echo "no" >&6; }
35797fi
35798
35799
35800
35801  # Only process if variable expands to non-empty
35802
35803  if test "x$LD" != x; then
35804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35805
35806  # First separate the path from the arguments. This will split at the first
35807  # space.
35808  complete="$LD"
35809  path="${complete%% *}"
35810  tmp="$complete EOL"
35811  arguments="${tmp#* }"
35812
35813  # Input might be given as Windows format, start by converting to
35814  # unix format.
35815  new_path=`$CYGPATH -u "$path"`
35816
35817  # Now try to locate executable using which
35818  new_path=`$WHICH "$new_path" 2> /dev/null`
35819  # bat and cmd files are not always considered executable in cygwin causing which
35820  # to not find them
35821  if test "x$new_path" = x \
35822      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35823      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35824    new_path=`$CYGPATH -u "$path"`
35825  fi
35826  if test "x$new_path" = x; then
35827    # Oops. Which didn't find the executable.
35828    # The splitting of arguments from the executable at a space might have been incorrect,
35829    # since paths with space are more likely in Windows. Give it another try with the whole
35830    # argument.
35831    path="$complete"
35832    arguments="EOL"
35833    new_path=`$CYGPATH -u "$path"`
35834    new_path=`$WHICH "$new_path" 2> /dev/null`
35835    # bat and cmd files are not always considered executable in cygwin causing which
35836    # to not find them
35837    if test "x$new_path" = x \
35838        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35839        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35840      new_path=`$CYGPATH -u "$path"`
35841    fi
35842    if test "x$new_path" = x; then
35843      # It's still not found. Now this is an unrecoverable error.
35844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35845$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35846      has_space=`$ECHO "$complete" | $GREP " "`
35847      if test "x$has_space" != x; then
35848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35850      fi
35851      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35852    fi
35853  fi
35854
35855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35858  # "foo.exe" is OK but "foo" is an error.
35859  #
35860  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35861  # It is also a way to make sure we got the proper file name for the real test later on.
35862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35863  if test "x$test_shortpath" = x; then
35864    # Short path failed, file does not exist as specified.
35865    # Try adding .exe or .cmd
35866    if test -f "${new_path}.exe"; then
35867      input_to_shortpath="${new_path}.exe"
35868    elif test -f "${new_path}.cmd"; then
35869      input_to_shortpath="${new_path}.cmd"
35870    else
35871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35872$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35873      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35874$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35875      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35876    fi
35877  else
35878    input_to_shortpath="$new_path"
35879  fi
35880
35881  # Call helper function which possibly converts this using DOS-style short mode.
35882  # If so, the updated path is stored in $new_path.
35883  new_path="$input_to_shortpath"
35884
35885  input_path="$input_to_shortpath"
35886  # Check if we need to convert this using DOS-style short mode. If the path
35887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35888  # take no chances and rewrite it.
35889  # Note: m4 eats our [], so we need to use [ and ] instead.
35890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35891  if test "x$has_forbidden_chars" != x; then
35892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35896      # Going to short mode and back again did indeed matter. Since short mode is
35897      # case insensitive, let's make it lowercase to improve readability.
35898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35899      # Now convert it back to Unix-style (cygpath)
35900      input_path=`$CYGPATH -u "$shortmode_path"`
35901      new_path="$input_path"
35902    fi
35903  fi
35904
35905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35906  if test "x$test_cygdrive_prefix" = x; then
35907    # As a simple fix, exclude /usr/bin since it's not a real path.
35908    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35910      # a path prefixed by /cygdrive for fixpath to work.
35911      new_path="$CYGWIN_ROOT_PATH$input_path"
35912    fi
35913  fi
35914
35915  # remove trailing .exe if any
35916  new_path="${new_path/%.exe/}"
35917
35918    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35919
35920  # First separate the path from the arguments. This will split at the first
35921  # space.
35922  complete="$LD"
35923  path="${complete%% *}"
35924  tmp="$complete EOL"
35925  arguments="${tmp#* }"
35926
35927  # Input might be given as Windows format, start by converting to
35928  # unix format.
35929  new_path="$path"
35930
35931  windows_path="$new_path"
35932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35933    unix_path=`$CYGPATH -u "$windows_path"`
35934    new_path="$unix_path"
35935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35937    new_path="$unix_path"
35938  fi
35939
35940
35941  # Now try to locate executable using which
35942  new_path=`$WHICH "$new_path" 2> /dev/null`
35943
35944  if test "x$new_path" = x; then
35945    # Oops. Which didn't find the executable.
35946    # The splitting of arguments from the executable at a space might have been incorrect,
35947    # since paths with space are more likely in Windows. Give it another try with the whole
35948    # argument.
35949    path="$complete"
35950    arguments="EOL"
35951    new_path="$path"
35952
35953  windows_path="$new_path"
35954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35955    unix_path=`$CYGPATH -u "$windows_path"`
35956    new_path="$unix_path"
35957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35959    new_path="$unix_path"
35960  fi
35961
35962
35963    new_path=`$WHICH "$new_path" 2> /dev/null`
35964    # bat and cmd files are not always considered executable in MSYS causing which
35965    # to not find them
35966    if test "x$new_path" = x \
35967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35969      new_path="$path"
35970
35971  windows_path="$new_path"
35972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35973    unix_path=`$CYGPATH -u "$windows_path"`
35974    new_path="$unix_path"
35975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35977    new_path="$unix_path"
35978  fi
35979
35980    fi
35981
35982    if test "x$new_path" = x; then
35983      # It's still not found. Now this is an unrecoverable error.
35984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35985$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35986      has_space=`$ECHO "$complete" | $GREP " "`
35987      if test "x$has_space" != x; then
35988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35990      fi
35991      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35992    fi
35993  fi
35994
35995  # Now new_path has a complete unix path to the binary
35996  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35997    # Keep paths in /bin as-is, but remove trailing .exe if any
35998    new_path="${new_path/%.exe/}"
35999    # Do not save /bin paths to all_fixpath_prefixes!
36000  else
36001    # Not in mixed or Windows style, start by that.
36002    new_path=`cmd //c echo $new_path`
36003
36004  input_path="$new_path"
36005  # Check if we need to convert this using DOS-style short mode. If the path
36006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36007  # take no chances and rewrite it.
36008  # Note: m4 eats our [], so we need to use [ and ] instead.
36009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36010  if test "x$has_forbidden_chars" != x; then
36011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36013  fi
36014
36015    # Output is in $new_path
36016
36017  windows_path="$new_path"
36018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36019    unix_path=`$CYGPATH -u "$windows_path"`
36020    new_path="$unix_path"
36021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36023    new_path="$unix_path"
36024  fi
36025
36026    # remove trailing .exe if any
36027    new_path="${new_path/%.exe/}"
36028
36029    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36030    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36031  fi
36032
36033    else
36034      # We're on a unix platform. Hooray! :)
36035      # First separate the path from the arguments. This will split at the first
36036      # space.
36037      complete="$LD"
36038      path="${complete%% *}"
36039      tmp="$complete EOL"
36040      arguments="${tmp#* }"
36041
36042      # Cannot rely on the command "which" here since it doesn't always work.
36043      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36044      if test -z "$is_absolute_path"; then
36045        # Path to executable is not absolute. Find it.
36046        IFS_save="$IFS"
36047        IFS=:
36048        for p in $PATH; do
36049          if test -f "$p/$path" && test -x "$p/$path"; then
36050            new_path="$p/$path"
36051            break
36052          fi
36053        done
36054        IFS="$IFS_save"
36055      else
36056        # This is an absolute path, we can use it without further modifications.
36057        new_path="$path"
36058      fi
36059
36060      if test "x$new_path" = x; then
36061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36062$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36063        has_space=`$ECHO "$complete" | $GREP " "`
36064        if test "x$has_space" != x; then
36065          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36066$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36067        fi
36068        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36069      fi
36070    fi
36071
36072    # Now join together the path and the arguments once again
36073    if test "x$arguments" != xEOL; then
36074      new_complete="$new_path ${arguments% *}"
36075    else
36076      new_complete="$new_path"
36077    fi
36078
36079    if test "x$complete" != "x$new_complete"; then
36080      LD="$new_complete"
36081      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36082$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36083    fi
36084  fi
36085
36086    # Verify that we indeed succeeded with this trick.
36087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36088$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36089    "$LD" --version > /dev/null
36090    if test $? -eq 0 ; then
36091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36092$as_echo "no" >&6; }
36093      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36094    else
36095      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36096$as_echo "yes" >&6; }
36097    fi
36098    LDCXX="$LD"
36099  else
36100    # All other toolchains use the compiler to link.
36101    LD="$CC"
36102    LDCXX="$CXX"
36103  fi
36104
36105  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36106
36107
36108  #
36109  # Setup the assembler (AS)
36110  #
36111  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36112    # FIXME: should this really be solaris, or solstudio?
36113
36114
36115  # Publish this variable in the help.
36116
36117
36118  if [ -z "${AS+x}" ]; then
36119    # The variable is not set by user, try to locate tool using the code snippet
36120    for ac_prog in as
36121do
36122  # Extract the first word of "$ac_prog", so it can be a program name with args.
36123set dummy $ac_prog; ac_word=$2
36124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36125$as_echo_n "checking for $ac_word... " >&6; }
36126if ${ac_cv_path_AS+:} false; then :
36127  $as_echo_n "(cached) " >&6
36128else
36129  case $AS in
36130  [\\/]* | ?:[\\/]*)
36131  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36132  ;;
36133  *)
36134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36135for as_dir in $PATH
36136do
36137  IFS=$as_save_IFS
36138  test -z "$as_dir" && as_dir=.
36139    for ac_exec_ext in '' $ac_executable_extensions; do
36140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36141    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36143    break 2
36144  fi
36145done
36146  done
36147IFS=$as_save_IFS
36148
36149  ;;
36150esac
36151fi
36152AS=$ac_cv_path_AS
36153if test -n "$AS"; then
36154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36155$as_echo "$AS" >&6; }
36156else
36157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36158$as_echo "no" >&6; }
36159fi
36160
36161
36162  test -n "$AS" && break
36163done
36164
36165  else
36166    # The variable is set, but is it from the command line or the environment?
36167
36168    # Try to remove the string !AS! from our list.
36169    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36170    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36171      # If it failed, the variable was not from the command line. Ignore it,
36172      # but warn the user (except for BASH, which is always set by the calling BASH).
36173      if test "xAS" != xBASH; then
36174        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36175$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36176      fi
36177      # Try to locate tool using the code snippet
36178      for ac_prog in as
36179do
36180  # Extract the first word of "$ac_prog", so it can be a program name with args.
36181set dummy $ac_prog; ac_word=$2
36182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36183$as_echo_n "checking for $ac_word... " >&6; }
36184if ${ac_cv_path_AS+:} false; then :
36185  $as_echo_n "(cached) " >&6
36186else
36187  case $AS in
36188  [\\/]* | ?:[\\/]*)
36189  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36190  ;;
36191  *)
36192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36193for as_dir in $PATH
36194do
36195  IFS=$as_save_IFS
36196  test -z "$as_dir" && as_dir=.
36197    for ac_exec_ext in '' $ac_executable_extensions; do
36198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36199    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36201    break 2
36202  fi
36203done
36204  done
36205IFS=$as_save_IFS
36206
36207  ;;
36208esac
36209fi
36210AS=$ac_cv_path_AS
36211if test -n "$AS"; then
36212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36213$as_echo "$AS" >&6; }
36214else
36215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36216$as_echo "no" >&6; }
36217fi
36218
36219
36220  test -n "$AS" && break
36221done
36222
36223    else
36224      # If it succeeded, then it was overridden by the user. We will use it
36225      # for the tool.
36226
36227      # First remove it from the list of overridden variables, so we can test
36228      # for unknown variables in the end.
36229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36230
36231      # Check if we try to supply an empty value
36232      if test "x$AS" = x; then
36233        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36234$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36236$as_echo_n "checking for AS... " >&6; }
36237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36238$as_echo "disabled" >&6; }
36239      else
36240        # Check if the provided tool contains a complete path.
36241        tool_specified="$AS"
36242        tool_basename="${tool_specified##*/}"
36243        if test "x$tool_basename" = "x$tool_specified"; then
36244          # A command without a complete path is provided, search $PATH.
36245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36246$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36247          # Extract the first word of "$tool_basename", so it can be a program name with args.
36248set dummy $tool_basename; ac_word=$2
36249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36250$as_echo_n "checking for $ac_word... " >&6; }
36251if ${ac_cv_path_AS+:} false; then :
36252  $as_echo_n "(cached) " >&6
36253else
36254  case $AS in
36255  [\\/]* | ?:[\\/]*)
36256  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36257  ;;
36258  *)
36259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36260for as_dir in $PATH
36261do
36262  IFS=$as_save_IFS
36263  test -z "$as_dir" && as_dir=.
36264    for ac_exec_ext in '' $ac_executable_extensions; do
36265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36266    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36268    break 2
36269  fi
36270done
36271  done
36272IFS=$as_save_IFS
36273
36274  ;;
36275esac
36276fi
36277AS=$ac_cv_path_AS
36278if test -n "$AS"; then
36279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36280$as_echo "$AS" >&6; }
36281else
36282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36283$as_echo "no" >&6; }
36284fi
36285
36286
36287          if test "x$AS" = x; then
36288            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36289          fi
36290        else
36291          # Otherwise we believe it is a complete path. Use it as it is.
36292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36293$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36294          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36295$as_echo_n "checking for AS... " >&6; }
36296          if test ! -x "$tool_specified"; then
36297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36298$as_echo "not found" >&6; }
36299            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36300          fi
36301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36302$as_echo "$tool_specified" >&6; }
36303        fi
36304      fi
36305    fi
36306
36307  fi
36308
36309
36310
36311  # Only process if variable expands to non-empty
36312
36313  if test "x$AS" != x; then
36314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36315
36316  # First separate the path from the arguments. This will split at the first
36317  # space.
36318  complete="$AS"
36319  path="${complete%% *}"
36320  tmp="$complete EOL"
36321  arguments="${tmp#* }"
36322
36323  # Input might be given as Windows format, start by converting to
36324  # unix format.
36325  new_path=`$CYGPATH -u "$path"`
36326
36327  # Now try to locate executable using which
36328  new_path=`$WHICH "$new_path" 2> /dev/null`
36329  # bat and cmd files are not always considered executable in cygwin causing which
36330  # to not find them
36331  if test "x$new_path" = x \
36332      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36333      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36334    new_path=`$CYGPATH -u "$path"`
36335  fi
36336  if test "x$new_path" = x; then
36337    # Oops. Which didn't find the executable.
36338    # The splitting of arguments from the executable at a space might have been incorrect,
36339    # since paths with space are more likely in Windows. Give it another try with the whole
36340    # argument.
36341    path="$complete"
36342    arguments="EOL"
36343    new_path=`$CYGPATH -u "$path"`
36344    new_path=`$WHICH "$new_path" 2> /dev/null`
36345    # bat and cmd files are not always considered executable in cygwin causing which
36346    # to not find them
36347    if test "x$new_path" = x \
36348        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36349        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36350      new_path=`$CYGPATH -u "$path"`
36351    fi
36352    if test "x$new_path" = x; then
36353      # It's still not found. Now this is an unrecoverable error.
36354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36355$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36356      has_space=`$ECHO "$complete" | $GREP " "`
36357      if test "x$has_space" != x; then
36358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36360      fi
36361      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36362    fi
36363  fi
36364
36365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36368  # "foo.exe" is OK but "foo" is an error.
36369  #
36370  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36371  # It is also a way to make sure we got the proper file name for the real test later on.
36372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36373  if test "x$test_shortpath" = x; then
36374    # Short path failed, file does not exist as specified.
36375    # Try adding .exe or .cmd
36376    if test -f "${new_path}.exe"; then
36377      input_to_shortpath="${new_path}.exe"
36378    elif test -f "${new_path}.cmd"; then
36379      input_to_shortpath="${new_path}.cmd"
36380    else
36381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36382$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36383      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36384$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36385      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36386    fi
36387  else
36388    input_to_shortpath="$new_path"
36389  fi
36390
36391  # Call helper function which possibly converts this using DOS-style short mode.
36392  # If so, the updated path is stored in $new_path.
36393  new_path="$input_to_shortpath"
36394
36395  input_path="$input_to_shortpath"
36396  # Check if we need to convert this using DOS-style short mode. If the path
36397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36398  # take no chances and rewrite it.
36399  # Note: m4 eats our [], so we need to use [ and ] instead.
36400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36401  if test "x$has_forbidden_chars" != x; then
36402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36406      # Going to short mode and back again did indeed matter. Since short mode is
36407      # case insensitive, let's make it lowercase to improve readability.
36408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36409      # Now convert it back to Unix-style (cygpath)
36410      input_path=`$CYGPATH -u "$shortmode_path"`
36411      new_path="$input_path"
36412    fi
36413  fi
36414
36415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36416  if test "x$test_cygdrive_prefix" = x; then
36417    # As a simple fix, exclude /usr/bin since it's not a real path.
36418    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36420      # a path prefixed by /cygdrive for fixpath to work.
36421      new_path="$CYGWIN_ROOT_PATH$input_path"
36422    fi
36423  fi
36424
36425  # remove trailing .exe if any
36426  new_path="${new_path/%.exe/}"
36427
36428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36429
36430  # First separate the path from the arguments. This will split at the first
36431  # space.
36432  complete="$AS"
36433  path="${complete%% *}"
36434  tmp="$complete EOL"
36435  arguments="${tmp#* }"
36436
36437  # Input might be given as Windows format, start by converting to
36438  # unix format.
36439  new_path="$path"
36440
36441  windows_path="$new_path"
36442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36443    unix_path=`$CYGPATH -u "$windows_path"`
36444    new_path="$unix_path"
36445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36447    new_path="$unix_path"
36448  fi
36449
36450
36451  # Now try to locate executable using which
36452  new_path=`$WHICH "$new_path" 2> /dev/null`
36453
36454  if test "x$new_path" = x; then
36455    # Oops. Which didn't find the executable.
36456    # The splitting of arguments from the executable at a space might have been incorrect,
36457    # since paths with space are more likely in Windows. Give it another try with the whole
36458    # argument.
36459    path="$complete"
36460    arguments="EOL"
36461    new_path="$path"
36462
36463  windows_path="$new_path"
36464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36465    unix_path=`$CYGPATH -u "$windows_path"`
36466    new_path="$unix_path"
36467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36469    new_path="$unix_path"
36470  fi
36471
36472
36473    new_path=`$WHICH "$new_path" 2> /dev/null`
36474    # bat and cmd files are not always considered executable in MSYS causing which
36475    # to not find them
36476    if test "x$new_path" = x \
36477        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36478        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36479      new_path="$path"
36480
36481  windows_path="$new_path"
36482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36483    unix_path=`$CYGPATH -u "$windows_path"`
36484    new_path="$unix_path"
36485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36487    new_path="$unix_path"
36488  fi
36489
36490    fi
36491
36492    if test "x$new_path" = x; then
36493      # It's still not found. Now this is an unrecoverable error.
36494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36495$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36496      has_space=`$ECHO "$complete" | $GREP " "`
36497      if test "x$has_space" != x; then
36498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36500      fi
36501      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36502    fi
36503  fi
36504
36505  # Now new_path has a complete unix path to the binary
36506  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36507    # Keep paths in /bin as-is, but remove trailing .exe if any
36508    new_path="${new_path/%.exe/}"
36509    # Do not save /bin paths to all_fixpath_prefixes!
36510  else
36511    # Not in mixed or Windows style, start by that.
36512    new_path=`cmd //c echo $new_path`
36513
36514  input_path="$new_path"
36515  # Check if we need to convert this using DOS-style short mode. If the path
36516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36517  # take no chances and rewrite it.
36518  # Note: m4 eats our [], so we need to use [ and ] instead.
36519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36520  if test "x$has_forbidden_chars" != x; then
36521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36523  fi
36524
36525    # Output is in $new_path
36526
36527  windows_path="$new_path"
36528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36529    unix_path=`$CYGPATH -u "$windows_path"`
36530    new_path="$unix_path"
36531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36533    new_path="$unix_path"
36534  fi
36535
36536    # remove trailing .exe if any
36537    new_path="${new_path/%.exe/}"
36538
36539    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36540    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36541  fi
36542
36543    else
36544      # We're on a unix platform. Hooray! :)
36545      # First separate the path from the arguments. This will split at the first
36546      # space.
36547      complete="$AS"
36548      path="${complete%% *}"
36549      tmp="$complete EOL"
36550      arguments="${tmp#* }"
36551
36552      # Cannot rely on the command "which" here since it doesn't always work.
36553      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36554      if test -z "$is_absolute_path"; then
36555        # Path to executable is not absolute. Find it.
36556        IFS_save="$IFS"
36557        IFS=:
36558        for p in $PATH; do
36559          if test -f "$p/$path" && test -x "$p/$path"; then
36560            new_path="$p/$path"
36561            break
36562          fi
36563        done
36564        IFS="$IFS_save"
36565      else
36566        # This is an absolute path, we can use it without further modifications.
36567        new_path="$path"
36568      fi
36569
36570      if test "x$new_path" = x; then
36571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36572$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36573        has_space=`$ECHO "$complete" | $GREP " "`
36574        if test "x$has_space" != x; then
36575          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36576$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36577        fi
36578        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36579      fi
36580    fi
36581
36582    # Now join together the path and the arguments once again
36583    if test "x$arguments" != xEOL; then
36584      new_complete="$new_path ${arguments% *}"
36585    else
36586      new_complete="$new_path"
36587    fi
36588
36589    if test "x$complete" != "x$new_complete"; then
36590      AS="$new_complete"
36591      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36592$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36593    fi
36594  fi
36595
36596  else
36597    # FIXME: is this correct for microsoft?
36598    AS="$CC -c"
36599  fi
36600
36601
36602  #
36603  # Setup the archiver (AR)
36604  #
36605  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36606    # The corresponding ar tool is lib.exe (used to create static libraries)
36607    # Extract the first word of "lib", so it can be a program name with args.
36608set dummy lib; ac_word=$2
36609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36610$as_echo_n "checking for $ac_word... " >&6; }
36611if ${ac_cv_prog_AR+:} false; then :
36612  $as_echo_n "(cached) " >&6
36613else
36614  if test -n "$AR"; then
36615  ac_cv_prog_AR="$AR" # Let the user override the test.
36616else
36617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36618for as_dir in $PATH
36619do
36620  IFS=$as_save_IFS
36621  test -z "$as_dir" && as_dir=.
36622    for ac_exec_ext in '' $ac_executable_extensions; do
36623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36624    ac_cv_prog_AR="lib"
36625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36626    break 2
36627  fi
36628done
36629  done
36630IFS=$as_save_IFS
36631
36632fi
36633fi
36634AR=$ac_cv_prog_AR
36635if test -n "$AR"; then
36636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36637$as_echo "$AR" >&6; }
36638else
36639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36640$as_echo "no" >&6; }
36641fi
36642
36643
36644  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36645
36646
36647  # Publish this variable in the help.
36648
36649
36650  if [ -z "${AR+x}" ]; then
36651    # The variable is not set by user, try to locate tool using the code snippet
36652    if test -n "$ac_tool_prefix"; then
36653  for ac_prog in ar gcc-ar
36654  do
36655    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36656set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36658$as_echo_n "checking for $ac_word... " >&6; }
36659if ${ac_cv_prog_AR+:} false; then :
36660  $as_echo_n "(cached) " >&6
36661else
36662  if test -n "$AR"; then
36663  ac_cv_prog_AR="$AR" # Let the user override the test.
36664else
36665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36666for as_dir in $PATH
36667do
36668  IFS=$as_save_IFS
36669  test -z "$as_dir" && as_dir=.
36670    for ac_exec_ext in '' $ac_executable_extensions; do
36671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36672    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36674    break 2
36675  fi
36676done
36677  done
36678IFS=$as_save_IFS
36679
36680fi
36681fi
36682AR=$ac_cv_prog_AR
36683if test -n "$AR"; then
36684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36685$as_echo "$AR" >&6; }
36686else
36687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36688$as_echo "no" >&6; }
36689fi
36690
36691
36692    test -n "$AR" && break
36693  done
36694fi
36695if test -z "$AR"; then
36696  ac_ct_AR=$AR
36697  for ac_prog in ar gcc-ar
36698do
36699  # Extract the first word of "$ac_prog", so it can be a program name with args.
36700set dummy $ac_prog; ac_word=$2
36701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36702$as_echo_n "checking for $ac_word... " >&6; }
36703if ${ac_cv_prog_ac_ct_AR+:} false; then :
36704  $as_echo_n "(cached) " >&6
36705else
36706  if test -n "$ac_ct_AR"; then
36707  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36708else
36709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36710for as_dir in $PATH
36711do
36712  IFS=$as_save_IFS
36713  test -z "$as_dir" && as_dir=.
36714    for ac_exec_ext in '' $ac_executable_extensions; do
36715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36716    ac_cv_prog_ac_ct_AR="$ac_prog"
36717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36718    break 2
36719  fi
36720done
36721  done
36722IFS=$as_save_IFS
36723
36724fi
36725fi
36726ac_ct_AR=$ac_cv_prog_ac_ct_AR
36727if test -n "$ac_ct_AR"; then
36728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36729$as_echo "$ac_ct_AR" >&6; }
36730else
36731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36732$as_echo "no" >&6; }
36733fi
36734
36735
36736  test -n "$ac_ct_AR" && break
36737done
36738
36739  if test "x$ac_ct_AR" = x; then
36740    AR=""
36741  else
36742    case $cross_compiling:$ac_tool_warned in
36743yes:)
36744{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36745$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36746ac_tool_warned=yes ;;
36747esac
36748    AR=$ac_ct_AR
36749  fi
36750fi
36751
36752  else
36753    # The variable is set, but is it from the command line or the environment?
36754
36755    # Try to remove the string !AR! from our list.
36756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36758      # If it failed, the variable was not from the command line. Ignore it,
36759      # but warn the user (except for BASH, which is always set by the calling BASH).
36760      if test "xAR" != xBASH; then
36761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36762$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36763      fi
36764      # Try to locate tool using the code snippet
36765      if test -n "$ac_tool_prefix"; then
36766  for ac_prog in ar gcc-ar
36767  do
36768    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36769set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36771$as_echo_n "checking for $ac_word... " >&6; }
36772if ${ac_cv_prog_AR+:} false; then :
36773  $as_echo_n "(cached) " >&6
36774else
36775  if test -n "$AR"; then
36776  ac_cv_prog_AR="$AR" # Let the user override the test.
36777else
36778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36779for as_dir in $PATH
36780do
36781  IFS=$as_save_IFS
36782  test -z "$as_dir" && as_dir=.
36783    for ac_exec_ext in '' $ac_executable_extensions; do
36784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36785    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36787    break 2
36788  fi
36789done
36790  done
36791IFS=$as_save_IFS
36792
36793fi
36794fi
36795AR=$ac_cv_prog_AR
36796if test -n "$AR"; then
36797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36798$as_echo "$AR" >&6; }
36799else
36800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36801$as_echo "no" >&6; }
36802fi
36803
36804
36805    test -n "$AR" && break
36806  done
36807fi
36808if test -z "$AR"; then
36809  ac_ct_AR=$AR
36810  for ac_prog in ar gcc-ar
36811do
36812  # Extract the first word of "$ac_prog", so it can be a program name with args.
36813set dummy $ac_prog; ac_word=$2
36814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36815$as_echo_n "checking for $ac_word... " >&6; }
36816if ${ac_cv_prog_ac_ct_AR+:} false; then :
36817  $as_echo_n "(cached) " >&6
36818else
36819  if test -n "$ac_ct_AR"; then
36820  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36821else
36822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36823for as_dir in $PATH
36824do
36825  IFS=$as_save_IFS
36826  test -z "$as_dir" && as_dir=.
36827    for ac_exec_ext in '' $ac_executable_extensions; do
36828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36829    ac_cv_prog_ac_ct_AR="$ac_prog"
36830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36831    break 2
36832  fi
36833done
36834  done
36835IFS=$as_save_IFS
36836
36837fi
36838fi
36839ac_ct_AR=$ac_cv_prog_ac_ct_AR
36840if test -n "$ac_ct_AR"; then
36841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36842$as_echo "$ac_ct_AR" >&6; }
36843else
36844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36845$as_echo "no" >&6; }
36846fi
36847
36848
36849  test -n "$ac_ct_AR" && break
36850done
36851
36852  if test "x$ac_ct_AR" = x; then
36853    AR=""
36854  else
36855    case $cross_compiling:$ac_tool_warned in
36856yes:)
36857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36859ac_tool_warned=yes ;;
36860esac
36861    AR=$ac_ct_AR
36862  fi
36863fi
36864
36865    else
36866      # If it succeeded, then it was overridden by the user. We will use it
36867      # for the tool.
36868
36869      # First remove it from the list of overridden variables, so we can test
36870      # for unknown variables in the end.
36871      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36872
36873      # Check if we try to supply an empty value
36874      if test "x$AR" = x; then
36875        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36876$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36877        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36878$as_echo_n "checking for AR... " >&6; }
36879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36880$as_echo "disabled" >&6; }
36881      else
36882        # Check if the provided tool contains a complete path.
36883        tool_specified="$AR"
36884        tool_basename="${tool_specified##*/}"
36885        if test "x$tool_basename" = "x$tool_specified"; then
36886          # A command without a complete path is provided, search $PATH.
36887          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36888$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36889          # Extract the first word of "$tool_basename", so it can be a program name with args.
36890set dummy $tool_basename; ac_word=$2
36891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36892$as_echo_n "checking for $ac_word... " >&6; }
36893if ${ac_cv_path_AR+:} false; then :
36894  $as_echo_n "(cached) " >&6
36895else
36896  case $AR in
36897  [\\/]* | ?:[\\/]*)
36898  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36899  ;;
36900  *)
36901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36902for as_dir in $PATH
36903do
36904  IFS=$as_save_IFS
36905  test -z "$as_dir" && as_dir=.
36906    for ac_exec_ext in '' $ac_executable_extensions; do
36907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36908    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36910    break 2
36911  fi
36912done
36913  done
36914IFS=$as_save_IFS
36915
36916  ;;
36917esac
36918fi
36919AR=$ac_cv_path_AR
36920if test -n "$AR"; then
36921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36922$as_echo "$AR" >&6; }
36923else
36924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36925$as_echo "no" >&6; }
36926fi
36927
36928
36929          if test "x$AR" = x; then
36930            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36931          fi
36932        else
36933          # Otherwise we believe it is a complete path. Use it as it is.
36934          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36935$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36936          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36937$as_echo_n "checking for AR... " >&6; }
36938          if test ! -x "$tool_specified"; then
36939            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36940$as_echo "not found" >&6; }
36941            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36942          fi
36943          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36944$as_echo "$tool_specified" >&6; }
36945        fi
36946      fi
36947    fi
36948
36949  fi
36950
36951
36952  else
36953
36954
36955  # Publish this variable in the help.
36956
36957
36958  if [ -z "${AR+x}" ]; then
36959    # The variable is not set by user, try to locate tool using the code snippet
36960    if test -n "$ac_tool_prefix"; then
36961  for ac_prog in ar
36962  do
36963    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36964set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36966$as_echo_n "checking for $ac_word... " >&6; }
36967if ${ac_cv_prog_AR+:} false; then :
36968  $as_echo_n "(cached) " >&6
36969else
36970  if test -n "$AR"; then
36971  ac_cv_prog_AR="$AR" # Let the user override the test.
36972else
36973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36974for as_dir in $PATH
36975do
36976  IFS=$as_save_IFS
36977  test -z "$as_dir" && as_dir=.
36978    for ac_exec_ext in '' $ac_executable_extensions; do
36979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36980    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36982    break 2
36983  fi
36984done
36985  done
36986IFS=$as_save_IFS
36987
36988fi
36989fi
36990AR=$ac_cv_prog_AR
36991if test -n "$AR"; then
36992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36993$as_echo "$AR" >&6; }
36994else
36995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36996$as_echo "no" >&6; }
36997fi
36998
36999
37000    test -n "$AR" && break
37001  done
37002fi
37003if test -z "$AR"; then
37004  ac_ct_AR=$AR
37005  for ac_prog in ar
37006do
37007  # Extract the first word of "$ac_prog", so it can be a program name with args.
37008set dummy $ac_prog; ac_word=$2
37009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37010$as_echo_n "checking for $ac_word... " >&6; }
37011if ${ac_cv_prog_ac_ct_AR+:} false; then :
37012  $as_echo_n "(cached) " >&6
37013else
37014  if test -n "$ac_ct_AR"; then
37015  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37016else
37017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37018for as_dir in $PATH
37019do
37020  IFS=$as_save_IFS
37021  test -z "$as_dir" && as_dir=.
37022    for ac_exec_ext in '' $ac_executable_extensions; do
37023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37024    ac_cv_prog_ac_ct_AR="$ac_prog"
37025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37026    break 2
37027  fi
37028done
37029  done
37030IFS=$as_save_IFS
37031
37032fi
37033fi
37034ac_ct_AR=$ac_cv_prog_ac_ct_AR
37035if test -n "$ac_ct_AR"; then
37036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37037$as_echo "$ac_ct_AR" >&6; }
37038else
37039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37040$as_echo "no" >&6; }
37041fi
37042
37043
37044  test -n "$ac_ct_AR" && break
37045done
37046
37047  if test "x$ac_ct_AR" = x; then
37048    AR=""
37049  else
37050    case $cross_compiling:$ac_tool_warned in
37051yes:)
37052{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37053$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37054ac_tool_warned=yes ;;
37055esac
37056    AR=$ac_ct_AR
37057  fi
37058fi
37059
37060  else
37061    # The variable is set, but is it from the command line or the environment?
37062
37063    # Try to remove the string !AR! from our list.
37064    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37065    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37066      # If it failed, the variable was not from the command line. Ignore it,
37067      # but warn the user (except for BASH, which is always set by the calling BASH).
37068      if test "xAR" != xBASH; then
37069        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37070$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37071      fi
37072      # Try to locate tool using the code snippet
37073      if test -n "$ac_tool_prefix"; then
37074  for ac_prog in ar
37075  do
37076    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37077set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37079$as_echo_n "checking for $ac_word... " >&6; }
37080if ${ac_cv_prog_AR+:} false; then :
37081  $as_echo_n "(cached) " >&6
37082else
37083  if test -n "$AR"; then
37084  ac_cv_prog_AR="$AR" # Let the user override the test.
37085else
37086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37087for as_dir in $PATH
37088do
37089  IFS=$as_save_IFS
37090  test -z "$as_dir" && as_dir=.
37091    for ac_exec_ext in '' $ac_executable_extensions; do
37092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37093    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37095    break 2
37096  fi
37097done
37098  done
37099IFS=$as_save_IFS
37100
37101fi
37102fi
37103AR=$ac_cv_prog_AR
37104if test -n "$AR"; then
37105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37106$as_echo "$AR" >&6; }
37107else
37108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37109$as_echo "no" >&6; }
37110fi
37111
37112
37113    test -n "$AR" && break
37114  done
37115fi
37116if test -z "$AR"; then
37117  ac_ct_AR=$AR
37118  for ac_prog in ar
37119do
37120  # Extract the first word of "$ac_prog", so it can be a program name with args.
37121set dummy $ac_prog; ac_word=$2
37122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37123$as_echo_n "checking for $ac_word... " >&6; }
37124if ${ac_cv_prog_ac_ct_AR+:} false; then :
37125  $as_echo_n "(cached) " >&6
37126else
37127  if test -n "$ac_ct_AR"; then
37128  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37129else
37130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37131for as_dir in $PATH
37132do
37133  IFS=$as_save_IFS
37134  test -z "$as_dir" && as_dir=.
37135    for ac_exec_ext in '' $ac_executable_extensions; do
37136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37137    ac_cv_prog_ac_ct_AR="$ac_prog"
37138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37139    break 2
37140  fi
37141done
37142  done
37143IFS=$as_save_IFS
37144
37145fi
37146fi
37147ac_ct_AR=$ac_cv_prog_ac_ct_AR
37148if test -n "$ac_ct_AR"; then
37149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37150$as_echo "$ac_ct_AR" >&6; }
37151else
37152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37153$as_echo "no" >&6; }
37154fi
37155
37156
37157  test -n "$ac_ct_AR" && break
37158done
37159
37160  if test "x$ac_ct_AR" = x; then
37161    AR=""
37162  else
37163    case $cross_compiling:$ac_tool_warned in
37164yes:)
37165{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37166$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37167ac_tool_warned=yes ;;
37168esac
37169    AR=$ac_ct_AR
37170  fi
37171fi
37172
37173    else
37174      # If it succeeded, then it was overridden by the user. We will use it
37175      # for the tool.
37176
37177      # First remove it from the list of overridden variables, so we can test
37178      # for unknown variables in the end.
37179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37180
37181      # Check if we try to supply an empty value
37182      if test "x$AR" = x; then
37183        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37184$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37186$as_echo_n "checking for AR... " >&6; }
37187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37188$as_echo "disabled" >&6; }
37189      else
37190        # Check if the provided tool contains a complete path.
37191        tool_specified="$AR"
37192        tool_basename="${tool_specified##*/}"
37193        if test "x$tool_basename" = "x$tool_specified"; then
37194          # A command without a complete path is provided, search $PATH.
37195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37196$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37197          # Extract the first word of "$tool_basename", so it can be a program name with args.
37198set dummy $tool_basename; ac_word=$2
37199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37200$as_echo_n "checking for $ac_word... " >&6; }
37201if ${ac_cv_path_AR+:} false; then :
37202  $as_echo_n "(cached) " >&6
37203else
37204  case $AR in
37205  [\\/]* | ?:[\\/]*)
37206  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37207  ;;
37208  *)
37209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37210for as_dir in $PATH
37211do
37212  IFS=$as_save_IFS
37213  test -z "$as_dir" && as_dir=.
37214    for ac_exec_ext in '' $ac_executable_extensions; do
37215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37216    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37218    break 2
37219  fi
37220done
37221  done
37222IFS=$as_save_IFS
37223
37224  ;;
37225esac
37226fi
37227AR=$ac_cv_path_AR
37228if test -n "$AR"; then
37229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37230$as_echo "$AR" >&6; }
37231else
37232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37233$as_echo "no" >&6; }
37234fi
37235
37236
37237          if test "x$AR" = x; then
37238            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37239          fi
37240        else
37241          # Otherwise we believe it is a complete path. Use it as it is.
37242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37243$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37244          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37245$as_echo_n "checking for AR... " >&6; }
37246          if test ! -x "$tool_specified"; then
37247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37248$as_echo "not found" >&6; }
37249            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37250          fi
37251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37252$as_echo "$tool_specified" >&6; }
37253        fi
37254      fi
37255    fi
37256
37257  fi
37258
37259
37260  fi
37261
37262  # Only process if variable expands to non-empty
37263
37264  if test "x$AR" != x; then
37265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37266
37267  # First separate the path from the arguments. This will split at the first
37268  # space.
37269  complete="$AR"
37270  path="${complete%% *}"
37271  tmp="$complete EOL"
37272  arguments="${tmp#* }"
37273
37274  # Input might be given as Windows format, start by converting to
37275  # unix format.
37276  new_path=`$CYGPATH -u "$path"`
37277
37278  # Now try to locate executable using which
37279  new_path=`$WHICH "$new_path" 2> /dev/null`
37280  # bat and cmd files are not always considered executable in cygwin causing which
37281  # to not find them
37282  if test "x$new_path" = x \
37283      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37284      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37285    new_path=`$CYGPATH -u "$path"`
37286  fi
37287  if test "x$new_path" = x; then
37288    # Oops. Which didn't find the executable.
37289    # The splitting of arguments from the executable at a space might have been incorrect,
37290    # since paths with space are more likely in Windows. Give it another try with the whole
37291    # argument.
37292    path="$complete"
37293    arguments="EOL"
37294    new_path=`$CYGPATH -u "$path"`
37295    new_path=`$WHICH "$new_path" 2> /dev/null`
37296    # bat and cmd files are not always considered executable in cygwin causing which
37297    # to not find them
37298    if test "x$new_path" = x \
37299        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37300        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37301      new_path=`$CYGPATH -u "$path"`
37302    fi
37303    if test "x$new_path" = x; then
37304      # It's still not found. Now this is an unrecoverable error.
37305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37306$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37307      has_space=`$ECHO "$complete" | $GREP " "`
37308      if test "x$has_space" != x; then
37309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37311      fi
37312      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37313    fi
37314  fi
37315
37316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37319  # "foo.exe" is OK but "foo" is an error.
37320  #
37321  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37322  # It is also a way to make sure we got the proper file name for the real test later on.
37323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37324  if test "x$test_shortpath" = x; then
37325    # Short path failed, file does not exist as specified.
37326    # Try adding .exe or .cmd
37327    if test -f "${new_path}.exe"; then
37328      input_to_shortpath="${new_path}.exe"
37329    elif test -f "${new_path}.cmd"; then
37330      input_to_shortpath="${new_path}.cmd"
37331    else
37332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37333$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37334      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37335$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37336      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37337    fi
37338  else
37339    input_to_shortpath="$new_path"
37340  fi
37341
37342  # Call helper function which possibly converts this using DOS-style short mode.
37343  # If so, the updated path is stored in $new_path.
37344  new_path="$input_to_shortpath"
37345
37346  input_path="$input_to_shortpath"
37347  # Check if we need to convert this using DOS-style short mode. If the path
37348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37349  # take no chances and rewrite it.
37350  # Note: m4 eats our [], so we need to use [ and ] instead.
37351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37352  if test "x$has_forbidden_chars" != x; then
37353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37357      # Going to short mode and back again did indeed matter. Since short mode is
37358      # case insensitive, let's make it lowercase to improve readability.
37359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37360      # Now convert it back to Unix-style (cygpath)
37361      input_path=`$CYGPATH -u "$shortmode_path"`
37362      new_path="$input_path"
37363    fi
37364  fi
37365
37366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37367  if test "x$test_cygdrive_prefix" = x; then
37368    # As a simple fix, exclude /usr/bin since it's not a real path.
37369    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37371      # a path prefixed by /cygdrive for fixpath to work.
37372      new_path="$CYGWIN_ROOT_PATH$input_path"
37373    fi
37374  fi
37375
37376  # remove trailing .exe if any
37377  new_path="${new_path/%.exe/}"
37378
37379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37380
37381  # First separate the path from the arguments. This will split at the first
37382  # space.
37383  complete="$AR"
37384  path="${complete%% *}"
37385  tmp="$complete EOL"
37386  arguments="${tmp#* }"
37387
37388  # Input might be given as Windows format, start by converting to
37389  # unix format.
37390  new_path="$path"
37391
37392  windows_path="$new_path"
37393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37394    unix_path=`$CYGPATH -u "$windows_path"`
37395    new_path="$unix_path"
37396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37398    new_path="$unix_path"
37399  fi
37400
37401
37402  # Now try to locate executable using which
37403  new_path=`$WHICH "$new_path" 2> /dev/null`
37404
37405  if test "x$new_path" = x; then
37406    # Oops. Which didn't find the executable.
37407    # The splitting of arguments from the executable at a space might have been incorrect,
37408    # since paths with space are more likely in Windows. Give it another try with the whole
37409    # argument.
37410    path="$complete"
37411    arguments="EOL"
37412    new_path="$path"
37413
37414  windows_path="$new_path"
37415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37416    unix_path=`$CYGPATH -u "$windows_path"`
37417    new_path="$unix_path"
37418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37420    new_path="$unix_path"
37421  fi
37422
37423
37424    new_path=`$WHICH "$new_path" 2> /dev/null`
37425    # bat and cmd files are not always considered executable in MSYS causing which
37426    # to not find them
37427    if test "x$new_path" = x \
37428        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37429        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37430      new_path="$path"
37431
37432  windows_path="$new_path"
37433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37434    unix_path=`$CYGPATH -u "$windows_path"`
37435    new_path="$unix_path"
37436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37438    new_path="$unix_path"
37439  fi
37440
37441    fi
37442
37443    if test "x$new_path" = x; then
37444      # It's still not found. Now this is an unrecoverable error.
37445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37446$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37447      has_space=`$ECHO "$complete" | $GREP " "`
37448      if test "x$has_space" != x; then
37449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37451      fi
37452      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37453    fi
37454  fi
37455
37456  # Now new_path has a complete unix path to the binary
37457  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37458    # Keep paths in /bin as-is, but remove trailing .exe if any
37459    new_path="${new_path/%.exe/}"
37460    # Do not save /bin paths to all_fixpath_prefixes!
37461  else
37462    # Not in mixed or Windows style, start by that.
37463    new_path=`cmd //c echo $new_path`
37464
37465  input_path="$new_path"
37466  # Check if we need to convert this using DOS-style short mode. If the path
37467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37468  # take no chances and rewrite it.
37469  # Note: m4 eats our [], so we need to use [ and ] instead.
37470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37471  if test "x$has_forbidden_chars" != x; then
37472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37474  fi
37475
37476    # Output is in $new_path
37477
37478  windows_path="$new_path"
37479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37480    unix_path=`$CYGPATH -u "$windows_path"`
37481    new_path="$unix_path"
37482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37484    new_path="$unix_path"
37485  fi
37486
37487    # remove trailing .exe if any
37488    new_path="${new_path/%.exe/}"
37489
37490    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37491    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37492  fi
37493
37494    else
37495      # We're on a unix platform. Hooray! :)
37496      # First separate the path from the arguments. This will split at the first
37497      # space.
37498      complete="$AR"
37499      path="${complete%% *}"
37500      tmp="$complete EOL"
37501      arguments="${tmp#* }"
37502
37503      # Cannot rely on the command "which" here since it doesn't always work.
37504      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37505      if test -z "$is_absolute_path"; then
37506        # Path to executable is not absolute. Find it.
37507        IFS_save="$IFS"
37508        IFS=:
37509        for p in $PATH; do
37510          if test -f "$p/$path" && test -x "$p/$path"; then
37511            new_path="$p/$path"
37512            break
37513          fi
37514        done
37515        IFS="$IFS_save"
37516      else
37517        # This is an absolute path, we can use it without further modifications.
37518        new_path="$path"
37519      fi
37520
37521      if test "x$new_path" = x; then
37522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37523$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37524        has_space=`$ECHO "$complete" | $GREP " "`
37525        if test "x$has_space" != x; then
37526          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37527$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37528        fi
37529        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37530      fi
37531    fi
37532
37533    # Now join together the path and the arguments once again
37534    if test "x$arguments" != xEOL; then
37535      new_complete="$new_path ${arguments% *}"
37536    else
37537      new_complete="$new_path"
37538    fi
37539
37540    if test "x$complete" != "x$new_complete"; then
37541      AR="$new_complete"
37542      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37543$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37544    fi
37545  fi
37546
37547
37548
37549  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37550
37551
37552  # Publish this variable in the help.
37553
37554
37555  if [ -z "${LIPO+x}" ]; then
37556    # The variable is not set by user, try to locate tool using the code snippet
37557    for ac_prog in lipo
37558do
37559  # Extract the first word of "$ac_prog", so it can be a program name with args.
37560set dummy $ac_prog; ac_word=$2
37561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37562$as_echo_n "checking for $ac_word... " >&6; }
37563if ${ac_cv_path_LIPO+:} false; then :
37564  $as_echo_n "(cached) " >&6
37565else
37566  case $LIPO in
37567  [\\/]* | ?:[\\/]*)
37568  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37569  ;;
37570  *)
37571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37572for as_dir in $PATH
37573do
37574  IFS=$as_save_IFS
37575  test -z "$as_dir" && as_dir=.
37576    for ac_exec_ext in '' $ac_executable_extensions; do
37577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37578    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37580    break 2
37581  fi
37582done
37583  done
37584IFS=$as_save_IFS
37585
37586  ;;
37587esac
37588fi
37589LIPO=$ac_cv_path_LIPO
37590if test -n "$LIPO"; then
37591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37592$as_echo "$LIPO" >&6; }
37593else
37594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37595$as_echo "no" >&6; }
37596fi
37597
37598
37599  test -n "$LIPO" && break
37600done
37601
37602  else
37603    # The variable is set, but is it from the command line or the environment?
37604
37605    # Try to remove the string !LIPO! from our list.
37606    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37607    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37608      # If it failed, the variable was not from the command line. Ignore it,
37609      # but warn the user (except for BASH, which is always set by the calling BASH).
37610      if test "xLIPO" != xBASH; then
37611        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37612$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37613      fi
37614      # Try to locate tool using the code snippet
37615      for ac_prog in lipo
37616do
37617  # Extract the first word of "$ac_prog", so it can be a program name with args.
37618set dummy $ac_prog; ac_word=$2
37619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37620$as_echo_n "checking for $ac_word... " >&6; }
37621if ${ac_cv_path_LIPO+:} false; then :
37622  $as_echo_n "(cached) " >&6
37623else
37624  case $LIPO in
37625  [\\/]* | ?:[\\/]*)
37626  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37627  ;;
37628  *)
37629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37630for as_dir in $PATH
37631do
37632  IFS=$as_save_IFS
37633  test -z "$as_dir" && as_dir=.
37634    for ac_exec_ext in '' $ac_executable_extensions; do
37635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37636    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37638    break 2
37639  fi
37640done
37641  done
37642IFS=$as_save_IFS
37643
37644  ;;
37645esac
37646fi
37647LIPO=$ac_cv_path_LIPO
37648if test -n "$LIPO"; then
37649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37650$as_echo "$LIPO" >&6; }
37651else
37652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37653$as_echo "no" >&6; }
37654fi
37655
37656
37657  test -n "$LIPO" && break
37658done
37659
37660    else
37661      # If it succeeded, then it was overridden by the user. We will use it
37662      # for the tool.
37663
37664      # First remove it from the list of overridden variables, so we can test
37665      # for unknown variables in the end.
37666      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37667
37668      # Check if we try to supply an empty value
37669      if test "x$LIPO" = x; then
37670        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37671$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37673$as_echo_n "checking for LIPO... " >&6; }
37674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37675$as_echo "disabled" >&6; }
37676      else
37677        # Check if the provided tool contains a complete path.
37678        tool_specified="$LIPO"
37679        tool_basename="${tool_specified##*/}"
37680        if test "x$tool_basename" = "x$tool_specified"; then
37681          # A command without a complete path is provided, search $PATH.
37682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37683$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37684          # Extract the first word of "$tool_basename", so it can be a program name with args.
37685set dummy $tool_basename; ac_word=$2
37686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37687$as_echo_n "checking for $ac_word... " >&6; }
37688if ${ac_cv_path_LIPO+:} false; then :
37689  $as_echo_n "(cached) " >&6
37690else
37691  case $LIPO in
37692  [\\/]* | ?:[\\/]*)
37693  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37694  ;;
37695  *)
37696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37697for as_dir in $PATH
37698do
37699  IFS=$as_save_IFS
37700  test -z "$as_dir" && as_dir=.
37701    for ac_exec_ext in '' $ac_executable_extensions; do
37702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37703    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37705    break 2
37706  fi
37707done
37708  done
37709IFS=$as_save_IFS
37710
37711  ;;
37712esac
37713fi
37714LIPO=$ac_cv_path_LIPO
37715if test -n "$LIPO"; then
37716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37717$as_echo "$LIPO" >&6; }
37718else
37719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37720$as_echo "no" >&6; }
37721fi
37722
37723
37724          if test "x$LIPO" = x; then
37725            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37726          fi
37727        else
37728          # Otherwise we believe it is a complete path. Use it as it is.
37729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37730$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37731          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37732$as_echo_n "checking for LIPO... " >&6; }
37733          if test ! -x "$tool_specified"; then
37734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37735$as_echo "not found" >&6; }
37736            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37737          fi
37738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37739$as_echo "$tool_specified" >&6; }
37740        fi
37741      fi
37742    fi
37743
37744  fi
37745
37746
37747
37748  # Only process if variable expands to non-empty
37749
37750  if test "x$LIPO" != x; then
37751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37752
37753  # First separate the path from the arguments. This will split at the first
37754  # space.
37755  complete="$LIPO"
37756  path="${complete%% *}"
37757  tmp="$complete EOL"
37758  arguments="${tmp#* }"
37759
37760  # Input might be given as Windows format, start by converting to
37761  # unix format.
37762  new_path=`$CYGPATH -u "$path"`
37763
37764  # Now try to locate executable using which
37765  new_path=`$WHICH "$new_path" 2> /dev/null`
37766  # bat and cmd files are not always considered executable in cygwin causing which
37767  # to not find them
37768  if test "x$new_path" = x \
37769      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37770      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37771    new_path=`$CYGPATH -u "$path"`
37772  fi
37773  if test "x$new_path" = x; then
37774    # Oops. Which didn't find the executable.
37775    # The splitting of arguments from the executable at a space might have been incorrect,
37776    # since paths with space are more likely in Windows. Give it another try with the whole
37777    # argument.
37778    path="$complete"
37779    arguments="EOL"
37780    new_path=`$CYGPATH -u "$path"`
37781    new_path=`$WHICH "$new_path" 2> /dev/null`
37782    # bat and cmd files are not always considered executable in cygwin causing which
37783    # to not find them
37784    if test "x$new_path" = x \
37785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37787      new_path=`$CYGPATH -u "$path"`
37788    fi
37789    if test "x$new_path" = x; then
37790      # It's still not found. Now this is an unrecoverable error.
37791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37792$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37793      has_space=`$ECHO "$complete" | $GREP " "`
37794      if test "x$has_space" != x; then
37795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37797      fi
37798      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37799    fi
37800  fi
37801
37802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37805  # "foo.exe" is OK but "foo" is an error.
37806  #
37807  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37808  # It is also a way to make sure we got the proper file name for the real test later on.
37809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37810  if test "x$test_shortpath" = x; then
37811    # Short path failed, file does not exist as specified.
37812    # Try adding .exe or .cmd
37813    if test -f "${new_path}.exe"; then
37814      input_to_shortpath="${new_path}.exe"
37815    elif test -f "${new_path}.cmd"; then
37816      input_to_shortpath="${new_path}.cmd"
37817    else
37818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37819$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37820      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37821$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37822      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37823    fi
37824  else
37825    input_to_shortpath="$new_path"
37826  fi
37827
37828  # Call helper function which possibly converts this using DOS-style short mode.
37829  # If so, the updated path is stored in $new_path.
37830  new_path="$input_to_shortpath"
37831
37832  input_path="$input_to_shortpath"
37833  # Check if we need to convert this using DOS-style short mode. If the path
37834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37835  # take no chances and rewrite it.
37836  # Note: m4 eats our [], so we need to use [ and ] instead.
37837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37838  if test "x$has_forbidden_chars" != x; then
37839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37843      # Going to short mode and back again did indeed matter. Since short mode is
37844      # case insensitive, let's make it lowercase to improve readability.
37845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37846      # Now convert it back to Unix-style (cygpath)
37847      input_path=`$CYGPATH -u "$shortmode_path"`
37848      new_path="$input_path"
37849    fi
37850  fi
37851
37852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37853  if test "x$test_cygdrive_prefix" = x; then
37854    # As a simple fix, exclude /usr/bin since it's not a real path.
37855    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37857      # a path prefixed by /cygdrive for fixpath to work.
37858      new_path="$CYGWIN_ROOT_PATH$input_path"
37859    fi
37860  fi
37861
37862  # remove trailing .exe if any
37863  new_path="${new_path/%.exe/}"
37864
37865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37866
37867  # First separate the path from the arguments. This will split at the first
37868  # space.
37869  complete="$LIPO"
37870  path="${complete%% *}"
37871  tmp="$complete EOL"
37872  arguments="${tmp#* }"
37873
37874  # Input might be given as Windows format, start by converting to
37875  # unix format.
37876  new_path="$path"
37877
37878  windows_path="$new_path"
37879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37880    unix_path=`$CYGPATH -u "$windows_path"`
37881    new_path="$unix_path"
37882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37884    new_path="$unix_path"
37885  fi
37886
37887
37888  # Now try to locate executable using which
37889  new_path=`$WHICH "$new_path" 2> /dev/null`
37890
37891  if test "x$new_path" = x; then
37892    # Oops. Which didn't find the executable.
37893    # The splitting of arguments from the executable at a space might have been incorrect,
37894    # since paths with space are more likely in Windows. Give it another try with the whole
37895    # argument.
37896    path="$complete"
37897    arguments="EOL"
37898    new_path="$path"
37899
37900  windows_path="$new_path"
37901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37902    unix_path=`$CYGPATH -u "$windows_path"`
37903    new_path="$unix_path"
37904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37906    new_path="$unix_path"
37907  fi
37908
37909
37910    new_path=`$WHICH "$new_path" 2> /dev/null`
37911    # bat and cmd files are not always considered executable in MSYS causing which
37912    # to not find them
37913    if test "x$new_path" = x \
37914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37916      new_path="$path"
37917
37918  windows_path="$new_path"
37919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37920    unix_path=`$CYGPATH -u "$windows_path"`
37921    new_path="$unix_path"
37922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37924    new_path="$unix_path"
37925  fi
37926
37927    fi
37928
37929    if test "x$new_path" = x; then
37930      # It's still not found. Now this is an unrecoverable error.
37931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37932$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37933      has_space=`$ECHO "$complete" | $GREP " "`
37934      if test "x$has_space" != x; then
37935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37937      fi
37938      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37939    fi
37940  fi
37941
37942  # Now new_path has a complete unix path to the binary
37943  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37944    # Keep paths in /bin as-is, but remove trailing .exe if any
37945    new_path="${new_path/%.exe/}"
37946    # Do not save /bin paths to all_fixpath_prefixes!
37947  else
37948    # Not in mixed or Windows style, start by that.
37949    new_path=`cmd //c echo $new_path`
37950
37951  input_path="$new_path"
37952  # Check if we need to convert this using DOS-style short mode. If the path
37953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37954  # take no chances and rewrite it.
37955  # Note: m4 eats our [], so we need to use [ and ] instead.
37956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37957  if test "x$has_forbidden_chars" != x; then
37958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37960  fi
37961
37962    # Output is in $new_path
37963
37964  windows_path="$new_path"
37965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37966    unix_path=`$CYGPATH -u "$windows_path"`
37967    new_path="$unix_path"
37968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37970    new_path="$unix_path"
37971  fi
37972
37973    # remove trailing .exe if any
37974    new_path="${new_path/%.exe/}"
37975
37976    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37977    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37978  fi
37979
37980    else
37981      # We're on a unix platform. Hooray! :)
37982      # First separate the path from the arguments. This will split at the first
37983      # space.
37984      complete="$LIPO"
37985      path="${complete%% *}"
37986      tmp="$complete EOL"
37987      arguments="${tmp#* }"
37988
37989      # Cannot rely on the command "which" here since it doesn't always work.
37990      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37991      if test -z "$is_absolute_path"; then
37992        # Path to executable is not absolute. Find it.
37993        IFS_save="$IFS"
37994        IFS=:
37995        for p in $PATH; do
37996          if test -f "$p/$path" && test -x "$p/$path"; then
37997            new_path="$p/$path"
37998            break
37999          fi
38000        done
38001        IFS="$IFS_save"
38002      else
38003        # This is an absolute path, we can use it without further modifications.
38004        new_path="$path"
38005      fi
38006
38007      if test "x$new_path" = x; then
38008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38009$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38010        has_space=`$ECHO "$complete" | $GREP " "`
38011        if test "x$has_space" != x; then
38012          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38013$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38014        fi
38015        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38016      fi
38017    fi
38018
38019    # Now join together the path and the arguments once again
38020    if test "x$arguments" != xEOL; then
38021      new_complete="$new_path ${arguments% *}"
38022    else
38023      new_complete="$new_path"
38024    fi
38025
38026    if test "x$complete" != "x$new_complete"; then
38027      LIPO="$new_complete"
38028      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38029$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38030    fi
38031  fi
38032
38033  fi
38034
38035  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38036    # Extract the first word of "mt", so it can be a program name with args.
38037set dummy mt; ac_word=$2
38038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38039$as_echo_n "checking for $ac_word... " >&6; }
38040if ${ac_cv_prog_MT+:} false; then :
38041  $as_echo_n "(cached) " >&6
38042else
38043  if test -n "$MT"; then
38044  ac_cv_prog_MT="$MT" # Let the user override the test.
38045else
38046  ac_prog_rejected=no
38047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38048for as_dir in $PATH
38049do
38050  IFS=$as_save_IFS
38051  test -z "$as_dir" && as_dir=.
38052    for ac_exec_ext in '' $ac_executable_extensions; do
38053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38054    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38055       ac_prog_rejected=yes
38056       continue
38057     fi
38058    ac_cv_prog_MT="mt"
38059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38060    break 2
38061  fi
38062done
38063  done
38064IFS=$as_save_IFS
38065
38066if test $ac_prog_rejected = yes; then
38067  # We found a bogon in the path, so make sure we never use it.
38068  set dummy $ac_cv_prog_MT
38069  shift
38070  if test $# != 0; then
38071    # We chose a different compiler from the bogus one.
38072    # However, it has the same basename, so the bogon will be chosen
38073    # first if we set MT to just the basename; use the full file name.
38074    shift
38075    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38076  fi
38077fi
38078fi
38079fi
38080MT=$ac_cv_prog_MT
38081if test -n "$MT"; then
38082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38083$as_echo "$MT" >&6; }
38084else
38085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38086$as_echo "no" >&6; }
38087fi
38088
38089
38090
38091  # Only process if variable expands to non-empty
38092
38093  if test "x$MT" != x; then
38094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38095
38096  # First separate the path from the arguments. This will split at the first
38097  # space.
38098  complete="$MT"
38099  path="${complete%% *}"
38100  tmp="$complete EOL"
38101  arguments="${tmp#* }"
38102
38103  # Input might be given as Windows format, start by converting to
38104  # unix format.
38105  new_path=`$CYGPATH -u "$path"`
38106
38107  # Now try to locate executable using which
38108  new_path=`$WHICH "$new_path" 2> /dev/null`
38109  # bat and cmd files are not always considered executable in cygwin causing which
38110  # to not find them
38111  if test "x$new_path" = x \
38112      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38113      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38114    new_path=`$CYGPATH -u "$path"`
38115  fi
38116  if test "x$new_path" = x; then
38117    # Oops. Which didn't find the executable.
38118    # The splitting of arguments from the executable at a space might have been incorrect,
38119    # since paths with space are more likely in Windows. Give it another try with the whole
38120    # argument.
38121    path="$complete"
38122    arguments="EOL"
38123    new_path=`$CYGPATH -u "$path"`
38124    new_path=`$WHICH "$new_path" 2> /dev/null`
38125    # bat and cmd files are not always considered executable in cygwin causing which
38126    # to not find them
38127    if test "x$new_path" = x \
38128        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38129        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38130      new_path=`$CYGPATH -u "$path"`
38131    fi
38132    if test "x$new_path" = x; then
38133      # It's still not found. Now this is an unrecoverable error.
38134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38135$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38136      has_space=`$ECHO "$complete" | $GREP " "`
38137      if test "x$has_space" != x; then
38138        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38139$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38140      fi
38141      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38142    fi
38143  fi
38144
38145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38148  # "foo.exe" is OK but "foo" is an error.
38149  #
38150  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38151  # It is also a way to make sure we got the proper file name for the real test later on.
38152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38153  if test "x$test_shortpath" = x; then
38154    # Short path failed, file does not exist as specified.
38155    # Try adding .exe or .cmd
38156    if test -f "${new_path}.exe"; then
38157      input_to_shortpath="${new_path}.exe"
38158    elif test -f "${new_path}.cmd"; then
38159      input_to_shortpath="${new_path}.cmd"
38160    else
38161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38162$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38163      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38164$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38165      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38166    fi
38167  else
38168    input_to_shortpath="$new_path"
38169  fi
38170
38171  # Call helper function which possibly converts this using DOS-style short mode.
38172  # If so, the updated path is stored in $new_path.
38173  new_path="$input_to_shortpath"
38174
38175  input_path="$input_to_shortpath"
38176  # Check if we need to convert this using DOS-style short mode. If the path
38177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38178  # take no chances and rewrite it.
38179  # Note: m4 eats our [], so we need to use [ and ] instead.
38180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38181  if test "x$has_forbidden_chars" != x; then
38182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38186      # Going to short mode and back again did indeed matter. Since short mode is
38187      # case insensitive, let's make it lowercase to improve readability.
38188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38189      # Now convert it back to Unix-style (cygpath)
38190      input_path=`$CYGPATH -u "$shortmode_path"`
38191      new_path="$input_path"
38192    fi
38193  fi
38194
38195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38196  if test "x$test_cygdrive_prefix" = x; then
38197    # As a simple fix, exclude /usr/bin since it's not a real path.
38198    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38200      # a path prefixed by /cygdrive for fixpath to work.
38201      new_path="$CYGWIN_ROOT_PATH$input_path"
38202    fi
38203  fi
38204
38205  # remove trailing .exe if any
38206  new_path="${new_path/%.exe/}"
38207
38208    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38209
38210  # First separate the path from the arguments. This will split at the first
38211  # space.
38212  complete="$MT"
38213  path="${complete%% *}"
38214  tmp="$complete EOL"
38215  arguments="${tmp#* }"
38216
38217  # Input might be given as Windows format, start by converting to
38218  # unix format.
38219  new_path="$path"
38220
38221  windows_path="$new_path"
38222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38223    unix_path=`$CYGPATH -u "$windows_path"`
38224    new_path="$unix_path"
38225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38227    new_path="$unix_path"
38228  fi
38229
38230
38231  # Now try to locate executable using which
38232  new_path=`$WHICH "$new_path" 2> /dev/null`
38233
38234  if test "x$new_path" = x; then
38235    # Oops. Which didn't find the executable.
38236    # The splitting of arguments from the executable at a space might have been incorrect,
38237    # since paths with space are more likely in Windows. Give it another try with the whole
38238    # argument.
38239    path="$complete"
38240    arguments="EOL"
38241    new_path="$path"
38242
38243  windows_path="$new_path"
38244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38245    unix_path=`$CYGPATH -u "$windows_path"`
38246    new_path="$unix_path"
38247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38249    new_path="$unix_path"
38250  fi
38251
38252
38253    new_path=`$WHICH "$new_path" 2> /dev/null`
38254    # bat and cmd files are not always considered executable in MSYS causing which
38255    # to not find them
38256    if test "x$new_path" = x \
38257        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38258        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38259      new_path="$path"
38260
38261  windows_path="$new_path"
38262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38263    unix_path=`$CYGPATH -u "$windows_path"`
38264    new_path="$unix_path"
38265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38267    new_path="$unix_path"
38268  fi
38269
38270    fi
38271
38272    if test "x$new_path" = x; then
38273      # It's still not found. Now this is an unrecoverable error.
38274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38275$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38276      has_space=`$ECHO "$complete" | $GREP " "`
38277      if test "x$has_space" != x; then
38278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38280      fi
38281      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38282    fi
38283  fi
38284
38285  # Now new_path has a complete unix path to the binary
38286  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38287    # Keep paths in /bin as-is, but remove trailing .exe if any
38288    new_path="${new_path/%.exe/}"
38289    # Do not save /bin paths to all_fixpath_prefixes!
38290  else
38291    # Not in mixed or Windows style, start by that.
38292    new_path=`cmd //c echo $new_path`
38293
38294  input_path="$new_path"
38295  # Check if we need to convert this using DOS-style short mode. If the path
38296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38297  # take no chances and rewrite it.
38298  # Note: m4 eats our [], so we need to use [ and ] instead.
38299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38300  if test "x$has_forbidden_chars" != x; then
38301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38303  fi
38304
38305    # Output is in $new_path
38306
38307  windows_path="$new_path"
38308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38309    unix_path=`$CYGPATH -u "$windows_path"`
38310    new_path="$unix_path"
38311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38313    new_path="$unix_path"
38314  fi
38315
38316    # remove trailing .exe if any
38317    new_path="${new_path/%.exe/}"
38318
38319    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38320    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38321  fi
38322
38323    else
38324      # We're on a unix platform. Hooray! :)
38325      # First separate the path from the arguments. This will split at the first
38326      # space.
38327      complete="$MT"
38328      path="${complete%% *}"
38329      tmp="$complete EOL"
38330      arguments="${tmp#* }"
38331
38332      # Cannot rely on the command "which" here since it doesn't always work.
38333      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38334      if test -z "$is_absolute_path"; then
38335        # Path to executable is not absolute. Find it.
38336        IFS_save="$IFS"
38337        IFS=:
38338        for p in $PATH; do
38339          if test -f "$p/$path" && test -x "$p/$path"; then
38340            new_path="$p/$path"
38341            break
38342          fi
38343        done
38344        IFS="$IFS_save"
38345      else
38346        # This is an absolute path, we can use it without further modifications.
38347        new_path="$path"
38348      fi
38349
38350      if test "x$new_path" = x; then
38351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38352$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38353        has_space=`$ECHO "$complete" | $GREP " "`
38354        if test "x$has_space" != x; then
38355          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38356$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38357        fi
38358        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38359      fi
38360    fi
38361
38362    # Now join together the path and the arguments once again
38363    if test "x$arguments" != xEOL; then
38364      new_complete="$new_path ${arguments% *}"
38365    else
38366      new_complete="$new_path"
38367    fi
38368
38369    if test "x$complete" != "x$new_complete"; then
38370      MT="$new_complete"
38371      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38372$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38373    fi
38374  fi
38375
38376    # Setup the resource compiler (RC)
38377    # Extract the first word of "rc", so it can be a program name with args.
38378set dummy rc; ac_word=$2
38379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38380$as_echo_n "checking for $ac_word... " >&6; }
38381if ${ac_cv_prog_RC+:} false; then :
38382  $as_echo_n "(cached) " >&6
38383else
38384  if test -n "$RC"; then
38385  ac_cv_prog_RC="$RC" # Let the user override the test.
38386else
38387  ac_prog_rejected=no
38388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38389for as_dir in $PATH
38390do
38391  IFS=$as_save_IFS
38392  test -z "$as_dir" && as_dir=.
38393    for ac_exec_ext in '' $ac_executable_extensions; do
38394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38395    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38396       ac_prog_rejected=yes
38397       continue
38398     fi
38399    ac_cv_prog_RC="rc"
38400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38401    break 2
38402  fi
38403done
38404  done
38405IFS=$as_save_IFS
38406
38407if test $ac_prog_rejected = yes; then
38408  # We found a bogon in the path, so make sure we never use it.
38409  set dummy $ac_cv_prog_RC
38410  shift
38411  if test $# != 0; then
38412    # We chose a different compiler from the bogus one.
38413    # However, it has the same basename, so the bogon will be chosen
38414    # first if we set RC to just the basename; use the full file name.
38415    shift
38416    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38417  fi
38418fi
38419fi
38420fi
38421RC=$ac_cv_prog_RC
38422if test -n "$RC"; then
38423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38424$as_echo "$RC" >&6; }
38425else
38426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38427$as_echo "no" >&6; }
38428fi
38429
38430
38431
38432  # Only process if variable expands to non-empty
38433
38434  if test "x$RC" != x; then
38435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38436
38437  # First separate the path from the arguments. This will split at the first
38438  # space.
38439  complete="$RC"
38440  path="${complete%% *}"
38441  tmp="$complete EOL"
38442  arguments="${tmp#* }"
38443
38444  # Input might be given as Windows format, start by converting to
38445  # unix format.
38446  new_path=`$CYGPATH -u "$path"`
38447
38448  # Now try to locate executable using which
38449  new_path=`$WHICH "$new_path" 2> /dev/null`
38450  # bat and cmd files are not always considered executable in cygwin causing which
38451  # to not find them
38452  if test "x$new_path" = x \
38453      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38454      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38455    new_path=`$CYGPATH -u "$path"`
38456  fi
38457  if test "x$new_path" = x; then
38458    # Oops. Which didn't find the executable.
38459    # The splitting of arguments from the executable at a space might have been incorrect,
38460    # since paths with space are more likely in Windows. Give it another try with the whole
38461    # argument.
38462    path="$complete"
38463    arguments="EOL"
38464    new_path=`$CYGPATH -u "$path"`
38465    new_path=`$WHICH "$new_path" 2> /dev/null`
38466    # bat and cmd files are not always considered executable in cygwin causing which
38467    # to not find them
38468    if test "x$new_path" = x \
38469        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38470        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38471      new_path=`$CYGPATH -u "$path"`
38472    fi
38473    if test "x$new_path" = x; then
38474      # It's still not found. Now this is an unrecoverable error.
38475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38476$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38477      has_space=`$ECHO "$complete" | $GREP " "`
38478      if test "x$has_space" != x; then
38479        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38480$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38481      fi
38482      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38483    fi
38484  fi
38485
38486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38489  # "foo.exe" is OK but "foo" is an error.
38490  #
38491  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38492  # It is also a way to make sure we got the proper file name for the real test later on.
38493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38494  if test "x$test_shortpath" = x; then
38495    # Short path failed, file does not exist as specified.
38496    # Try adding .exe or .cmd
38497    if test -f "${new_path}.exe"; then
38498      input_to_shortpath="${new_path}.exe"
38499    elif test -f "${new_path}.cmd"; then
38500      input_to_shortpath="${new_path}.cmd"
38501    else
38502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38503$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38504      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38505$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38506      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38507    fi
38508  else
38509    input_to_shortpath="$new_path"
38510  fi
38511
38512  # Call helper function which possibly converts this using DOS-style short mode.
38513  # If so, the updated path is stored in $new_path.
38514  new_path="$input_to_shortpath"
38515
38516  input_path="$input_to_shortpath"
38517  # Check if we need to convert this using DOS-style short mode. If the path
38518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38519  # take no chances and rewrite it.
38520  # Note: m4 eats our [], so we need to use [ and ] instead.
38521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38522  if test "x$has_forbidden_chars" != x; then
38523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38524    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38525    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38526    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38527      # Going to short mode and back again did indeed matter. Since short mode is
38528      # case insensitive, let's make it lowercase to improve readability.
38529      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38530      # Now convert it back to Unix-style (cygpath)
38531      input_path=`$CYGPATH -u "$shortmode_path"`
38532      new_path="$input_path"
38533    fi
38534  fi
38535
38536  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38537  if test "x$test_cygdrive_prefix" = x; then
38538    # As a simple fix, exclude /usr/bin since it's not a real path.
38539    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38540      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38541      # a path prefixed by /cygdrive for fixpath to work.
38542      new_path="$CYGWIN_ROOT_PATH$input_path"
38543    fi
38544  fi
38545
38546  # remove trailing .exe if any
38547  new_path="${new_path/%.exe/}"
38548
38549    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38550
38551  # First separate the path from the arguments. This will split at the first
38552  # space.
38553  complete="$RC"
38554  path="${complete%% *}"
38555  tmp="$complete EOL"
38556  arguments="${tmp#* }"
38557
38558  # Input might be given as Windows format, start by converting to
38559  # unix format.
38560  new_path="$path"
38561
38562  windows_path="$new_path"
38563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38564    unix_path=`$CYGPATH -u "$windows_path"`
38565    new_path="$unix_path"
38566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38568    new_path="$unix_path"
38569  fi
38570
38571
38572  # Now try to locate executable using which
38573  new_path=`$WHICH "$new_path" 2> /dev/null`
38574
38575  if test "x$new_path" = x; then
38576    # Oops. Which didn't find the executable.
38577    # The splitting of arguments from the executable at a space might have been incorrect,
38578    # since paths with space are more likely in Windows. Give it another try with the whole
38579    # argument.
38580    path="$complete"
38581    arguments="EOL"
38582    new_path="$path"
38583
38584  windows_path="$new_path"
38585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38586    unix_path=`$CYGPATH -u "$windows_path"`
38587    new_path="$unix_path"
38588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38590    new_path="$unix_path"
38591  fi
38592
38593
38594    new_path=`$WHICH "$new_path" 2> /dev/null`
38595    # bat and cmd files are not always considered executable in MSYS causing which
38596    # to not find them
38597    if test "x$new_path" = x \
38598        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38599        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38600      new_path="$path"
38601
38602  windows_path="$new_path"
38603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38604    unix_path=`$CYGPATH -u "$windows_path"`
38605    new_path="$unix_path"
38606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38608    new_path="$unix_path"
38609  fi
38610
38611    fi
38612
38613    if test "x$new_path" = x; then
38614      # It's still not found. Now this is an unrecoverable error.
38615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38616$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38617      has_space=`$ECHO "$complete" | $GREP " "`
38618      if test "x$has_space" != x; then
38619        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38620$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38621      fi
38622      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38623    fi
38624  fi
38625
38626  # Now new_path has a complete unix path to the binary
38627  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38628    # Keep paths in /bin as-is, but remove trailing .exe if any
38629    new_path="${new_path/%.exe/}"
38630    # Do not save /bin paths to all_fixpath_prefixes!
38631  else
38632    # Not in mixed or Windows style, start by that.
38633    new_path=`cmd //c echo $new_path`
38634
38635  input_path="$new_path"
38636  # Check if we need to convert this using DOS-style short mode. If the path
38637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38638  # take no chances and rewrite it.
38639  # Note: m4 eats our [], so we need to use [ and ] instead.
38640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38641  if test "x$has_forbidden_chars" != x; then
38642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38643    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38644  fi
38645
38646    # Output is in $new_path
38647
38648  windows_path="$new_path"
38649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38650    unix_path=`$CYGPATH -u "$windows_path"`
38651    new_path="$unix_path"
38652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38654    new_path="$unix_path"
38655  fi
38656
38657    # remove trailing .exe if any
38658    new_path="${new_path/%.exe/}"
38659
38660    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38661    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38662  fi
38663
38664    else
38665      # We're on a unix platform. Hooray! :)
38666      # First separate the path from the arguments. This will split at the first
38667      # space.
38668      complete="$RC"
38669      path="${complete%% *}"
38670      tmp="$complete EOL"
38671      arguments="${tmp#* }"
38672
38673      # Cannot rely on the command "which" here since it doesn't always work.
38674      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38675      if test -z "$is_absolute_path"; then
38676        # Path to executable is not absolute. Find it.
38677        IFS_save="$IFS"
38678        IFS=:
38679        for p in $PATH; do
38680          if test -f "$p/$path" && test -x "$p/$path"; then
38681            new_path="$p/$path"
38682            break
38683          fi
38684        done
38685        IFS="$IFS_save"
38686      else
38687        # This is an absolute path, we can use it without further modifications.
38688        new_path="$path"
38689      fi
38690
38691      if test "x$new_path" = x; then
38692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38693$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38694        has_space=`$ECHO "$complete" | $GREP " "`
38695        if test "x$has_space" != x; then
38696          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38697$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38698        fi
38699        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38700      fi
38701    fi
38702
38703    # Now join together the path and the arguments once again
38704    if test "x$arguments" != xEOL; then
38705      new_complete="$new_path ${arguments% *}"
38706    else
38707      new_complete="$new_path"
38708    fi
38709
38710    if test "x$complete" != "x$new_complete"; then
38711      RC="$new_complete"
38712      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38713$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38714    fi
38715  fi
38716
38717    # Extract the first word of "dumpbin", so it can be a program name with args.
38718set dummy dumpbin; ac_word=$2
38719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38720$as_echo_n "checking for $ac_word... " >&6; }
38721if ${ac_cv_prog_DUMPBIN+:} false; then :
38722  $as_echo_n "(cached) " >&6
38723else
38724  if test -n "$DUMPBIN"; then
38725  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38726else
38727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38728for as_dir in $PATH
38729do
38730  IFS=$as_save_IFS
38731  test -z "$as_dir" && as_dir=.
38732    for ac_exec_ext in '' $ac_executable_extensions; do
38733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38734    ac_cv_prog_DUMPBIN="dumpbin"
38735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38736    break 2
38737  fi
38738done
38739  done
38740IFS=$as_save_IFS
38741
38742fi
38743fi
38744DUMPBIN=$ac_cv_prog_DUMPBIN
38745if test -n "$DUMPBIN"; then
38746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38747$as_echo "$DUMPBIN" >&6; }
38748else
38749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38750$as_echo "no" >&6; }
38751fi
38752
38753
38754
38755  # Only process if variable expands to non-empty
38756
38757  if test "x$DUMPBIN" != x; then
38758    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38759
38760  # First separate the path from the arguments. This will split at the first
38761  # space.
38762  complete="$DUMPBIN"
38763  path="${complete%% *}"
38764  tmp="$complete EOL"
38765  arguments="${tmp#* }"
38766
38767  # Input might be given as Windows format, start by converting to
38768  # unix format.
38769  new_path=`$CYGPATH -u "$path"`
38770
38771  # Now try to locate executable using which
38772  new_path=`$WHICH "$new_path" 2> /dev/null`
38773  # bat and cmd files are not always considered executable in cygwin causing which
38774  # to not find them
38775  if test "x$new_path" = x \
38776      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38777      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38778    new_path=`$CYGPATH -u "$path"`
38779  fi
38780  if test "x$new_path" = x; then
38781    # Oops. Which didn't find the executable.
38782    # The splitting of arguments from the executable at a space might have been incorrect,
38783    # since paths with space are more likely in Windows. Give it another try with the whole
38784    # argument.
38785    path="$complete"
38786    arguments="EOL"
38787    new_path=`$CYGPATH -u "$path"`
38788    new_path=`$WHICH "$new_path" 2> /dev/null`
38789    # bat and cmd files are not always considered executable in cygwin causing which
38790    # to not find them
38791    if test "x$new_path" = x \
38792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38794      new_path=`$CYGPATH -u "$path"`
38795    fi
38796    if test "x$new_path" = x; then
38797      # It's still not found. Now this is an unrecoverable error.
38798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38799$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38800      has_space=`$ECHO "$complete" | $GREP " "`
38801      if test "x$has_space" != x; then
38802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38804      fi
38805      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38806    fi
38807  fi
38808
38809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38812  # "foo.exe" is OK but "foo" is an error.
38813  #
38814  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38815  # It is also a way to make sure we got the proper file name for the real test later on.
38816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38817  if test "x$test_shortpath" = x; then
38818    # Short path failed, file does not exist as specified.
38819    # Try adding .exe or .cmd
38820    if test -f "${new_path}.exe"; then
38821      input_to_shortpath="${new_path}.exe"
38822    elif test -f "${new_path}.cmd"; then
38823      input_to_shortpath="${new_path}.cmd"
38824    else
38825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38826$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38827      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38828$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38829      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38830    fi
38831  else
38832    input_to_shortpath="$new_path"
38833  fi
38834
38835  # Call helper function which possibly converts this using DOS-style short mode.
38836  # If so, the updated path is stored in $new_path.
38837  new_path="$input_to_shortpath"
38838
38839  input_path="$input_to_shortpath"
38840  # Check if we need to convert this using DOS-style short mode. If the path
38841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38842  # take no chances and rewrite it.
38843  # Note: m4 eats our [], so we need to use [ and ] instead.
38844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38845  if test "x$has_forbidden_chars" != x; then
38846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38850      # Going to short mode and back again did indeed matter. Since short mode is
38851      # case insensitive, let's make it lowercase to improve readability.
38852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38853      # Now convert it back to Unix-style (cygpath)
38854      input_path=`$CYGPATH -u "$shortmode_path"`
38855      new_path="$input_path"
38856    fi
38857  fi
38858
38859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38860  if test "x$test_cygdrive_prefix" = x; then
38861    # As a simple fix, exclude /usr/bin since it's not a real path.
38862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38864      # a path prefixed by /cygdrive for fixpath to work.
38865      new_path="$CYGWIN_ROOT_PATH$input_path"
38866    fi
38867  fi
38868
38869  # remove trailing .exe if any
38870  new_path="${new_path/%.exe/}"
38871
38872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38873
38874  # First separate the path from the arguments. This will split at the first
38875  # space.
38876  complete="$DUMPBIN"
38877  path="${complete%% *}"
38878  tmp="$complete EOL"
38879  arguments="${tmp#* }"
38880
38881  # Input might be given as Windows format, start by converting to
38882  # unix format.
38883  new_path="$path"
38884
38885  windows_path="$new_path"
38886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38887    unix_path=`$CYGPATH -u "$windows_path"`
38888    new_path="$unix_path"
38889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38891    new_path="$unix_path"
38892  fi
38893
38894
38895  # Now try to locate executable using which
38896  new_path=`$WHICH "$new_path" 2> /dev/null`
38897
38898  if test "x$new_path" = x; then
38899    # Oops. Which didn't find the executable.
38900    # The splitting of arguments from the executable at a space might have been incorrect,
38901    # since paths with space are more likely in Windows. Give it another try with the whole
38902    # argument.
38903    path="$complete"
38904    arguments="EOL"
38905    new_path="$path"
38906
38907  windows_path="$new_path"
38908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38909    unix_path=`$CYGPATH -u "$windows_path"`
38910    new_path="$unix_path"
38911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38913    new_path="$unix_path"
38914  fi
38915
38916
38917    new_path=`$WHICH "$new_path" 2> /dev/null`
38918    # bat and cmd files are not always considered executable in MSYS causing which
38919    # to not find them
38920    if test "x$new_path" = x \
38921        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38922        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38923      new_path="$path"
38924
38925  windows_path="$new_path"
38926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38927    unix_path=`$CYGPATH -u "$windows_path"`
38928    new_path="$unix_path"
38929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38931    new_path="$unix_path"
38932  fi
38933
38934    fi
38935
38936    if test "x$new_path" = x; then
38937      # It's still not found. Now this is an unrecoverable error.
38938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38939$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38940      has_space=`$ECHO "$complete" | $GREP " "`
38941      if test "x$has_space" != x; then
38942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38944      fi
38945      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38946    fi
38947  fi
38948
38949  # Now new_path has a complete unix path to the binary
38950  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38951    # Keep paths in /bin as-is, but remove trailing .exe if any
38952    new_path="${new_path/%.exe/}"
38953    # Do not save /bin paths to all_fixpath_prefixes!
38954  else
38955    # Not in mixed or Windows style, start by that.
38956    new_path=`cmd //c echo $new_path`
38957
38958  input_path="$new_path"
38959  # Check if we need to convert this using DOS-style short mode. If the path
38960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38961  # take no chances and rewrite it.
38962  # Note: m4 eats our [], so we need to use [ and ] instead.
38963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38964  if test "x$has_forbidden_chars" != x; then
38965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38967  fi
38968
38969    # Output is in $new_path
38970
38971  windows_path="$new_path"
38972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38973    unix_path=`$CYGPATH -u "$windows_path"`
38974    new_path="$unix_path"
38975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38977    new_path="$unix_path"
38978  fi
38979
38980    # remove trailing .exe if any
38981    new_path="${new_path/%.exe/}"
38982
38983    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38984    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38985  fi
38986
38987    else
38988      # We're on a unix platform. Hooray! :)
38989      # First separate the path from the arguments. This will split at the first
38990      # space.
38991      complete="$DUMPBIN"
38992      path="${complete%% *}"
38993      tmp="$complete EOL"
38994      arguments="${tmp#* }"
38995
38996      # Cannot rely on the command "which" here since it doesn't always work.
38997      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38998      if test -z "$is_absolute_path"; then
38999        # Path to executable is not absolute. Find it.
39000        IFS_save="$IFS"
39001        IFS=:
39002        for p in $PATH; do
39003          if test -f "$p/$path" && test -x "$p/$path"; then
39004            new_path="$p/$path"
39005            break
39006          fi
39007        done
39008        IFS="$IFS_save"
39009      else
39010        # This is an absolute path, we can use it without further modifications.
39011        new_path="$path"
39012      fi
39013
39014      if test "x$new_path" = x; then
39015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39016$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39017        has_space=`$ECHO "$complete" | $GREP " "`
39018        if test "x$has_space" != x; then
39019          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39020$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39021        fi
39022        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39023      fi
39024    fi
39025
39026    # Now join together the path and the arguments once again
39027    if test "x$arguments" != xEOL; then
39028      new_complete="$new_path ${arguments% *}"
39029    else
39030      new_complete="$new_path"
39031    fi
39032
39033    if test "x$complete" != "x$new_complete"; then
39034      DUMPBIN="$new_complete"
39035      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39036$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39037    fi
39038  fi
39039
39040    # We need to check for 'msbuild.exe' because at the place where we expect to
39041    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39042    # won't find the 'msbuild.exe' executable in that case (and the
39043    # 'ac_executable_extensions' is unusable due to performance reasons).
39044    # Notice that we intentionally don't fix up the path to MSBUILD because we
39045    # will call it in a DOS shell during freetype detection on Windows (see
39046    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39047    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39048set dummy msbuild.exe; ac_word=$2
39049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39050$as_echo_n "checking for $ac_word... " >&6; }
39051if ${ac_cv_prog_MSBUILD+:} false; then :
39052  $as_echo_n "(cached) " >&6
39053else
39054  if test -n "$MSBUILD"; then
39055  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39056else
39057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39058for as_dir in $PATH
39059do
39060  IFS=$as_save_IFS
39061  test -z "$as_dir" && as_dir=.
39062    for ac_exec_ext in '' $ac_executable_extensions; do
39063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39064    ac_cv_prog_MSBUILD="msbuild.exe"
39065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39066    break 2
39067  fi
39068done
39069  done
39070IFS=$as_save_IFS
39071
39072fi
39073fi
39074MSBUILD=$ac_cv_prog_MSBUILD
39075if test -n "$MSBUILD"; then
39076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39077$as_echo "$MSBUILD" >&6; }
39078else
39079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39080$as_echo "no" >&6; }
39081fi
39082
39083
39084  fi
39085
39086  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39087
39088
39089  # Publish this variable in the help.
39090
39091
39092  if [ -z "${STRIP+x}" ]; then
39093    # The variable is not set by user, try to locate tool using the code snippet
39094    for ac_prog in strip
39095do
39096  # Extract the first word of "$ac_prog", so it can be a program name with args.
39097set dummy $ac_prog; ac_word=$2
39098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39099$as_echo_n "checking for $ac_word... " >&6; }
39100if ${ac_cv_path_STRIP+:} false; then :
39101  $as_echo_n "(cached) " >&6
39102else
39103  case $STRIP in
39104  [\\/]* | ?:[\\/]*)
39105  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39106  ;;
39107  *)
39108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39109for as_dir in $PATH
39110do
39111  IFS=$as_save_IFS
39112  test -z "$as_dir" && as_dir=.
39113    for ac_exec_ext in '' $ac_executable_extensions; do
39114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39115    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39117    break 2
39118  fi
39119done
39120  done
39121IFS=$as_save_IFS
39122
39123  ;;
39124esac
39125fi
39126STRIP=$ac_cv_path_STRIP
39127if test -n "$STRIP"; then
39128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39129$as_echo "$STRIP" >&6; }
39130else
39131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39132$as_echo "no" >&6; }
39133fi
39134
39135
39136  test -n "$STRIP" && break
39137done
39138
39139  else
39140    # The variable is set, but is it from the command line or the environment?
39141
39142    # Try to remove the string !STRIP! from our list.
39143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39145      # If it failed, the variable was not from the command line. Ignore it,
39146      # but warn the user (except for BASH, which is always set by the calling BASH).
39147      if test "xSTRIP" != xBASH; then
39148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39149$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39150      fi
39151      # Try to locate tool using the code snippet
39152      for ac_prog in strip
39153do
39154  # Extract the first word of "$ac_prog", so it can be a program name with args.
39155set dummy $ac_prog; ac_word=$2
39156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39157$as_echo_n "checking for $ac_word... " >&6; }
39158if ${ac_cv_path_STRIP+:} false; then :
39159  $as_echo_n "(cached) " >&6
39160else
39161  case $STRIP in
39162  [\\/]* | ?:[\\/]*)
39163  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39164  ;;
39165  *)
39166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39167for as_dir in $PATH
39168do
39169  IFS=$as_save_IFS
39170  test -z "$as_dir" && as_dir=.
39171    for ac_exec_ext in '' $ac_executable_extensions; do
39172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39173    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39175    break 2
39176  fi
39177done
39178  done
39179IFS=$as_save_IFS
39180
39181  ;;
39182esac
39183fi
39184STRIP=$ac_cv_path_STRIP
39185if test -n "$STRIP"; then
39186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39187$as_echo "$STRIP" >&6; }
39188else
39189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39190$as_echo "no" >&6; }
39191fi
39192
39193
39194  test -n "$STRIP" && break
39195done
39196
39197    else
39198      # If it succeeded, then it was overridden by the user. We will use it
39199      # for the tool.
39200
39201      # First remove it from the list of overridden variables, so we can test
39202      # for unknown variables in the end.
39203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39204
39205      # Check if we try to supply an empty value
39206      if test "x$STRIP" = x; then
39207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39208$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39210$as_echo_n "checking for STRIP... " >&6; }
39211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39212$as_echo "disabled" >&6; }
39213      else
39214        # Check if the provided tool contains a complete path.
39215        tool_specified="$STRIP"
39216        tool_basename="${tool_specified##*/}"
39217        if test "x$tool_basename" = "x$tool_specified"; then
39218          # A command without a complete path is provided, search $PATH.
39219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39220$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39221          # Extract the first word of "$tool_basename", so it can be a program name with args.
39222set dummy $tool_basename; ac_word=$2
39223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39224$as_echo_n "checking for $ac_word... " >&6; }
39225if ${ac_cv_path_STRIP+:} false; then :
39226  $as_echo_n "(cached) " >&6
39227else
39228  case $STRIP in
39229  [\\/]* | ?:[\\/]*)
39230  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39231  ;;
39232  *)
39233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39234for as_dir in $PATH
39235do
39236  IFS=$as_save_IFS
39237  test -z "$as_dir" && as_dir=.
39238    for ac_exec_ext in '' $ac_executable_extensions; do
39239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39240    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39242    break 2
39243  fi
39244done
39245  done
39246IFS=$as_save_IFS
39247
39248  ;;
39249esac
39250fi
39251STRIP=$ac_cv_path_STRIP
39252if test -n "$STRIP"; then
39253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39254$as_echo "$STRIP" >&6; }
39255else
39256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39257$as_echo "no" >&6; }
39258fi
39259
39260
39261          if test "x$STRIP" = x; then
39262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39263          fi
39264        else
39265          # Otherwise we believe it is a complete path. Use it as it is.
39266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39267$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39269$as_echo_n "checking for STRIP... " >&6; }
39270          if test ! -x "$tool_specified"; then
39271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39272$as_echo "not found" >&6; }
39273            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39274          fi
39275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39276$as_echo "$tool_specified" >&6; }
39277        fi
39278      fi
39279    fi
39280
39281  fi
39282
39283
39284
39285  # Only process if variable expands to non-empty
39286
39287  if test "x$STRIP" != x; then
39288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39289
39290  # First separate the path from the arguments. This will split at the first
39291  # space.
39292  complete="$STRIP"
39293  path="${complete%% *}"
39294  tmp="$complete EOL"
39295  arguments="${tmp#* }"
39296
39297  # Input might be given as Windows format, start by converting to
39298  # unix format.
39299  new_path=`$CYGPATH -u "$path"`
39300
39301  # Now try to locate executable using which
39302  new_path=`$WHICH "$new_path" 2> /dev/null`
39303  # bat and cmd files are not always considered executable in cygwin causing which
39304  # to not find them
39305  if test "x$new_path" = x \
39306      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39307      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39308    new_path=`$CYGPATH -u "$path"`
39309  fi
39310  if test "x$new_path" = x; then
39311    # Oops. Which didn't find the executable.
39312    # The splitting of arguments from the executable at a space might have been incorrect,
39313    # since paths with space are more likely in Windows. Give it another try with the whole
39314    # argument.
39315    path="$complete"
39316    arguments="EOL"
39317    new_path=`$CYGPATH -u "$path"`
39318    new_path=`$WHICH "$new_path" 2> /dev/null`
39319    # bat and cmd files are not always considered executable in cygwin causing which
39320    # to not find them
39321    if test "x$new_path" = x \
39322        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39323        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39324      new_path=`$CYGPATH -u "$path"`
39325    fi
39326    if test "x$new_path" = x; then
39327      # It's still not found. Now this is an unrecoverable error.
39328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39329$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39330      has_space=`$ECHO "$complete" | $GREP " "`
39331      if test "x$has_space" != x; then
39332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39334      fi
39335      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39336    fi
39337  fi
39338
39339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39342  # "foo.exe" is OK but "foo" is an error.
39343  #
39344  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39345  # It is also a way to make sure we got the proper file name for the real test later on.
39346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39347  if test "x$test_shortpath" = x; then
39348    # Short path failed, file does not exist as specified.
39349    # Try adding .exe or .cmd
39350    if test -f "${new_path}.exe"; then
39351      input_to_shortpath="${new_path}.exe"
39352    elif test -f "${new_path}.cmd"; then
39353      input_to_shortpath="${new_path}.cmd"
39354    else
39355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39356$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39357      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39358$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39359      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39360    fi
39361  else
39362    input_to_shortpath="$new_path"
39363  fi
39364
39365  # Call helper function which possibly converts this using DOS-style short mode.
39366  # If so, the updated path is stored in $new_path.
39367  new_path="$input_to_shortpath"
39368
39369  input_path="$input_to_shortpath"
39370  # Check if we need to convert this using DOS-style short mode. If the path
39371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39372  # take no chances and rewrite it.
39373  # Note: m4 eats our [], so we need to use [ and ] instead.
39374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39375  if test "x$has_forbidden_chars" != x; then
39376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39380      # Going to short mode and back again did indeed matter. Since short mode is
39381      # case insensitive, let's make it lowercase to improve readability.
39382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39383      # Now convert it back to Unix-style (cygpath)
39384      input_path=`$CYGPATH -u "$shortmode_path"`
39385      new_path="$input_path"
39386    fi
39387  fi
39388
39389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39390  if test "x$test_cygdrive_prefix" = x; then
39391    # As a simple fix, exclude /usr/bin since it's not a real path.
39392    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39394      # a path prefixed by /cygdrive for fixpath to work.
39395      new_path="$CYGWIN_ROOT_PATH$input_path"
39396    fi
39397  fi
39398
39399  # remove trailing .exe if any
39400  new_path="${new_path/%.exe/}"
39401
39402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39403
39404  # First separate the path from the arguments. This will split at the first
39405  # space.
39406  complete="$STRIP"
39407  path="${complete%% *}"
39408  tmp="$complete EOL"
39409  arguments="${tmp#* }"
39410
39411  # Input might be given as Windows format, start by converting to
39412  # unix format.
39413  new_path="$path"
39414
39415  windows_path="$new_path"
39416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39417    unix_path=`$CYGPATH -u "$windows_path"`
39418    new_path="$unix_path"
39419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39421    new_path="$unix_path"
39422  fi
39423
39424
39425  # Now try to locate executable using which
39426  new_path=`$WHICH "$new_path" 2> /dev/null`
39427
39428  if test "x$new_path" = x; then
39429    # Oops. Which didn't find the executable.
39430    # The splitting of arguments from the executable at a space might have been incorrect,
39431    # since paths with space are more likely in Windows. Give it another try with the whole
39432    # argument.
39433    path="$complete"
39434    arguments="EOL"
39435    new_path="$path"
39436
39437  windows_path="$new_path"
39438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39439    unix_path=`$CYGPATH -u "$windows_path"`
39440    new_path="$unix_path"
39441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39443    new_path="$unix_path"
39444  fi
39445
39446
39447    new_path=`$WHICH "$new_path" 2> /dev/null`
39448    # bat and cmd files are not always considered executable in MSYS causing which
39449    # to not find them
39450    if test "x$new_path" = x \
39451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39453      new_path="$path"
39454
39455  windows_path="$new_path"
39456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39457    unix_path=`$CYGPATH -u "$windows_path"`
39458    new_path="$unix_path"
39459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39461    new_path="$unix_path"
39462  fi
39463
39464    fi
39465
39466    if test "x$new_path" = x; then
39467      # It's still not found. Now this is an unrecoverable error.
39468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39469$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39470      has_space=`$ECHO "$complete" | $GREP " "`
39471      if test "x$has_space" != x; then
39472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39474      fi
39475      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39476    fi
39477  fi
39478
39479  # Now new_path has a complete unix path to the binary
39480  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39481    # Keep paths in /bin as-is, but remove trailing .exe if any
39482    new_path="${new_path/%.exe/}"
39483    # Do not save /bin paths to all_fixpath_prefixes!
39484  else
39485    # Not in mixed or Windows style, start by that.
39486    new_path=`cmd //c echo $new_path`
39487
39488  input_path="$new_path"
39489  # Check if we need to convert this using DOS-style short mode. If the path
39490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39491  # take no chances and rewrite it.
39492  # Note: m4 eats our [], so we need to use [ and ] instead.
39493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39494  if test "x$has_forbidden_chars" != x; then
39495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39497  fi
39498
39499    # Output is in $new_path
39500
39501  windows_path="$new_path"
39502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39503    unix_path=`$CYGPATH -u "$windows_path"`
39504    new_path="$unix_path"
39505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39507    new_path="$unix_path"
39508  fi
39509
39510    # remove trailing .exe if any
39511    new_path="${new_path/%.exe/}"
39512
39513    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39514    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39515  fi
39516
39517    else
39518      # We're on a unix platform. Hooray! :)
39519      # First separate the path from the arguments. This will split at the first
39520      # space.
39521      complete="$STRIP"
39522      path="${complete%% *}"
39523      tmp="$complete EOL"
39524      arguments="${tmp#* }"
39525
39526      # Cannot rely on the command "which" here since it doesn't always work.
39527      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39528      if test -z "$is_absolute_path"; then
39529        # Path to executable is not absolute. Find it.
39530        IFS_save="$IFS"
39531        IFS=:
39532        for p in $PATH; do
39533          if test -f "$p/$path" && test -x "$p/$path"; then
39534            new_path="$p/$path"
39535            break
39536          fi
39537        done
39538        IFS="$IFS_save"
39539      else
39540        # This is an absolute path, we can use it without further modifications.
39541        new_path="$path"
39542      fi
39543
39544      if test "x$new_path" = x; then
39545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39546$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39547        has_space=`$ECHO "$complete" | $GREP " "`
39548        if test "x$has_space" != x; then
39549          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39551        fi
39552        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39553      fi
39554    fi
39555
39556    # Now join together the path and the arguments once again
39557    if test "x$arguments" != xEOL; then
39558      new_complete="$new_path ${arguments% *}"
39559    else
39560      new_complete="$new_path"
39561    fi
39562
39563    if test "x$complete" != "x$new_complete"; then
39564      STRIP="$new_complete"
39565      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39566$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39567    fi
39568  fi
39569
39570
39571
39572  # Publish this variable in the help.
39573
39574
39575  if [ -z "${NM+x}" ]; then
39576    # The variable is not set by user, try to locate tool using the code snippet
39577    for ac_prog in nm
39578do
39579  # Extract the first word of "$ac_prog", so it can be a program name with args.
39580set dummy $ac_prog; ac_word=$2
39581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39582$as_echo_n "checking for $ac_word... " >&6; }
39583if ${ac_cv_path_NM+:} false; then :
39584  $as_echo_n "(cached) " >&6
39585else
39586  case $NM in
39587  [\\/]* | ?:[\\/]*)
39588  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39589  ;;
39590  *)
39591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39592for as_dir in $PATH
39593do
39594  IFS=$as_save_IFS
39595  test -z "$as_dir" && as_dir=.
39596    for ac_exec_ext in '' $ac_executable_extensions; do
39597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39598    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39600    break 2
39601  fi
39602done
39603  done
39604IFS=$as_save_IFS
39605
39606  ;;
39607esac
39608fi
39609NM=$ac_cv_path_NM
39610if test -n "$NM"; then
39611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39612$as_echo "$NM" >&6; }
39613else
39614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39615$as_echo "no" >&6; }
39616fi
39617
39618
39619  test -n "$NM" && break
39620done
39621
39622  else
39623    # The variable is set, but is it from the command line or the environment?
39624
39625    # Try to remove the string !NM! from our list.
39626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39628      # If it failed, the variable was not from the command line. Ignore it,
39629      # but warn the user (except for BASH, which is always set by the calling BASH).
39630      if test "xNM" != xBASH; then
39631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39632$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39633      fi
39634      # Try to locate tool using the code snippet
39635      for ac_prog in nm
39636do
39637  # Extract the first word of "$ac_prog", so it can be a program name with args.
39638set dummy $ac_prog; ac_word=$2
39639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39640$as_echo_n "checking for $ac_word... " >&6; }
39641if ${ac_cv_path_NM+:} false; then :
39642  $as_echo_n "(cached) " >&6
39643else
39644  case $NM in
39645  [\\/]* | ?:[\\/]*)
39646  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39647  ;;
39648  *)
39649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39650for as_dir in $PATH
39651do
39652  IFS=$as_save_IFS
39653  test -z "$as_dir" && as_dir=.
39654    for ac_exec_ext in '' $ac_executable_extensions; do
39655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39656    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39658    break 2
39659  fi
39660done
39661  done
39662IFS=$as_save_IFS
39663
39664  ;;
39665esac
39666fi
39667NM=$ac_cv_path_NM
39668if test -n "$NM"; then
39669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39670$as_echo "$NM" >&6; }
39671else
39672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39673$as_echo "no" >&6; }
39674fi
39675
39676
39677  test -n "$NM" && break
39678done
39679
39680    else
39681      # If it succeeded, then it was overridden by the user. We will use it
39682      # for the tool.
39683
39684      # First remove it from the list of overridden variables, so we can test
39685      # for unknown variables in the end.
39686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39687
39688      # Check if we try to supply an empty value
39689      if test "x$NM" = x; then
39690        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39691$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39692        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39693$as_echo_n "checking for NM... " >&6; }
39694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39695$as_echo "disabled" >&6; }
39696      else
39697        # Check if the provided tool contains a complete path.
39698        tool_specified="$NM"
39699        tool_basename="${tool_specified##*/}"
39700        if test "x$tool_basename" = "x$tool_specified"; then
39701          # A command without a complete path is provided, search $PATH.
39702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39703$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39704          # Extract the first word of "$tool_basename", so it can be a program name with args.
39705set dummy $tool_basename; ac_word=$2
39706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39707$as_echo_n "checking for $ac_word... " >&6; }
39708if ${ac_cv_path_NM+:} false; then :
39709  $as_echo_n "(cached) " >&6
39710else
39711  case $NM in
39712  [\\/]* | ?:[\\/]*)
39713  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39714  ;;
39715  *)
39716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39717for as_dir in $PATH
39718do
39719  IFS=$as_save_IFS
39720  test -z "$as_dir" && as_dir=.
39721    for ac_exec_ext in '' $ac_executable_extensions; do
39722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39723    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39725    break 2
39726  fi
39727done
39728  done
39729IFS=$as_save_IFS
39730
39731  ;;
39732esac
39733fi
39734NM=$ac_cv_path_NM
39735if test -n "$NM"; then
39736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39737$as_echo "$NM" >&6; }
39738else
39739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39740$as_echo "no" >&6; }
39741fi
39742
39743
39744          if test "x$NM" = x; then
39745            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39746          fi
39747        else
39748          # Otherwise we believe it is a complete path. Use it as it is.
39749          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39750$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39751          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39752$as_echo_n "checking for NM... " >&6; }
39753          if test ! -x "$tool_specified"; then
39754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39755$as_echo "not found" >&6; }
39756            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39757          fi
39758          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39759$as_echo "$tool_specified" >&6; }
39760        fi
39761      fi
39762    fi
39763
39764  fi
39765
39766
39767
39768  # Only process if variable expands to non-empty
39769
39770  if test "x$NM" != x; then
39771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39772
39773  # First separate the path from the arguments. This will split at the first
39774  # space.
39775  complete="$NM"
39776  path="${complete%% *}"
39777  tmp="$complete EOL"
39778  arguments="${tmp#* }"
39779
39780  # Input might be given as Windows format, start by converting to
39781  # unix format.
39782  new_path=`$CYGPATH -u "$path"`
39783
39784  # Now try to locate executable using which
39785  new_path=`$WHICH "$new_path" 2> /dev/null`
39786  # bat and cmd files are not always considered executable in cygwin causing which
39787  # to not find them
39788  if test "x$new_path" = x \
39789      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39790      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39791    new_path=`$CYGPATH -u "$path"`
39792  fi
39793  if test "x$new_path" = x; then
39794    # Oops. Which didn't find the executable.
39795    # The splitting of arguments from the executable at a space might have been incorrect,
39796    # since paths with space are more likely in Windows. Give it another try with the whole
39797    # argument.
39798    path="$complete"
39799    arguments="EOL"
39800    new_path=`$CYGPATH -u "$path"`
39801    new_path=`$WHICH "$new_path" 2> /dev/null`
39802    # bat and cmd files are not always considered executable in cygwin causing which
39803    # to not find them
39804    if test "x$new_path" = x \
39805        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39806        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39807      new_path=`$CYGPATH -u "$path"`
39808    fi
39809    if test "x$new_path" = x; then
39810      # It's still not found. Now this is an unrecoverable error.
39811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39812$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39813      has_space=`$ECHO "$complete" | $GREP " "`
39814      if test "x$has_space" != x; then
39815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39817      fi
39818      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39819    fi
39820  fi
39821
39822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39825  # "foo.exe" is OK but "foo" is an error.
39826  #
39827  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39828  # It is also a way to make sure we got the proper file name for the real test later on.
39829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39830  if test "x$test_shortpath" = x; then
39831    # Short path failed, file does not exist as specified.
39832    # Try adding .exe or .cmd
39833    if test -f "${new_path}.exe"; then
39834      input_to_shortpath="${new_path}.exe"
39835    elif test -f "${new_path}.cmd"; then
39836      input_to_shortpath="${new_path}.cmd"
39837    else
39838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39839$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39840      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39841$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39842      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39843    fi
39844  else
39845    input_to_shortpath="$new_path"
39846  fi
39847
39848  # Call helper function which possibly converts this using DOS-style short mode.
39849  # If so, the updated path is stored in $new_path.
39850  new_path="$input_to_shortpath"
39851
39852  input_path="$input_to_shortpath"
39853  # Check if we need to convert this using DOS-style short mode. If the path
39854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39855  # take no chances and rewrite it.
39856  # Note: m4 eats our [], so we need to use [ and ] instead.
39857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39858  if test "x$has_forbidden_chars" != x; then
39859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39863      # Going to short mode and back again did indeed matter. Since short mode is
39864      # case insensitive, let's make it lowercase to improve readability.
39865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39866      # Now convert it back to Unix-style (cygpath)
39867      input_path=`$CYGPATH -u "$shortmode_path"`
39868      new_path="$input_path"
39869    fi
39870  fi
39871
39872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39873  if test "x$test_cygdrive_prefix" = x; then
39874    # As a simple fix, exclude /usr/bin since it's not a real path.
39875    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39877      # a path prefixed by /cygdrive for fixpath to work.
39878      new_path="$CYGWIN_ROOT_PATH$input_path"
39879    fi
39880  fi
39881
39882  # remove trailing .exe if any
39883  new_path="${new_path/%.exe/}"
39884
39885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39886
39887  # First separate the path from the arguments. This will split at the first
39888  # space.
39889  complete="$NM"
39890  path="${complete%% *}"
39891  tmp="$complete EOL"
39892  arguments="${tmp#* }"
39893
39894  # Input might be given as Windows format, start by converting to
39895  # unix format.
39896  new_path="$path"
39897
39898  windows_path="$new_path"
39899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39900    unix_path=`$CYGPATH -u "$windows_path"`
39901    new_path="$unix_path"
39902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39904    new_path="$unix_path"
39905  fi
39906
39907
39908  # Now try to locate executable using which
39909  new_path=`$WHICH "$new_path" 2> /dev/null`
39910
39911  if test "x$new_path" = x; then
39912    # Oops. Which didn't find the executable.
39913    # The splitting of arguments from the executable at a space might have been incorrect,
39914    # since paths with space are more likely in Windows. Give it another try with the whole
39915    # argument.
39916    path="$complete"
39917    arguments="EOL"
39918    new_path="$path"
39919
39920  windows_path="$new_path"
39921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39922    unix_path=`$CYGPATH -u "$windows_path"`
39923    new_path="$unix_path"
39924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39926    new_path="$unix_path"
39927  fi
39928
39929
39930    new_path=`$WHICH "$new_path" 2> /dev/null`
39931    # bat and cmd files are not always considered executable in MSYS causing which
39932    # to not find them
39933    if test "x$new_path" = x \
39934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39936      new_path="$path"
39937
39938  windows_path="$new_path"
39939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39940    unix_path=`$CYGPATH -u "$windows_path"`
39941    new_path="$unix_path"
39942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39944    new_path="$unix_path"
39945  fi
39946
39947    fi
39948
39949    if test "x$new_path" = x; then
39950      # It's still not found. Now this is an unrecoverable error.
39951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39952$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39953      has_space=`$ECHO "$complete" | $GREP " "`
39954      if test "x$has_space" != x; then
39955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39957      fi
39958      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39959    fi
39960  fi
39961
39962  # Now new_path has a complete unix path to the binary
39963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39964    # Keep paths in /bin as-is, but remove trailing .exe if any
39965    new_path="${new_path/%.exe/}"
39966    # Do not save /bin paths to all_fixpath_prefixes!
39967  else
39968    # Not in mixed or Windows style, start by that.
39969    new_path=`cmd //c echo $new_path`
39970
39971  input_path="$new_path"
39972  # Check if we need to convert this using DOS-style short mode. If the path
39973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39974  # take no chances and rewrite it.
39975  # Note: m4 eats our [], so we need to use [ and ] instead.
39976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39977  if test "x$has_forbidden_chars" != x; then
39978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39980  fi
39981
39982    # Output is in $new_path
39983
39984  windows_path="$new_path"
39985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39986    unix_path=`$CYGPATH -u "$windows_path"`
39987    new_path="$unix_path"
39988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39990    new_path="$unix_path"
39991  fi
39992
39993    # remove trailing .exe if any
39994    new_path="${new_path/%.exe/}"
39995
39996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39998  fi
39999
40000    else
40001      # We're on a unix platform. Hooray! :)
40002      # First separate the path from the arguments. This will split at the first
40003      # space.
40004      complete="$NM"
40005      path="${complete%% *}"
40006      tmp="$complete EOL"
40007      arguments="${tmp#* }"
40008
40009      # Cannot rely on the command "which" here since it doesn't always work.
40010      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40011      if test -z "$is_absolute_path"; then
40012        # Path to executable is not absolute. Find it.
40013        IFS_save="$IFS"
40014        IFS=:
40015        for p in $PATH; do
40016          if test -f "$p/$path" && test -x "$p/$path"; then
40017            new_path="$p/$path"
40018            break
40019          fi
40020        done
40021        IFS="$IFS_save"
40022      else
40023        # This is an absolute path, we can use it without further modifications.
40024        new_path="$path"
40025      fi
40026
40027      if test "x$new_path" = x; then
40028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40029$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40030        has_space=`$ECHO "$complete" | $GREP " "`
40031        if test "x$has_space" != x; then
40032          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40033$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40034        fi
40035        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40036      fi
40037    fi
40038
40039    # Now join together the path and the arguments once again
40040    if test "x$arguments" != xEOL; then
40041      new_complete="$new_path ${arguments% *}"
40042    else
40043      new_complete="$new_path"
40044    fi
40045
40046    if test "x$complete" != "x$new_complete"; then
40047      NM="$new_complete"
40048      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40049$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40050    fi
40051  fi
40052
40053
40054
40055  # Publish this variable in the help.
40056
40057
40058  if [ -z "${GNM+x}" ]; then
40059    # The variable is not set by user, try to locate tool using the code snippet
40060    for ac_prog in gnm
40061do
40062  # Extract the first word of "$ac_prog", so it can be a program name with args.
40063set dummy $ac_prog; ac_word=$2
40064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40065$as_echo_n "checking for $ac_word... " >&6; }
40066if ${ac_cv_path_GNM+:} false; then :
40067  $as_echo_n "(cached) " >&6
40068else
40069  case $GNM in
40070  [\\/]* | ?:[\\/]*)
40071  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40072  ;;
40073  *)
40074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40075for as_dir in $PATH
40076do
40077  IFS=$as_save_IFS
40078  test -z "$as_dir" && as_dir=.
40079    for ac_exec_ext in '' $ac_executable_extensions; do
40080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40081    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40083    break 2
40084  fi
40085done
40086  done
40087IFS=$as_save_IFS
40088
40089  ;;
40090esac
40091fi
40092GNM=$ac_cv_path_GNM
40093if test -n "$GNM"; then
40094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40095$as_echo "$GNM" >&6; }
40096else
40097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40098$as_echo "no" >&6; }
40099fi
40100
40101
40102  test -n "$GNM" && break
40103done
40104
40105  else
40106    # The variable is set, but is it from the command line or the environment?
40107
40108    # Try to remove the string !GNM! from our list.
40109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40111      # If it failed, the variable was not from the command line. Ignore it,
40112      # but warn the user (except for BASH, which is always set by the calling BASH).
40113      if test "xGNM" != xBASH; then
40114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40115$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40116      fi
40117      # Try to locate tool using the code snippet
40118      for ac_prog in gnm
40119do
40120  # Extract the first word of "$ac_prog", so it can be a program name with args.
40121set dummy $ac_prog; ac_word=$2
40122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40123$as_echo_n "checking for $ac_word... " >&6; }
40124if ${ac_cv_path_GNM+:} false; then :
40125  $as_echo_n "(cached) " >&6
40126else
40127  case $GNM in
40128  [\\/]* | ?:[\\/]*)
40129  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40130  ;;
40131  *)
40132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40133for as_dir in $PATH
40134do
40135  IFS=$as_save_IFS
40136  test -z "$as_dir" && as_dir=.
40137    for ac_exec_ext in '' $ac_executable_extensions; do
40138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40139    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40141    break 2
40142  fi
40143done
40144  done
40145IFS=$as_save_IFS
40146
40147  ;;
40148esac
40149fi
40150GNM=$ac_cv_path_GNM
40151if test -n "$GNM"; then
40152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40153$as_echo "$GNM" >&6; }
40154else
40155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40156$as_echo "no" >&6; }
40157fi
40158
40159
40160  test -n "$GNM" && break
40161done
40162
40163    else
40164      # If it succeeded, then it was overridden by the user. We will use it
40165      # for the tool.
40166
40167      # First remove it from the list of overridden variables, so we can test
40168      # for unknown variables in the end.
40169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40170
40171      # Check if we try to supply an empty value
40172      if test "x$GNM" = x; then
40173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40174$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40176$as_echo_n "checking for GNM... " >&6; }
40177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40178$as_echo "disabled" >&6; }
40179      else
40180        # Check if the provided tool contains a complete path.
40181        tool_specified="$GNM"
40182        tool_basename="${tool_specified##*/}"
40183        if test "x$tool_basename" = "x$tool_specified"; then
40184          # A command without a complete path is provided, search $PATH.
40185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40186$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40187          # Extract the first word of "$tool_basename", so it can be a program name with args.
40188set dummy $tool_basename; ac_word=$2
40189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40190$as_echo_n "checking for $ac_word... " >&6; }
40191if ${ac_cv_path_GNM+:} false; then :
40192  $as_echo_n "(cached) " >&6
40193else
40194  case $GNM in
40195  [\\/]* | ?:[\\/]*)
40196  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40197  ;;
40198  *)
40199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40200for as_dir in $PATH
40201do
40202  IFS=$as_save_IFS
40203  test -z "$as_dir" && as_dir=.
40204    for ac_exec_ext in '' $ac_executable_extensions; do
40205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40206    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40208    break 2
40209  fi
40210done
40211  done
40212IFS=$as_save_IFS
40213
40214  ;;
40215esac
40216fi
40217GNM=$ac_cv_path_GNM
40218if test -n "$GNM"; then
40219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40220$as_echo "$GNM" >&6; }
40221else
40222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40223$as_echo "no" >&6; }
40224fi
40225
40226
40227          if test "x$GNM" = x; then
40228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40229          fi
40230        else
40231          # Otherwise we believe it is a complete path. Use it as it is.
40232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40233$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40235$as_echo_n "checking for GNM... " >&6; }
40236          if test ! -x "$tool_specified"; then
40237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40238$as_echo "not found" >&6; }
40239            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40240          fi
40241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40242$as_echo "$tool_specified" >&6; }
40243        fi
40244      fi
40245    fi
40246
40247  fi
40248
40249
40250
40251  # Only process if variable expands to non-empty
40252
40253  if test "x$GNM" != x; then
40254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40255
40256  # First separate the path from the arguments. This will split at the first
40257  # space.
40258  complete="$GNM"
40259  path="${complete%% *}"
40260  tmp="$complete EOL"
40261  arguments="${tmp#* }"
40262
40263  # Input might be given as Windows format, start by converting to
40264  # unix format.
40265  new_path=`$CYGPATH -u "$path"`
40266
40267  # Now try to locate executable using which
40268  new_path=`$WHICH "$new_path" 2> /dev/null`
40269  # bat and cmd files are not always considered executable in cygwin causing which
40270  # to not find them
40271  if test "x$new_path" = x \
40272      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40273      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40274    new_path=`$CYGPATH -u "$path"`
40275  fi
40276  if test "x$new_path" = x; then
40277    # Oops. Which didn't find the executable.
40278    # The splitting of arguments from the executable at a space might have been incorrect,
40279    # since paths with space are more likely in Windows. Give it another try with the whole
40280    # argument.
40281    path="$complete"
40282    arguments="EOL"
40283    new_path=`$CYGPATH -u "$path"`
40284    new_path=`$WHICH "$new_path" 2> /dev/null`
40285    # bat and cmd files are not always considered executable in cygwin causing which
40286    # to not find them
40287    if test "x$new_path" = x \
40288        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40289        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40290      new_path=`$CYGPATH -u "$path"`
40291    fi
40292    if test "x$new_path" = x; then
40293      # It's still not found. Now this is an unrecoverable error.
40294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40295$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40296      has_space=`$ECHO "$complete" | $GREP " "`
40297      if test "x$has_space" != x; then
40298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40300      fi
40301      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40302    fi
40303  fi
40304
40305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40308  # "foo.exe" is OK but "foo" is an error.
40309  #
40310  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40311  # It is also a way to make sure we got the proper file name for the real test later on.
40312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40313  if test "x$test_shortpath" = x; then
40314    # Short path failed, file does not exist as specified.
40315    # Try adding .exe or .cmd
40316    if test -f "${new_path}.exe"; then
40317      input_to_shortpath="${new_path}.exe"
40318    elif test -f "${new_path}.cmd"; then
40319      input_to_shortpath="${new_path}.cmd"
40320    else
40321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40322$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40323      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40324$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40325      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40326    fi
40327  else
40328    input_to_shortpath="$new_path"
40329  fi
40330
40331  # Call helper function which possibly converts this using DOS-style short mode.
40332  # If so, the updated path is stored in $new_path.
40333  new_path="$input_to_shortpath"
40334
40335  input_path="$input_to_shortpath"
40336  # Check if we need to convert this using DOS-style short mode. If the path
40337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40338  # take no chances and rewrite it.
40339  # Note: m4 eats our [], so we need to use [ and ] instead.
40340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40341  if test "x$has_forbidden_chars" != x; then
40342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40346      # Going to short mode and back again did indeed matter. Since short mode is
40347      # case insensitive, let's make it lowercase to improve readability.
40348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40349      # Now convert it back to Unix-style (cygpath)
40350      input_path=`$CYGPATH -u "$shortmode_path"`
40351      new_path="$input_path"
40352    fi
40353  fi
40354
40355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40356  if test "x$test_cygdrive_prefix" = x; then
40357    # As a simple fix, exclude /usr/bin since it's not a real path.
40358    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40360      # a path prefixed by /cygdrive for fixpath to work.
40361      new_path="$CYGWIN_ROOT_PATH$input_path"
40362    fi
40363  fi
40364
40365  # remove trailing .exe if any
40366  new_path="${new_path/%.exe/}"
40367
40368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40369
40370  # First separate the path from the arguments. This will split at the first
40371  # space.
40372  complete="$GNM"
40373  path="${complete%% *}"
40374  tmp="$complete EOL"
40375  arguments="${tmp#* }"
40376
40377  # Input might be given as Windows format, start by converting to
40378  # unix format.
40379  new_path="$path"
40380
40381  windows_path="$new_path"
40382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40383    unix_path=`$CYGPATH -u "$windows_path"`
40384    new_path="$unix_path"
40385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40387    new_path="$unix_path"
40388  fi
40389
40390
40391  # Now try to locate executable using which
40392  new_path=`$WHICH "$new_path" 2> /dev/null`
40393
40394  if test "x$new_path" = x; then
40395    # Oops. Which didn't find the executable.
40396    # The splitting of arguments from the executable at a space might have been incorrect,
40397    # since paths with space are more likely in Windows. Give it another try with the whole
40398    # argument.
40399    path="$complete"
40400    arguments="EOL"
40401    new_path="$path"
40402
40403  windows_path="$new_path"
40404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40405    unix_path=`$CYGPATH -u "$windows_path"`
40406    new_path="$unix_path"
40407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40409    new_path="$unix_path"
40410  fi
40411
40412
40413    new_path=`$WHICH "$new_path" 2> /dev/null`
40414    # bat and cmd files are not always considered executable in MSYS causing which
40415    # to not find them
40416    if test "x$new_path" = x \
40417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40419      new_path="$path"
40420
40421  windows_path="$new_path"
40422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40423    unix_path=`$CYGPATH -u "$windows_path"`
40424    new_path="$unix_path"
40425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40427    new_path="$unix_path"
40428  fi
40429
40430    fi
40431
40432    if test "x$new_path" = x; then
40433      # It's still not found. Now this is an unrecoverable error.
40434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40435$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40436      has_space=`$ECHO "$complete" | $GREP " "`
40437      if test "x$has_space" != x; then
40438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40440      fi
40441      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40442    fi
40443  fi
40444
40445  # Now new_path has a complete unix path to the binary
40446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40447    # Keep paths in /bin as-is, but remove trailing .exe if any
40448    new_path="${new_path/%.exe/}"
40449    # Do not save /bin paths to all_fixpath_prefixes!
40450  else
40451    # Not in mixed or Windows style, start by that.
40452    new_path=`cmd //c echo $new_path`
40453
40454  input_path="$new_path"
40455  # Check if we need to convert this using DOS-style short mode. If the path
40456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40457  # take no chances and rewrite it.
40458  # Note: m4 eats our [], so we need to use [ and ] instead.
40459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40460  if test "x$has_forbidden_chars" != x; then
40461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40463  fi
40464
40465    # Output is in $new_path
40466
40467  windows_path="$new_path"
40468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40469    unix_path=`$CYGPATH -u "$windows_path"`
40470    new_path="$unix_path"
40471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40473    new_path="$unix_path"
40474  fi
40475
40476    # remove trailing .exe if any
40477    new_path="${new_path/%.exe/}"
40478
40479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40481  fi
40482
40483    else
40484      # We're on a unix platform. Hooray! :)
40485      # First separate the path from the arguments. This will split at the first
40486      # space.
40487      complete="$GNM"
40488      path="${complete%% *}"
40489      tmp="$complete EOL"
40490      arguments="${tmp#* }"
40491
40492      # Cannot rely on the command "which" here since it doesn't always work.
40493      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40494      if test -z "$is_absolute_path"; then
40495        # Path to executable is not absolute. Find it.
40496        IFS_save="$IFS"
40497        IFS=:
40498        for p in $PATH; do
40499          if test -f "$p/$path" && test -x "$p/$path"; then
40500            new_path="$p/$path"
40501            break
40502          fi
40503        done
40504        IFS="$IFS_save"
40505      else
40506        # This is an absolute path, we can use it without further modifications.
40507        new_path="$path"
40508      fi
40509
40510      if test "x$new_path" = x; then
40511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40512$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40513        has_space=`$ECHO "$complete" | $GREP " "`
40514        if test "x$has_space" != x; then
40515          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40516$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40517        fi
40518        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40519      fi
40520    fi
40521
40522    # Now join together the path and the arguments once again
40523    if test "x$arguments" != xEOL; then
40524      new_complete="$new_path ${arguments% *}"
40525    else
40526      new_complete="$new_path"
40527    fi
40528
40529    if test "x$complete" != "x$new_complete"; then
40530      GNM="$new_complete"
40531      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40532$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40533    fi
40534  fi
40535
40536  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40537    # FIXME: we should unify this with the solaris case above.
40538
40539
40540  # Publish this variable in the help.
40541
40542
40543  if [ -z "${STRIP+x}" ]; then
40544    # The variable is not set by user, try to locate tool using the code snippet
40545    if test -n "$ac_tool_prefix"; then
40546  for ac_prog in strip
40547  do
40548    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40549set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40551$as_echo_n "checking for $ac_word... " >&6; }
40552if ${ac_cv_prog_STRIP+:} false; then :
40553  $as_echo_n "(cached) " >&6
40554else
40555  if test -n "$STRIP"; then
40556  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40557else
40558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40559for as_dir in $PATH
40560do
40561  IFS=$as_save_IFS
40562  test -z "$as_dir" && as_dir=.
40563    for ac_exec_ext in '' $ac_executable_extensions; do
40564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40565    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40567    break 2
40568  fi
40569done
40570  done
40571IFS=$as_save_IFS
40572
40573fi
40574fi
40575STRIP=$ac_cv_prog_STRIP
40576if test -n "$STRIP"; then
40577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40578$as_echo "$STRIP" >&6; }
40579else
40580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40581$as_echo "no" >&6; }
40582fi
40583
40584
40585    test -n "$STRIP" && break
40586  done
40587fi
40588if test -z "$STRIP"; then
40589  ac_ct_STRIP=$STRIP
40590  for ac_prog in strip
40591do
40592  # Extract the first word of "$ac_prog", so it can be a program name with args.
40593set dummy $ac_prog; ac_word=$2
40594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40595$as_echo_n "checking for $ac_word... " >&6; }
40596if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40597  $as_echo_n "(cached) " >&6
40598else
40599  if test -n "$ac_ct_STRIP"; then
40600  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40601else
40602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40603for as_dir in $PATH
40604do
40605  IFS=$as_save_IFS
40606  test -z "$as_dir" && as_dir=.
40607    for ac_exec_ext in '' $ac_executable_extensions; do
40608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40609    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40611    break 2
40612  fi
40613done
40614  done
40615IFS=$as_save_IFS
40616
40617fi
40618fi
40619ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40620if test -n "$ac_ct_STRIP"; then
40621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40622$as_echo "$ac_ct_STRIP" >&6; }
40623else
40624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40625$as_echo "no" >&6; }
40626fi
40627
40628
40629  test -n "$ac_ct_STRIP" && break
40630done
40631
40632  if test "x$ac_ct_STRIP" = x; then
40633    STRIP=""
40634  else
40635    case $cross_compiling:$ac_tool_warned in
40636yes:)
40637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40639ac_tool_warned=yes ;;
40640esac
40641    STRIP=$ac_ct_STRIP
40642  fi
40643fi
40644
40645  else
40646    # The variable is set, but is it from the command line or the environment?
40647
40648    # Try to remove the string !STRIP! from our list.
40649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40651      # If it failed, the variable was not from the command line. Ignore it,
40652      # but warn the user (except for BASH, which is always set by the calling BASH).
40653      if test "xSTRIP" != xBASH; then
40654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40655$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40656      fi
40657      # Try to locate tool using the code snippet
40658      if test -n "$ac_tool_prefix"; then
40659  for ac_prog in strip
40660  do
40661    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40662set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40664$as_echo_n "checking for $ac_word... " >&6; }
40665if ${ac_cv_prog_STRIP+:} false; then :
40666  $as_echo_n "(cached) " >&6
40667else
40668  if test -n "$STRIP"; then
40669  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40670else
40671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40672for as_dir in $PATH
40673do
40674  IFS=$as_save_IFS
40675  test -z "$as_dir" && as_dir=.
40676    for ac_exec_ext in '' $ac_executable_extensions; do
40677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40678    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40680    break 2
40681  fi
40682done
40683  done
40684IFS=$as_save_IFS
40685
40686fi
40687fi
40688STRIP=$ac_cv_prog_STRIP
40689if test -n "$STRIP"; then
40690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40691$as_echo "$STRIP" >&6; }
40692else
40693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40694$as_echo "no" >&6; }
40695fi
40696
40697
40698    test -n "$STRIP" && break
40699  done
40700fi
40701if test -z "$STRIP"; then
40702  ac_ct_STRIP=$STRIP
40703  for ac_prog in strip
40704do
40705  # Extract the first word of "$ac_prog", so it can be a program name with args.
40706set dummy $ac_prog; ac_word=$2
40707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40708$as_echo_n "checking for $ac_word... " >&6; }
40709if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40710  $as_echo_n "(cached) " >&6
40711else
40712  if test -n "$ac_ct_STRIP"; then
40713  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40714else
40715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40716for as_dir in $PATH
40717do
40718  IFS=$as_save_IFS
40719  test -z "$as_dir" && as_dir=.
40720    for ac_exec_ext in '' $ac_executable_extensions; do
40721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40722    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40724    break 2
40725  fi
40726done
40727  done
40728IFS=$as_save_IFS
40729
40730fi
40731fi
40732ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40733if test -n "$ac_ct_STRIP"; then
40734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40735$as_echo "$ac_ct_STRIP" >&6; }
40736else
40737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40738$as_echo "no" >&6; }
40739fi
40740
40741
40742  test -n "$ac_ct_STRIP" && break
40743done
40744
40745  if test "x$ac_ct_STRIP" = x; then
40746    STRIP=""
40747  else
40748    case $cross_compiling:$ac_tool_warned in
40749yes:)
40750{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40751$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40752ac_tool_warned=yes ;;
40753esac
40754    STRIP=$ac_ct_STRIP
40755  fi
40756fi
40757
40758    else
40759      # If it succeeded, then it was overridden by the user. We will use it
40760      # for the tool.
40761
40762      # First remove it from the list of overridden variables, so we can test
40763      # for unknown variables in the end.
40764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40765
40766      # Check if we try to supply an empty value
40767      if test "x$STRIP" = x; then
40768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40769$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40771$as_echo_n "checking for STRIP... " >&6; }
40772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40773$as_echo "disabled" >&6; }
40774      else
40775        # Check if the provided tool contains a complete path.
40776        tool_specified="$STRIP"
40777        tool_basename="${tool_specified##*/}"
40778        if test "x$tool_basename" = "x$tool_specified"; then
40779          # A command without a complete path is provided, search $PATH.
40780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40781$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40782          # Extract the first word of "$tool_basename", so it can be a program name with args.
40783set dummy $tool_basename; ac_word=$2
40784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40785$as_echo_n "checking for $ac_word... " >&6; }
40786if ${ac_cv_path_STRIP+:} false; then :
40787  $as_echo_n "(cached) " >&6
40788else
40789  case $STRIP in
40790  [\\/]* | ?:[\\/]*)
40791  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40792  ;;
40793  *)
40794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40795for as_dir in $PATH
40796do
40797  IFS=$as_save_IFS
40798  test -z "$as_dir" && as_dir=.
40799    for ac_exec_ext in '' $ac_executable_extensions; do
40800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40801    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40803    break 2
40804  fi
40805done
40806  done
40807IFS=$as_save_IFS
40808
40809  ;;
40810esac
40811fi
40812STRIP=$ac_cv_path_STRIP
40813if test -n "$STRIP"; then
40814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40815$as_echo "$STRIP" >&6; }
40816else
40817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40818$as_echo "no" >&6; }
40819fi
40820
40821
40822          if test "x$STRIP" = x; then
40823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40824          fi
40825        else
40826          # Otherwise we believe it is a complete path. Use it as it is.
40827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40828$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40830$as_echo_n "checking for STRIP... " >&6; }
40831          if test ! -x "$tool_specified"; then
40832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40833$as_echo "not found" >&6; }
40834            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40835          fi
40836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40837$as_echo "$tool_specified" >&6; }
40838        fi
40839      fi
40840    fi
40841
40842  fi
40843
40844
40845
40846  # Only process if variable expands to non-empty
40847
40848  if test "x$STRIP" != x; then
40849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40850
40851  # First separate the path from the arguments. This will split at the first
40852  # space.
40853  complete="$STRIP"
40854  path="${complete%% *}"
40855  tmp="$complete EOL"
40856  arguments="${tmp#* }"
40857
40858  # Input might be given as Windows format, start by converting to
40859  # unix format.
40860  new_path=`$CYGPATH -u "$path"`
40861
40862  # Now try to locate executable using which
40863  new_path=`$WHICH "$new_path" 2> /dev/null`
40864  # bat and cmd files are not always considered executable in cygwin causing which
40865  # to not find them
40866  if test "x$new_path" = x \
40867      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40868      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40869    new_path=`$CYGPATH -u "$path"`
40870  fi
40871  if test "x$new_path" = x; then
40872    # Oops. Which didn't find the executable.
40873    # The splitting of arguments from the executable at a space might have been incorrect,
40874    # since paths with space are more likely in Windows. Give it another try with the whole
40875    # argument.
40876    path="$complete"
40877    arguments="EOL"
40878    new_path=`$CYGPATH -u "$path"`
40879    new_path=`$WHICH "$new_path" 2> /dev/null`
40880    # bat and cmd files are not always considered executable in cygwin causing which
40881    # to not find them
40882    if test "x$new_path" = x \
40883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40885      new_path=`$CYGPATH -u "$path"`
40886    fi
40887    if test "x$new_path" = x; then
40888      # It's still not found. Now this is an unrecoverable error.
40889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40890$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40891      has_space=`$ECHO "$complete" | $GREP " "`
40892      if test "x$has_space" != x; then
40893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40895      fi
40896      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40897    fi
40898  fi
40899
40900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40903  # "foo.exe" is OK but "foo" is an error.
40904  #
40905  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40906  # It is also a way to make sure we got the proper file name for the real test later on.
40907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40908  if test "x$test_shortpath" = x; then
40909    # Short path failed, file does not exist as specified.
40910    # Try adding .exe or .cmd
40911    if test -f "${new_path}.exe"; then
40912      input_to_shortpath="${new_path}.exe"
40913    elif test -f "${new_path}.cmd"; then
40914      input_to_shortpath="${new_path}.cmd"
40915    else
40916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40917$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40918      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40919$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40920      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40921    fi
40922  else
40923    input_to_shortpath="$new_path"
40924  fi
40925
40926  # Call helper function which possibly converts this using DOS-style short mode.
40927  # If so, the updated path is stored in $new_path.
40928  new_path="$input_to_shortpath"
40929
40930  input_path="$input_to_shortpath"
40931  # Check if we need to convert this using DOS-style short mode. If the path
40932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40933  # take no chances and rewrite it.
40934  # Note: m4 eats our [], so we need to use [ and ] instead.
40935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40936  if test "x$has_forbidden_chars" != x; then
40937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40941      # Going to short mode and back again did indeed matter. Since short mode is
40942      # case insensitive, let's make it lowercase to improve readability.
40943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40944      # Now convert it back to Unix-style (cygpath)
40945      input_path=`$CYGPATH -u "$shortmode_path"`
40946      new_path="$input_path"
40947    fi
40948  fi
40949
40950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40951  if test "x$test_cygdrive_prefix" = x; then
40952    # As a simple fix, exclude /usr/bin since it's not a real path.
40953    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40955      # a path prefixed by /cygdrive for fixpath to work.
40956      new_path="$CYGWIN_ROOT_PATH$input_path"
40957    fi
40958  fi
40959
40960  # remove trailing .exe if any
40961  new_path="${new_path/%.exe/}"
40962
40963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40964
40965  # First separate the path from the arguments. This will split at the first
40966  # space.
40967  complete="$STRIP"
40968  path="${complete%% *}"
40969  tmp="$complete EOL"
40970  arguments="${tmp#* }"
40971
40972  # Input might be given as Windows format, start by converting to
40973  # unix format.
40974  new_path="$path"
40975
40976  windows_path="$new_path"
40977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40978    unix_path=`$CYGPATH -u "$windows_path"`
40979    new_path="$unix_path"
40980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40982    new_path="$unix_path"
40983  fi
40984
40985
40986  # Now try to locate executable using which
40987  new_path=`$WHICH "$new_path" 2> /dev/null`
40988
40989  if test "x$new_path" = x; then
40990    # Oops. Which didn't find the executable.
40991    # The splitting of arguments from the executable at a space might have been incorrect,
40992    # since paths with space are more likely in Windows. Give it another try with the whole
40993    # argument.
40994    path="$complete"
40995    arguments="EOL"
40996    new_path="$path"
40997
40998  windows_path="$new_path"
40999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41000    unix_path=`$CYGPATH -u "$windows_path"`
41001    new_path="$unix_path"
41002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41004    new_path="$unix_path"
41005  fi
41006
41007
41008    new_path=`$WHICH "$new_path" 2> /dev/null`
41009    # bat and cmd files are not always considered executable in MSYS causing which
41010    # to not find them
41011    if test "x$new_path" = x \
41012        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41013        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41014      new_path="$path"
41015
41016  windows_path="$new_path"
41017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41018    unix_path=`$CYGPATH -u "$windows_path"`
41019    new_path="$unix_path"
41020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41022    new_path="$unix_path"
41023  fi
41024
41025    fi
41026
41027    if test "x$new_path" = x; then
41028      # It's still not found. Now this is an unrecoverable error.
41029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41030$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41031      has_space=`$ECHO "$complete" | $GREP " "`
41032      if test "x$has_space" != x; then
41033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41035      fi
41036      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41037    fi
41038  fi
41039
41040  # Now new_path has a complete unix path to the binary
41041  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41042    # Keep paths in /bin as-is, but remove trailing .exe if any
41043    new_path="${new_path/%.exe/}"
41044    # Do not save /bin paths to all_fixpath_prefixes!
41045  else
41046    # Not in mixed or Windows style, start by that.
41047    new_path=`cmd //c echo $new_path`
41048
41049  input_path="$new_path"
41050  # Check if we need to convert this using DOS-style short mode. If the path
41051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41052  # take no chances and rewrite it.
41053  # Note: m4 eats our [], so we need to use [ and ] instead.
41054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41055  if test "x$has_forbidden_chars" != x; then
41056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41058  fi
41059
41060    # Output is in $new_path
41061
41062  windows_path="$new_path"
41063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41064    unix_path=`$CYGPATH -u "$windows_path"`
41065    new_path="$unix_path"
41066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41068    new_path="$unix_path"
41069  fi
41070
41071    # remove trailing .exe if any
41072    new_path="${new_path/%.exe/}"
41073
41074    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41075    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41076  fi
41077
41078    else
41079      # We're on a unix platform. Hooray! :)
41080      # First separate the path from the arguments. This will split at the first
41081      # space.
41082      complete="$STRIP"
41083      path="${complete%% *}"
41084      tmp="$complete EOL"
41085      arguments="${tmp#* }"
41086
41087      # Cannot rely on the command "which" here since it doesn't always work.
41088      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41089      if test -z "$is_absolute_path"; then
41090        # Path to executable is not absolute. Find it.
41091        IFS_save="$IFS"
41092        IFS=:
41093        for p in $PATH; do
41094          if test -f "$p/$path" && test -x "$p/$path"; then
41095            new_path="$p/$path"
41096            break
41097          fi
41098        done
41099        IFS="$IFS_save"
41100      else
41101        # This is an absolute path, we can use it without further modifications.
41102        new_path="$path"
41103      fi
41104
41105      if test "x$new_path" = x; then
41106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41107$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41108        has_space=`$ECHO "$complete" | $GREP " "`
41109        if test "x$has_space" != x; then
41110          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41111$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41112        fi
41113        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41114      fi
41115    fi
41116
41117    # Now join together the path and the arguments once again
41118    if test "x$arguments" != xEOL; then
41119      new_complete="$new_path ${arguments% *}"
41120    else
41121      new_complete="$new_path"
41122    fi
41123
41124    if test "x$complete" != "x$new_complete"; then
41125      STRIP="$new_complete"
41126      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41127$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41128    fi
41129  fi
41130
41131    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41132
41133
41134  # Publish this variable in the help.
41135
41136
41137  if [ -z "${NM+x}" ]; then
41138    # The variable is not set by user, try to locate tool using the code snippet
41139    if test -n "$ac_tool_prefix"; then
41140  for ac_prog in nm gcc-nm
41141  do
41142    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41143set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41145$as_echo_n "checking for $ac_word... " >&6; }
41146if ${ac_cv_prog_NM+:} false; then :
41147  $as_echo_n "(cached) " >&6
41148else
41149  if test -n "$NM"; then
41150  ac_cv_prog_NM="$NM" # Let the user override the test.
41151else
41152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41153for as_dir in $PATH
41154do
41155  IFS=$as_save_IFS
41156  test -z "$as_dir" && as_dir=.
41157    for ac_exec_ext in '' $ac_executable_extensions; do
41158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41159    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41161    break 2
41162  fi
41163done
41164  done
41165IFS=$as_save_IFS
41166
41167fi
41168fi
41169NM=$ac_cv_prog_NM
41170if test -n "$NM"; then
41171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41172$as_echo "$NM" >&6; }
41173else
41174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41175$as_echo "no" >&6; }
41176fi
41177
41178
41179    test -n "$NM" && break
41180  done
41181fi
41182if test -z "$NM"; then
41183  ac_ct_NM=$NM
41184  for ac_prog in nm gcc-nm
41185do
41186  # Extract the first word of "$ac_prog", so it can be a program name with args.
41187set dummy $ac_prog; ac_word=$2
41188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41189$as_echo_n "checking for $ac_word... " >&6; }
41190if ${ac_cv_prog_ac_ct_NM+:} false; then :
41191  $as_echo_n "(cached) " >&6
41192else
41193  if test -n "$ac_ct_NM"; then
41194  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41195else
41196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41197for as_dir in $PATH
41198do
41199  IFS=$as_save_IFS
41200  test -z "$as_dir" && as_dir=.
41201    for ac_exec_ext in '' $ac_executable_extensions; do
41202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41203    ac_cv_prog_ac_ct_NM="$ac_prog"
41204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41205    break 2
41206  fi
41207done
41208  done
41209IFS=$as_save_IFS
41210
41211fi
41212fi
41213ac_ct_NM=$ac_cv_prog_ac_ct_NM
41214if test -n "$ac_ct_NM"; then
41215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41216$as_echo "$ac_ct_NM" >&6; }
41217else
41218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41219$as_echo "no" >&6; }
41220fi
41221
41222
41223  test -n "$ac_ct_NM" && break
41224done
41225
41226  if test "x$ac_ct_NM" = x; then
41227    NM=""
41228  else
41229    case $cross_compiling:$ac_tool_warned in
41230yes:)
41231{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41232$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41233ac_tool_warned=yes ;;
41234esac
41235    NM=$ac_ct_NM
41236  fi
41237fi
41238
41239  else
41240    # The variable is set, but is it from the command line or the environment?
41241
41242    # Try to remove the string !NM! from our list.
41243    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41244    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41245      # If it failed, the variable was not from the command line. Ignore it,
41246      # but warn the user (except for BASH, which is always set by the calling BASH).
41247      if test "xNM" != xBASH; then
41248        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41249$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41250      fi
41251      # Try to locate tool using the code snippet
41252      if test -n "$ac_tool_prefix"; then
41253  for ac_prog in nm gcc-nm
41254  do
41255    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41256set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41258$as_echo_n "checking for $ac_word... " >&6; }
41259if ${ac_cv_prog_NM+:} false; then :
41260  $as_echo_n "(cached) " >&6
41261else
41262  if test -n "$NM"; then
41263  ac_cv_prog_NM="$NM" # Let the user override the test.
41264else
41265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41266for as_dir in $PATH
41267do
41268  IFS=$as_save_IFS
41269  test -z "$as_dir" && as_dir=.
41270    for ac_exec_ext in '' $ac_executable_extensions; do
41271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41272    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41274    break 2
41275  fi
41276done
41277  done
41278IFS=$as_save_IFS
41279
41280fi
41281fi
41282NM=$ac_cv_prog_NM
41283if test -n "$NM"; then
41284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41285$as_echo "$NM" >&6; }
41286else
41287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41288$as_echo "no" >&6; }
41289fi
41290
41291
41292    test -n "$NM" && break
41293  done
41294fi
41295if test -z "$NM"; then
41296  ac_ct_NM=$NM
41297  for ac_prog in nm gcc-nm
41298do
41299  # Extract the first word of "$ac_prog", so it can be a program name with args.
41300set dummy $ac_prog; ac_word=$2
41301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41302$as_echo_n "checking for $ac_word... " >&6; }
41303if ${ac_cv_prog_ac_ct_NM+:} false; then :
41304  $as_echo_n "(cached) " >&6
41305else
41306  if test -n "$ac_ct_NM"; then
41307  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41308else
41309as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41310for as_dir in $PATH
41311do
41312  IFS=$as_save_IFS
41313  test -z "$as_dir" && as_dir=.
41314    for ac_exec_ext in '' $ac_executable_extensions; do
41315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41316    ac_cv_prog_ac_ct_NM="$ac_prog"
41317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41318    break 2
41319  fi
41320done
41321  done
41322IFS=$as_save_IFS
41323
41324fi
41325fi
41326ac_ct_NM=$ac_cv_prog_ac_ct_NM
41327if test -n "$ac_ct_NM"; then
41328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41329$as_echo "$ac_ct_NM" >&6; }
41330else
41331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41332$as_echo "no" >&6; }
41333fi
41334
41335
41336  test -n "$ac_ct_NM" && break
41337done
41338
41339  if test "x$ac_ct_NM" = x; then
41340    NM=""
41341  else
41342    case $cross_compiling:$ac_tool_warned in
41343yes:)
41344{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41345$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41346ac_tool_warned=yes ;;
41347esac
41348    NM=$ac_ct_NM
41349  fi
41350fi
41351
41352    else
41353      # If it succeeded, then it was overridden by the user. We will use it
41354      # for the tool.
41355
41356      # First remove it from the list of overridden variables, so we can test
41357      # for unknown variables in the end.
41358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41359
41360      # Check if we try to supply an empty value
41361      if test "x$NM" = x; then
41362        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41363$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41365$as_echo_n "checking for NM... " >&6; }
41366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41367$as_echo "disabled" >&6; }
41368      else
41369        # Check if the provided tool contains a complete path.
41370        tool_specified="$NM"
41371        tool_basename="${tool_specified##*/}"
41372        if test "x$tool_basename" = "x$tool_specified"; then
41373          # A command without a complete path is provided, search $PATH.
41374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41375$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41376          # Extract the first word of "$tool_basename", so it can be a program name with args.
41377set dummy $tool_basename; ac_word=$2
41378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41379$as_echo_n "checking for $ac_word... " >&6; }
41380if ${ac_cv_path_NM+:} false; then :
41381  $as_echo_n "(cached) " >&6
41382else
41383  case $NM in
41384  [\\/]* | ?:[\\/]*)
41385  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41386  ;;
41387  *)
41388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41389for as_dir in $PATH
41390do
41391  IFS=$as_save_IFS
41392  test -z "$as_dir" && as_dir=.
41393    for ac_exec_ext in '' $ac_executable_extensions; do
41394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41395    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41397    break 2
41398  fi
41399done
41400  done
41401IFS=$as_save_IFS
41402
41403  ;;
41404esac
41405fi
41406NM=$ac_cv_path_NM
41407if test -n "$NM"; then
41408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41409$as_echo "$NM" >&6; }
41410else
41411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41412$as_echo "no" >&6; }
41413fi
41414
41415
41416          if test "x$NM" = x; then
41417            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41418          fi
41419        else
41420          # Otherwise we believe it is a complete path. Use it as it is.
41421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41422$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41423          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41424$as_echo_n "checking for NM... " >&6; }
41425          if test ! -x "$tool_specified"; then
41426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41427$as_echo "not found" >&6; }
41428            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41429          fi
41430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41431$as_echo "$tool_specified" >&6; }
41432        fi
41433      fi
41434    fi
41435
41436  fi
41437
41438
41439    else
41440
41441
41442  # Publish this variable in the help.
41443
41444
41445  if [ -z "${NM+x}" ]; then
41446    # The variable is not set by user, try to locate tool using the code snippet
41447    if test -n "$ac_tool_prefix"; then
41448  for ac_prog in nm
41449  do
41450    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41451set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41453$as_echo_n "checking for $ac_word... " >&6; }
41454if ${ac_cv_prog_NM+:} false; then :
41455  $as_echo_n "(cached) " >&6
41456else
41457  if test -n "$NM"; then
41458  ac_cv_prog_NM="$NM" # Let the user override the test.
41459else
41460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41461for as_dir in $PATH
41462do
41463  IFS=$as_save_IFS
41464  test -z "$as_dir" && as_dir=.
41465    for ac_exec_ext in '' $ac_executable_extensions; do
41466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41467    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41469    break 2
41470  fi
41471done
41472  done
41473IFS=$as_save_IFS
41474
41475fi
41476fi
41477NM=$ac_cv_prog_NM
41478if test -n "$NM"; then
41479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41480$as_echo "$NM" >&6; }
41481else
41482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41483$as_echo "no" >&6; }
41484fi
41485
41486
41487    test -n "$NM" && break
41488  done
41489fi
41490if test -z "$NM"; then
41491  ac_ct_NM=$NM
41492  for ac_prog in nm
41493do
41494  # Extract the first word of "$ac_prog", so it can be a program name with args.
41495set dummy $ac_prog; ac_word=$2
41496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41497$as_echo_n "checking for $ac_word... " >&6; }
41498if ${ac_cv_prog_ac_ct_NM+:} false; then :
41499  $as_echo_n "(cached) " >&6
41500else
41501  if test -n "$ac_ct_NM"; then
41502  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41503else
41504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41505for as_dir in $PATH
41506do
41507  IFS=$as_save_IFS
41508  test -z "$as_dir" && as_dir=.
41509    for ac_exec_ext in '' $ac_executable_extensions; do
41510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41511    ac_cv_prog_ac_ct_NM="$ac_prog"
41512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41513    break 2
41514  fi
41515done
41516  done
41517IFS=$as_save_IFS
41518
41519fi
41520fi
41521ac_ct_NM=$ac_cv_prog_ac_ct_NM
41522if test -n "$ac_ct_NM"; then
41523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41524$as_echo "$ac_ct_NM" >&6; }
41525else
41526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41527$as_echo "no" >&6; }
41528fi
41529
41530
41531  test -n "$ac_ct_NM" && break
41532done
41533
41534  if test "x$ac_ct_NM" = x; then
41535    NM=""
41536  else
41537    case $cross_compiling:$ac_tool_warned in
41538yes:)
41539{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41540$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41541ac_tool_warned=yes ;;
41542esac
41543    NM=$ac_ct_NM
41544  fi
41545fi
41546
41547  else
41548    # The variable is set, but is it from the command line or the environment?
41549
41550    # Try to remove the string !NM! from our list.
41551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41553      # If it failed, the variable was not from the command line. Ignore it,
41554      # but warn the user (except for BASH, which is always set by the calling BASH).
41555      if test "xNM" != xBASH; then
41556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41557$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41558      fi
41559      # Try to locate tool using the code snippet
41560      if test -n "$ac_tool_prefix"; then
41561  for ac_prog in nm
41562  do
41563    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41564set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41566$as_echo_n "checking for $ac_word... " >&6; }
41567if ${ac_cv_prog_NM+:} false; then :
41568  $as_echo_n "(cached) " >&6
41569else
41570  if test -n "$NM"; then
41571  ac_cv_prog_NM="$NM" # Let the user override the test.
41572else
41573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41574for as_dir in $PATH
41575do
41576  IFS=$as_save_IFS
41577  test -z "$as_dir" && as_dir=.
41578    for ac_exec_ext in '' $ac_executable_extensions; do
41579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41580    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41582    break 2
41583  fi
41584done
41585  done
41586IFS=$as_save_IFS
41587
41588fi
41589fi
41590NM=$ac_cv_prog_NM
41591if test -n "$NM"; then
41592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41593$as_echo "$NM" >&6; }
41594else
41595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41596$as_echo "no" >&6; }
41597fi
41598
41599
41600    test -n "$NM" && break
41601  done
41602fi
41603if test -z "$NM"; then
41604  ac_ct_NM=$NM
41605  for ac_prog in nm
41606do
41607  # Extract the first word of "$ac_prog", so it can be a program name with args.
41608set dummy $ac_prog; ac_word=$2
41609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41610$as_echo_n "checking for $ac_word... " >&6; }
41611if ${ac_cv_prog_ac_ct_NM+:} false; then :
41612  $as_echo_n "(cached) " >&6
41613else
41614  if test -n "$ac_ct_NM"; then
41615  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41616else
41617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41618for as_dir in $PATH
41619do
41620  IFS=$as_save_IFS
41621  test -z "$as_dir" && as_dir=.
41622    for ac_exec_ext in '' $ac_executable_extensions; do
41623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41624    ac_cv_prog_ac_ct_NM="$ac_prog"
41625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41626    break 2
41627  fi
41628done
41629  done
41630IFS=$as_save_IFS
41631
41632fi
41633fi
41634ac_ct_NM=$ac_cv_prog_ac_ct_NM
41635if test -n "$ac_ct_NM"; then
41636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41637$as_echo "$ac_ct_NM" >&6; }
41638else
41639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41640$as_echo "no" >&6; }
41641fi
41642
41643
41644  test -n "$ac_ct_NM" && break
41645done
41646
41647  if test "x$ac_ct_NM" = x; then
41648    NM=""
41649  else
41650    case $cross_compiling:$ac_tool_warned in
41651yes:)
41652{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41653$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41654ac_tool_warned=yes ;;
41655esac
41656    NM=$ac_ct_NM
41657  fi
41658fi
41659
41660    else
41661      # If it succeeded, then it was overridden by the user. We will use it
41662      # for the tool.
41663
41664      # First remove it from the list of overridden variables, so we can test
41665      # for unknown variables in the end.
41666      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41667
41668      # Check if we try to supply an empty value
41669      if test "x$NM" = x; then
41670        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41671$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41673$as_echo_n "checking for NM... " >&6; }
41674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41675$as_echo "disabled" >&6; }
41676      else
41677        # Check if the provided tool contains a complete path.
41678        tool_specified="$NM"
41679        tool_basename="${tool_specified##*/}"
41680        if test "x$tool_basename" = "x$tool_specified"; then
41681          # A command without a complete path is provided, search $PATH.
41682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41683$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41684          # Extract the first word of "$tool_basename", so it can be a program name with args.
41685set dummy $tool_basename; ac_word=$2
41686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41687$as_echo_n "checking for $ac_word... " >&6; }
41688if ${ac_cv_path_NM+:} false; then :
41689  $as_echo_n "(cached) " >&6
41690else
41691  case $NM in
41692  [\\/]* | ?:[\\/]*)
41693  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41694  ;;
41695  *)
41696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41697for as_dir in $PATH
41698do
41699  IFS=$as_save_IFS
41700  test -z "$as_dir" && as_dir=.
41701    for ac_exec_ext in '' $ac_executable_extensions; do
41702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41703    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41705    break 2
41706  fi
41707done
41708  done
41709IFS=$as_save_IFS
41710
41711  ;;
41712esac
41713fi
41714NM=$ac_cv_path_NM
41715if test -n "$NM"; then
41716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41717$as_echo "$NM" >&6; }
41718else
41719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41720$as_echo "no" >&6; }
41721fi
41722
41723
41724          if test "x$NM" = x; then
41725            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41726          fi
41727        else
41728          # Otherwise we believe it is a complete path. Use it as it is.
41729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41730$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41731          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41732$as_echo_n "checking for NM... " >&6; }
41733          if test ! -x "$tool_specified"; then
41734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41735$as_echo "not found" >&6; }
41736            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41737          fi
41738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41739$as_echo "$tool_specified" >&6; }
41740        fi
41741      fi
41742    fi
41743
41744  fi
41745
41746
41747    fi
41748
41749  # Only process if variable expands to non-empty
41750
41751  if test "x$NM" != x; then
41752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41753
41754  # First separate the path from the arguments. This will split at the first
41755  # space.
41756  complete="$NM"
41757  path="${complete%% *}"
41758  tmp="$complete EOL"
41759  arguments="${tmp#* }"
41760
41761  # Input might be given as Windows format, start by converting to
41762  # unix format.
41763  new_path=`$CYGPATH -u "$path"`
41764
41765  # Now try to locate executable using which
41766  new_path=`$WHICH "$new_path" 2> /dev/null`
41767  # bat and cmd files are not always considered executable in cygwin causing which
41768  # to not find them
41769  if test "x$new_path" = x \
41770      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41771      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41772    new_path=`$CYGPATH -u "$path"`
41773  fi
41774  if test "x$new_path" = x; then
41775    # Oops. Which didn't find the executable.
41776    # The splitting of arguments from the executable at a space might have been incorrect,
41777    # since paths with space are more likely in Windows. Give it another try with the whole
41778    # argument.
41779    path="$complete"
41780    arguments="EOL"
41781    new_path=`$CYGPATH -u "$path"`
41782    new_path=`$WHICH "$new_path" 2> /dev/null`
41783    # bat and cmd files are not always considered executable in cygwin causing which
41784    # to not find them
41785    if test "x$new_path" = x \
41786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41788      new_path=`$CYGPATH -u "$path"`
41789    fi
41790    if test "x$new_path" = x; then
41791      # It's still not found. Now this is an unrecoverable error.
41792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41793$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41794      has_space=`$ECHO "$complete" | $GREP " "`
41795      if test "x$has_space" != x; then
41796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41798      fi
41799      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41800    fi
41801  fi
41802
41803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41806  # "foo.exe" is OK but "foo" is an error.
41807  #
41808  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41809  # It is also a way to make sure we got the proper file name for the real test later on.
41810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41811  if test "x$test_shortpath" = x; then
41812    # Short path failed, file does not exist as specified.
41813    # Try adding .exe or .cmd
41814    if test -f "${new_path}.exe"; then
41815      input_to_shortpath="${new_path}.exe"
41816    elif test -f "${new_path}.cmd"; then
41817      input_to_shortpath="${new_path}.cmd"
41818    else
41819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41820$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41821      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41822$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41823      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41824    fi
41825  else
41826    input_to_shortpath="$new_path"
41827  fi
41828
41829  # Call helper function which possibly converts this using DOS-style short mode.
41830  # If so, the updated path is stored in $new_path.
41831  new_path="$input_to_shortpath"
41832
41833  input_path="$input_to_shortpath"
41834  # Check if we need to convert this using DOS-style short mode. If the path
41835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41836  # take no chances and rewrite it.
41837  # Note: m4 eats our [], so we need to use [ and ] instead.
41838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41839  if test "x$has_forbidden_chars" != x; then
41840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41844      # Going to short mode and back again did indeed matter. Since short mode is
41845      # case insensitive, let's make it lowercase to improve readability.
41846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41847      # Now convert it back to Unix-style (cygpath)
41848      input_path=`$CYGPATH -u "$shortmode_path"`
41849      new_path="$input_path"
41850    fi
41851  fi
41852
41853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41854  if test "x$test_cygdrive_prefix" = x; then
41855    # As a simple fix, exclude /usr/bin since it's not a real path.
41856    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41858      # a path prefixed by /cygdrive for fixpath to work.
41859      new_path="$CYGWIN_ROOT_PATH$input_path"
41860    fi
41861  fi
41862
41863  # remove trailing .exe if any
41864  new_path="${new_path/%.exe/}"
41865
41866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41867
41868  # First separate the path from the arguments. This will split at the first
41869  # space.
41870  complete="$NM"
41871  path="${complete%% *}"
41872  tmp="$complete EOL"
41873  arguments="${tmp#* }"
41874
41875  # Input might be given as Windows format, start by converting to
41876  # unix format.
41877  new_path="$path"
41878
41879  windows_path="$new_path"
41880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41881    unix_path=`$CYGPATH -u "$windows_path"`
41882    new_path="$unix_path"
41883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41885    new_path="$unix_path"
41886  fi
41887
41888
41889  # Now try to locate executable using which
41890  new_path=`$WHICH "$new_path" 2> /dev/null`
41891
41892  if test "x$new_path" = x; then
41893    # Oops. Which didn't find the executable.
41894    # The splitting of arguments from the executable at a space might have been incorrect,
41895    # since paths with space are more likely in Windows. Give it another try with the whole
41896    # argument.
41897    path="$complete"
41898    arguments="EOL"
41899    new_path="$path"
41900
41901  windows_path="$new_path"
41902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41903    unix_path=`$CYGPATH -u "$windows_path"`
41904    new_path="$unix_path"
41905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41907    new_path="$unix_path"
41908  fi
41909
41910
41911    new_path=`$WHICH "$new_path" 2> /dev/null`
41912    # bat and cmd files are not always considered executable in MSYS causing which
41913    # to not find them
41914    if test "x$new_path" = x \
41915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41917      new_path="$path"
41918
41919  windows_path="$new_path"
41920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41921    unix_path=`$CYGPATH -u "$windows_path"`
41922    new_path="$unix_path"
41923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41925    new_path="$unix_path"
41926  fi
41927
41928    fi
41929
41930    if test "x$new_path" = x; then
41931      # It's still not found. Now this is an unrecoverable error.
41932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41933$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41934      has_space=`$ECHO "$complete" | $GREP " "`
41935      if test "x$has_space" != x; then
41936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41938      fi
41939      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41940    fi
41941  fi
41942
41943  # Now new_path has a complete unix path to the binary
41944  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41945    # Keep paths in /bin as-is, but remove trailing .exe if any
41946    new_path="${new_path/%.exe/}"
41947    # Do not save /bin paths to all_fixpath_prefixes!
41948  else
41949    # Not in mixed or Windows style, start by that.
41950    new_path=`cmd //c echo $new_path`
41951
41952  input_path="$new_path"
41953  # Check if we need to convert this using DOS-style short mode. If the path
41954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41955  # take no chances and rewrite it.
41956  # Note: m4 eats our [], so we need to use [ and ] instead.
41957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41958  if test "x$has_forbidden_chars" != x; then
41959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41961  fi
41962
41963    # Output is in $new_path
41964
41965  windows_path="$new_path"
41966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41967    unix_path=`$CYGPATH -u "$windows_path"`
41968    new_path="$unix_path"
41969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41971    new_path="$unix_path"
41972  fi
41973
41974    # remove trailing .exe if any
41975    new_path="${new_path/%.exe/}"
41976
41977    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41978    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41979  fi
41980
41981    else
41982      # We're on a unix platform. Hooray! :)
41983      # First separate the path from the arguments. This will split at the first
41984      # space.
41985      complete="$NM"
41986      path="${complete%% *}"
41987      tmp="$complete EOL"
41988      arguments="${tmp#* }"
41989
41990      # Cannot rely on the command "which" here since it doesn't always work.
41991      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41992      if test -z "$is_absolute_path"; then
41993        # Path to executable is not absolute. Find it.
41994        IFS_save="$IFS"
41995        IFS=:
41996        for p in $PATH; do
41997          if test -f "$p/$path" && test -x "$p/$path"; then
41998            new_path="$p/$path"
41999            break
42000          fi
42001        done
42002        IFS="$IFS_save"
42003      else
42004        # This is an absolute path, we can use it without further modifications.
42005        new_path="$path"
42006      fi
42007
42008      if test "x$new_path" = x; then
42009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42010$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42011        has_space=`$ECHO "$complete" | $GREP " "`
42012        if test "x$has_space" != x; then
42013          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42014$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42015        fi
42016        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42017      fi
42018    fi
42019
42020    # Now join together the path and the arguments once again
42021    if test "x$arguments" != xEOL; then
42022      new_complete="$new_path ${arguments% *}"
42023    else
42024      new_complete="$new_path"
42025    fi
42026
42027    if test "x$complete" != "x$new_complete"; then
42028      NM="$new_complete"
42029      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42030$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42031    fi
42032  fi
42033
42034    GNM="$NM"
42035
42036  fi
42037
42038  # objcopy is used for moving debug symbols to separate files when
42039  # full debug symbols are enabled.
42040  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42041
42042
42043  # Publish this variable in the help.
42044
42045
42046  if [ -z "${OBJCOPY+x}" ]; then
42047    # The variable is not set by user, try to locate tool using the code snippet
42048    if test -n "$ac_tool_prefix"; then
42049  for ac_prog in gobjcopy objcopy
42050  do
42051    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42052set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42054$as_echo_n "checking for $ac_word... " >&6; }
42055if ${ac_cv_prog_OBJCOPY+:} false; then :
42056  $as_echo_n "(cached) " >&6
42057else
42058  if test -n "$OBJCOPY"; then
42059  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42060else
42061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42062for as_dir in $PATH
42063do
42064  IFS=$as_save_IFS
42065  test -z "$as_dir" && as_dir=.
42066    for ac_exec_ext in '' $ac_executable_extensions; do
42067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42068    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42070    break 2
42071  fi
42072done
42073  done
42074IFS=$as_save_IFS
42075
42076fi
42077fi
42078OBJCOPY=$ac_cv_prog_OBJCOPY
42079if test -n "$OBJCOPY"; then
42080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42081$as_echo "$OBJCOPY" >&6; }
42082else
42083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42084$as_echo "no" >&6; }
42085fi
42086
42087
42088    test -n "$OBJCOPY" && break
42089  done
42090fi
42091if test -z "$OBJCOPY"; then
42092  ac_ct_OBJCOPY=$OBJCOPY
42093  for ac_prog in gobjcopy objcopy
42094do
42095  # Extract the first word of "$ac_prog", so it can be a program name with args.
42096set dummy $ac_prog; ac_word=$2
42097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42098$as_echo_n "checking for $ac_word... " >&6; }
42099if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42100  $as_echo_n "(cached) " >&6
42101else
42102  if test -n "$ac_ct_OBJCOPY"; then
42103  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42104else
42105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42106for as_dir in $PATH
42107do
42108  IFS=$as_save_IFS
42109  test -z "$as_dir" && as_dir=.
42110    for ac_exec_ext in '' $ac_executable_extensions; do
42111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42112    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42114    break 2
42115  fi
42116done
42117  done
42118IFS=$as_save_IFS
42119
42120fi
42121fi
42122ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42123if test -n "$ac_ct_OBJCOPY"; then
42124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42125$as_echo "$ac_ct_OBJCOPY" >&6; }
42126else
42127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42128$as_echo "no" >&6; }
42129fi
42130
42131
42132  test -n "$ac_ct_OBJCOPY" && break
42133done
42134
42135  if test "x$ac_ct_OBJCOPY" = x; then
42136    OBJCOPY=""
42137  else
42138    case $cross_compiling:$ac_tool_warned in
42139yes:)
42140{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42141$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42142ac_tool_warned=yes ;;
42143esac
42144    OBJCOPY=$ac_ct_OBJCOPY
42145  fi
42146fi
42147
42148  else
42149    # The variable is set, but is it from the command line or the environment?
42150
42151    # Try to remove the string !OBJCOPY! from our list.
42152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42154      # If it failed, the variable was not from the command line. Ignore it,
42155      # but warn the user (except for BASH, which is always set by the calling BASH).
42156      if test "xOBJCOPY" != xBASH; then
42157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42158$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42159      fi
42160      # Try to locate tool using the code snippet
42161      if test -n "$ac_tool_prefix"; then
42162  for ac_prog in gobjcopy objcopy
42163  do
42164    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42165set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42167$as_echo_n "checking for $ac_word... " >&6; }
42168if ${ac_cv_prog_OBJCOPY+:} false; then :
42169  $as_echo_n "(cached) " >&6
42170else
42171  if test -n "$OBJCOPY"; then
42172  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42173else
42174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42175for as_dir in $PATH
42176do
42177  IFS=$as_save_IFS
42178  test -z "$as_dir" && as_dir=.
42179    for ac_exec_ext in '' $ac_executable_extensions; do
42180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42181    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42183    break 2
42184  fi
42185done
42186  done
42187IFS=$as_save_IFS
42188
42189fi
42190fi
42191OBJCOPY=$ac_cv_prog_OBJCOPY
42192if test -n "$OBJCOPY"; then
42193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42194$as_echo "$OBJCOPY" >&6; }
42195else
42196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42197$as_echo "no" >&6; }
42198fi
42199
42200
42201    test -n "$OBJCOPY" && break
42202  done
42203fi
42204if test -z "$OBJCOPY"; then
42205  ac_ct_OBJCOPY=$OBJCOPY
42206  for ac_prog in gobjcopy objcopy
42207do
42208  # Extract the first word of "$ac_prog", so it can be a program name with args.
42209set dummy $ac_prog; ac_word=$2
42210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42211$as_echo_n "checking for $ac_word... " >&6; }
42212if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42213  $as_echo_n "(cached) " >&6
42214else
42215  if test -n "$ac_ct_OBJCOPY"; then
42216  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42217else
42218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42219for as_dir in $PATH
42220do
42221  IFS=$as_save_IFS
42222  test -z "$as_dir" && as_dir=.
42223    for ac_exec_ext in '' $ac_executable_extensions; do
42224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42225    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42227    break 2
42228  fi
42229done
42230  done
42231IFS=$as_save_IFS
42232
42233fi
42234fi
42235ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42236if test -n "$ac_ct_OBJCOPY"; then
42237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42238$as_echo "$ac_ct_OBJCOPY" >&6; }
42239else
42240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42241$as_echo "no" >&6; }
42242fi
42243
42244
42245  test -n "$ac_ct_OBJCOPY" && break
42246done
42247
42248  if test "x$ac_ct_OBJCOPY" = x; then
42249    OBJCOPY=""
42250  else
42251    case $cross_compiling:$ac_tool_warned in
42252yes:)
42253{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42254$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42255ac_tool_warned=yes ;;
42256esac
42257    OBJCOPY=$ac_ct_OBJCOPY
42258  fi
42259fi
42260
42261    else
42262      # If it succeeded, then it was overridden by the user. We will use it
42263      # for the tool.
42264
42265      # First remove it from the list of overridden variables, so we can test
42266      # for unknown variables in the end.
42267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42268
42269      # Check if we try to supply an empty value
42270      if test "x$OBJCOPY" = x; then
42271        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42272$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42273        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42274$as_echo_n "checking for OBJCOPY... " >&6; }
42275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42276$as_echo "disabled" >&6; }
42277      else
42278        # Check if the provided tool contains a complete path.
42279        tool_specified="$OBJCOPY"
42280        tool_basename="${tool_specified##*/}"
42281        if test "x$tool_basename" = "x$tool_specified"; then
42282          # A command without a complete path is provided, search $PATH.
42283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42284$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42285          # Extract the first word of "$tool_basename", so it can be a program name with args.
42286set dummy $tool_basename; ac_word=$2
42287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42288$as_echo_n "checking for $ac_word... " >&6; }
42289if ${ac_cv_path_OBJCOPY+:} false; then :
42290  $as_echo_n "(cached) " >&6
42291else
42292  case $OBJCOPY in
42293  [\\/]* | ?:[\\/]*)
42294  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42295  ;;
42296  *)
42297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42298for as_dir in $PATH
42299do
42300  IFS=$as_save_IFS
42301  test -z "$as_dir" && as_dir=.
42302    for ac_exec_ext in '' $ac_executable_extensions; do
42303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42304    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42306    break 2
42307  fi
42308done
42309  done
42310IFS=$as_save_IFS
42311
42312  ;;
42313esac
42314fi
42315OBJCOPY=$ac_cv_path_OBJCOPY
42316if test -n "$OBJCOPY"; then
42317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42318$as_echo "$OBJCOPY" >&6; }
42319else
42320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42321$as_echo "no" >&6; }
42322fi
42323
42324
42325          if test "x$OBJCOPY" = x; then
42326            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42327          fi
42328        else
42329          # Otherwise we believe it is a complete path. Use it as it is.
42330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42331$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42332          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42333$as_echo_n "checking for OBJCOPY... " >&6; }
42334          if test ! -x "$tool_specified"; then
42335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42336$as_echo "not found" >&6; }
42337            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42338          fi
42339          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42340$as_echo "$tool_specified" >&6; }
42341        fi
42342      fi
42343    fi
42344
42345  fi
42346
42347
42348    # Only call fixup if objcopy was found.
42349    if test -n "$OBJCOPY"; then
42350
42351  # Only process if variable expands to non-empty
42352
42353  if test "x$OBJCOPY" != x; then
42354    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42355
42356  # First separate the path from the arguments. This will split at the first
42357  # space.
42358  complete="$OBJCOPY"
42359  path="${complete%% *}"
42360  tmp="$complete EOL"
42361  arguments="${tmp#* }"
42362
42363  # Input might be given as Windows format, start by converting to
42364  # unix format.
42365  new_path=`$CYGPATH -u "$path"`
42366
42367  # Now try to locate executable using which
42368  new_path=`$WHICH "$new_path" 2> /dev/null`
42369  # bat and cmd files are not always considered executable in cygwin causing which
42370  # to not find them
42371  if test "x$new_path" = x \
42372      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42373      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42374    new_path=`$CYGPATH -u "$path"`
42375  fi
42376  if test "x$new_path" = x; then
42377    # Oops. Which didn't find the executable.
42378    # The splitting of arguments from the executable at a space might have been incorrect,
42379    # since paths with space are more likely in Windows. Give it another try with the whole
42380    # argument.
42381    path="$complete"
42382    arguments="EOL"
42383    new_path=`$CYGPATH -u "$path"`
42384    new_path=`$WHICH "$new_path" 2> /dev/null`
42385    # bat and cmd files are not always considered executable in cygwin causing which
42386    # to not find them
42387    if test "x$new_path" = x \
42388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42390      new_path=`$CYGPATH -u "$path"`
42391    fi
42392    if test "x$new_path" = x; then
42393      # It's still not found. Now this is an unrecoverable error.
42394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42395$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42396      has_space=`$ECHO "$complete" | $GREP " "`
42397      if test "x$has_space" != x; then
42398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42400      fi
42401      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42402    fi
42403  fi
42404
42405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42408  # "foo.exe" is OK but "foo" is an error.
42409  #
42410  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42411  # It is also a way to make sure we got the proper file name for the real test later on.
42412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42413  if test "x$test_shortpath" = x; then
42414    # Short path failed, file does not exist as specified.
42415    # Try adding .exe or .cmd
42416    if test -f "${new_path}.exe"; then
42417      input_to_shortpath="${new_path}.exe"
42418    elif test -f "${new_path}.cmd"; then
42419      input_to_shortpath="${new_path}.cmd"
42420    else
42421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42422$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42423      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42424$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42425      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42426    fi
42427  else
42428    input_to_shortpath="$new_path"
42429  fi
42430
42431  # Call helper function which possibly converts this using DOS-style short mode.
42432  # If so, the updated path is stored in $new_path.
42433  new_path="$input_to_shortpath"
42434
42435  input_path="$input_to_shortpath"
42436  # Check if we need to convert this using DOS-style short mode. If the path
42437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42438  # take no chances and rewrite it.
42439  # Note: m4 eats our [], so we need to use [ and ] instead.
42440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42441  if test "x$has_forbidden_chars" != x; then
42442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42446      # Going to short mode and back again did indeed matter. Since short mode is
42447      # case insensitive, let's make it lowercase to improve readability.
42448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42449      # Now convert it back to Unix-style (cygpath)
42450      input_path=`$CYGPATH -u "$shortmode_path"`
42451      new_path="$input_path"
42452    fi
42453  fi
42454
42455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42456  if test "x$test_cygdrive_prefix" = x; then
42457    # As a simple fix, exclude /usr/bin since it's not a real path.
42458    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42460      # a path prefixed by /cygdrive for fixpath to work.
42461      new_path="$CYGWIN_ROOT_PATH$input_path"
42462    fi
42463  fi
42464
42465  # remove trailing .exe if any
42466  new_path="${new_path/%.exe/}"
42467
42468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42469
42470  # First separate the path from the arguments. This will split at the first
42471  # space.
42472  complete="$OBJCOPY"
42473  path="${complete%% *}"
42474  tmp="$complete EOL"
42475  arguments="${tmp#* }"
42476
42477  # Input might be given as Windows format, start by converting to
42478  # unix format.
42479  new_path="$path"
42480
42481  windows_path="$new_path"
42482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42483    unix_path=`$CYGPATH -u "$windows_path"`
42484    new_path="$unix_path"
42485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42487    new_path="$unix_path"
42488  fi
42489
42490
42491  # Now try to locate executable using which
42492  new_path=`$WHICH "$new_path" 2> /dev/null`
42493
42494  if test "x$new_path" = x; then
42495    # Oops. Which didn't find the executable.
42496    # The splitting of arguments from the executable at a space might have been incorrect,
42497    # since paths with space are more likely in Windows. Give it another try with the whole
42498    # argument.
42499    path="$complete"
42500    arguments="EOL"
42501    new_path="$path"
42502
42503  windows_path="$new_path"
42504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42505    unix_path=`$CYGPATH -u "$windows_path"`
42506    new_path="$unix_path"
42507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42509    new_path="$unix_path"
42510  fi
42511
42512
42513    new_path=`$WHICH "$new_path" 2> /dev/null`
42514    # bat and cmd files are not always considered executable in MSYS causing which
42515    # to not find them
42516    if test "x$new_path" = x \
42517        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42518        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42519      new_path="$path"
42520
42521  windows_path="$new_path"
42522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42523    unix_path=`$CYGPATH -u "$windows_path"`
42524    new_path="$unix_path"
42525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42527    new_path="$unix_path"
42528  fi
42529
42530    fi
42531
42532    if test "x$new_path" = x; then
42533      # It's still not found. Now this is an unrecoverable error.
42534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42535$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42536      has_space=`$ECHO "$complete" | $GREP " "`
42537      if test "x$has_space" != x; then
42538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42540      fi
42541      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42542    fi
42543  fi
42544
42545  # Now new_path has a complete unix path to the binary
42546  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42547    # Keep paths in /bin as-is, but remove trailing .exe if any
42548    new_path="${new_path/%.exe/}"
42549    # Do not save /bin paths to all_fixpath_prefixes!
42550  else
42551    # Not in mixed or Windows style, start by that.
42552    new_path=`cmd //c echo $new_path`
42553
42554  input_path="$new_path"
42555  # Check if we need to convert this using DOS-style short mode. If the path
42556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42557  # take no chances and rewrite it.
42558  # Note: m4 eats our [], so we need to use [ and ] instead.
42559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42560  if test "x$has_forbidden_chars" != x; then
42561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42563  fi
42564
42565    # Output is in $new_path
42566
42567  windows_path="$new_path"
42568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42569    unix_path=`$CYGPATH -u "$windows_path"`
42570    new_path="$unix_path"
42571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42573    new_path="$unix_path"
42574  fi
42575
42576    # remove trailing .exe if any
42577    new_path="${new_path/%.exe/}"
42578
42579    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42580    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42581  fi
42582
42583    else
42584      # We're on a unix platform. Hooray! :)
42585      # First separate the path from the arguments. This will split at the first
42586      # space.
42587      complete="$OBJCOPY"
42588      path="${complete%% *}"
42589      tmp="$complete EOL"
42590      arguments="${tmp#* }"
42591
42592      # Cannot rely on the command "which" here since it doesn't always work.
42593      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42594      if test -z "$is_absolute_path"; then
42595        # Path to executable is not absolute. Find it.
42596        IFS_save="$IFS"
42597        IFS=:
42598        for p in $PATH; do
42599          if test -f "$p/$path" && test -x "$p/$path"; then
42600            new_path="$p/$path"
42601            break
42602          fi
42603        done
42604        IFS="$IFS_save"
42605      else
42606        # This is an absolute path, we can use it without further modifications.
42607        new_path="$path"
42608      fi
42609
42610      if test "x$new_path" = x; then
42611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42612$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42613        has_space=`$ECHO "$complete" | $GREP " "`
42614        if test "x$has_space" != x; then
42615          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42616$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42617        fi
42618        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42619      fi
42620    fi
42621
42622    # Now join together the path and the arguments once again
42623    if test "x$arguments" != xEOL; then
42624      new_complete="$new_path ${arguments% *}"
42625    else
42626      new_complete="$new_path"
42627    fi
42628
42629    if test "x$complete" != "x$new_complete"; then
42630      OBJCOPY="$new_complete"
42631      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42632$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42633    fi
42634  fi
42635
42636      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42637        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42638        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42639        # - version number is last blank separate word on first line
42640        # - version number formats that have been seen:
42641        #   - <major>.<minor>
42642        #   - <major>.<minor>.<micro>
42643        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42644        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42645         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42646              -e 's/.* //' \
42647              -e '/^[01]\./b bad' \
42648              -e '/^2\./{' \
42649              -e '  s/^2\.//' \
42650              -e '  /^[0-9]$/b bad' \
42651              -e '  /^[0-9]\./b bad' \
42652              -e '  /^1[0-9]$/b bad' \
42653              -e '  /^1[0-9]\./b bad' \
42654              -e '  /^20\./b bad' \
42655              -e '  /^21\.0$/b bad' \
42656              -e '  /^21\.0\./b bad' \
42657              -e '}' \
42658              -e ':good' \
42659              -e 's/.*/VALID_VERSION/p' \
42660              -e 'q' \
42661              -e ':bad' \
42662              -e 's/.*/BAD_VERSION/p' \
42663              -e 'q'`
42664        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42665          OBJCOPY=
42666          { $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
42667$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42668          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42669$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42670          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42671$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42672          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42673$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42674          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42675$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42676        fi
42677      fi
42678    fi
42679  fi
42680
42681
42682
42683  # Publish this variable in the help.
42684
42685
42686  if [ -z "${OBJDUMP+x}" ]; then
42687    # The variable is not set by user, try to locate tool using the code snippet
42688    if test -n "$ac_tool_prefix"; then
42689  for ac_prog in gobjdump objdump
42690  do
42691    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42692set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42694$as_echo_n "checking for $ac_word... " >&6; }
42695if ${ac_cv_prog_OBJDUMP+:} false; then :
42696  $as_echo_n "(cached) " >&6
42697else
42698  if test -n "$OBJDUMP"; then
42699  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42700else
42701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42702for as_dir in $PATH
42703do
42704  IFS=$as_save_IFS
42705  test -z "$as_dir" && as_dir=.
42706    for ac_exec_ext in '' $ac_executable_extensions; do
42707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42708    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42710    break 2
42711  fi
42712done
42713  done
42714IFS=$as_save_IFS
42715
42716fi
42717fi
42718OBJDUMP=$ac_cv_prog_OBJDUMP
42719if test -n "$OBJDUMP"; then
42720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42721$as_echo "$OBJDUMP" >&6; }
42722else
42723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42724$as_echo "no" >&6; }
42725fi
42726
42727
42728    test -n "$OBJDUMP" && break
42729  done
42730fi
42731if test -z "$OBJDUMP"; then
42732  ac_ct_OBJDUMP=$OBJDUMP
42733  for ac_prog in gobjdump objdump
42734do
42735  # Extract the first word of "$ac_prog", so it can be a program name with args.
42736set dummy $ac_prog; ac_word=$2
42737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42738$as_echo_n "checking for $ac_word... " >&6; }
42739if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42740  $as_echo_n "(cached) " >&6
42741else
42742  if test -n "$ac_ct_OBJDUMP"; then
42743  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42744else
42745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42746for as_dir in $PATH
42747do
42748  IFS=$as_save_IFS
42749  test -z "$as_dir" && as_dir=.
42750    for ac_exec_ext in '' $ac_executable_extensions; do
42751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42752    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42754    break 2
42755  fi
42756done
42757  done
42758IFS=$as_save_IFS
42759
42760fi
42761fi
42762ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42763if test -n "$ac_ct_OBJDUMP"; then
42764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42765$as_echo "$ac_ct_OBJDUMP" >&6; }
42766else
42767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42768$as_echo "no" >&6; }
42769fi
42770
42771
42772  test -n "$ac_ct_OBJDUMP" && break
42773done
42774
42775  if test "x$ac_ct_OBJDUMP" = x; then
42776    OBJDUMP=""
42777  else
42778    case $cross_compiling:$ac_tool_warned in
42779yes:)
42780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42782ac_tool_warned=yes ;;
42783esac
42784    OBJDUMP=$ac_ct_OBJDUMP
42785  fi
42786fi
42787
42788  else
42789    # The variable is set, but is it from the command line or the environment?
42790
42791    # Try to remove the string !OBJDUMP! from our list.
42792    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42793    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42794      # If it failed, the variable was not from the command line. Ignore it,
42795      # but warn the user (except for BASH, which is always set by the calling BASH).
42796      if test "xOBJDUMP" != xBASH; then
42797        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42798$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42799      fi
42800      # Try to locate tool using the code snippet
42801      if test -n "$ac_tool_prefix"; then
42802  for ac_prog in gobjdump objdump
42803  do
42804    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42805set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42807$as_echo_n "checking for $ac_word... " >&6; }
42808if ${ac_cv_prog_OBJDUMP+:} false; then :
42809  $as_echo_n "(cached) " >&6
42810else
42811  if test -n "$OBJDUMP"; then
42812  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42813else
42814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42815for as_dir in $PATH
42816do
42817  IFS=$as_save_IFS
42818  test -z "$as_dir" && as_dir=.
42819    for ac_exec_ext in '' $ac_executable_extensions; do
42820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42821    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42823    break 2
42824  fi
42825done
42826  done
42827IFS=$as_save_IFS
42828
42829fi
42830fi
42831OBJDUMP=$ac_cv_prog_OBJDUMP
42832if test -n "$OBJDUMP"; then
42833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42834$as_echo "$OBJDUMP" >&6; }
42835else
42836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42837$as_echo "no" >&6; }
42838fi
42839
42840
42841    test -n "$OBJDUMP" && break
42842  done
42843fi
42844if test -z "$OBJDUMP"; then
42845  ac_ct_OBJDUMP=$OBJDUMP
42846  for ac_prog in gobjdump objdump
42847do
42848  # Extract the first word of "$ac_prog", so it can be a program name with args.
42849set dummy $ac_prog; ac_word=$2
42850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42851$as_echo_n "checking for $ac_word... " >&6; }
42852if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42853  $as_echo_n "(cached) " >&6
42854else
42855  if test -n "$ac_ct_OBJDUMP"; then
42856  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42857else
42858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42859for as_dir in $PATH
42860do
42861  IFS=$as_save_IFS
42862  test -z "$as_dir" && as_dir=.
42863    for ac_exec_ext in '' $ac_executable_extensions; do
42864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42865    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42867    break 2
42868  fi
42869done
42870  done
42871IFS=$as_save_IFS
42872
42873fi
42874fi
42875ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42876if test -n "$ac_ct_OBJDUMP"; then
42877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42878$as_echo "$ac_ct_OBJDUMP" >&6; }
42879else
42880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42881$as_echo "no" >&6; }
42882fi
42883
42884
42885  test -n "$ac_ct_OBJDUMP" && break
42886done
42887
42888  if test "x$ac_ct_OBJDUMP" = x; then
42889    OBJDUMP=""
42890  else
42891    case $cross_compiling:$ac_tool_warned in
42892yes:)
42893{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42894$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42895ac_tool_warned=yes ;;
42896esac
42897    OBJDUMP=$ac_ct_OBJDUMP
42898  fi
42899fi
42900
42901    else
42902      # If it succeeded, then it was overridden by the user. We will use it
42903      # for the tool.
42904
42905      # First remove it from the list of overridden variables, so we can test
42906      # for unknown variables in the end.
42907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42908
42909      # Check if we try to supply an empty value
42910      if test "x$OBJDUMP" = x; then
42911        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42912$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42914$as_echo_n "checking for OBJDUMP... " >&6; }
42915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42916$as_echo "disabled" >&6; }
42917      else
42918        # Check if the provided tool contains a complete path.
42919        tool_specified="$OBJDUMP"
42920        tool_basename="${tool_specified##*/}"
42921        if test "x$tool_basename" = "x$tool_specified"; then
42922          # A command without a complete path is provided, search $PATH.
42923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42924$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42925          # Extract the first word of "$tool_basename", so it can be a program name with args.
42926set dummy $tool_basename; ac_word=$2
42927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42928$as_echo_n "checking for $ac_word... " >&6; }
42929if ${ac_cv_path_OBJDUMP+:} false; then :
42930  $as_echo_n "(cached) " >&6
42931else
42932  case $OBJDUMP in
42933  [\\/]* | ?:[\\/]*)
42934  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42935  ;;
42936  *)
42937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42938for as_dir in $PATH
42939do
42940  IFS=$as_save_IFS
42941  test -z "$as_dir" && as_dir=.
42942    for ac_exec_ext in '' $ac_executable_extensions; do
42943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42944    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42946    break 2
42947  fi
42948done
42949  done
42950IFS=$as_save_IFS
42951
42952  ;;
42953esac
42954fi
42955OBJDUMP=$ac_cv_path_OBJDUMP
42956if test -n "$OBJDUMP"; then
42957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42958$as_echo "$OBJDUMP" >&6; }
42959else
42960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42961$as_echo "no" >&6; }
42962fi
42963
42964
42965          if test "x$OBJDUMP" = x; then
42966            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42967          fi
42968        else
42969          # Otherwise we believe it is a complete path. Use it as it is.
42970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42971$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42972          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42973$as_echo_n "checking for OBJDUMP... " >&6; }
42974          if test ! -x "$tool_specified"; then
42975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42976$as_echo "not found" >&6; }
42977            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42978          fi
42979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42980$as_echo "$tool_specified" >&6; }
42981        fi
42982      fi
42983    fi
42984
42985  fi
42986
42987
42988  if test "x$OBJDUMP" != x; then
42989    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42990    # bails if argument is missing.
42991
42992  # Only process if variable expands to non-empty
42993
42994  if test "x$OBJDUMP" != x; then
42995    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42996
42997  # First separate the path from the arguments. This will split at the first
42998  # space.
42999  complete="$OBJDUMP"
43000  path="${complete%% *}"
43001  tmp="$complete EOL"
43002  arguments="${tmp#* }"
43003
43004  # Input might be given as Windows format, start by converting to
43005  # unix format.
43006  new_path=`$CYGPATH -u "$path"`
43007
43008  # Now try to locate executable using which
43009  new_path=`$WHICH "$new_path" 2> /dev/null`
43010  # bat and cmd files are not always considered executable in cygwin causing which
43011  # to not find them
43012  if test "x$new_path" = x \
43013      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43014      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43015    new_path=`$CYGPATH -u "$path"`
43016  fi
43017  if test "x$new_path" = x; then
43018    # Oops. Which didn't find the executable.
43019    # The splitting of arguments from the executable at a space might have been incorrect,
43020    # since paths with space are more likely in Windows. Give it another try with the whole
43021    # argument.
43022    path="$complete"
43023    arguments="EOL"
43024    new_path=`$CYGPATH -u "$path"`
43025    new_path=`$WHICH "$new_path" 2> /dev/null`
43026    # bat and cmd files are not always considered executable in cygwin causing which
43027    # to not find them
43028    if test "x$new_path" = x \
43029        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43030        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43031      new_path=`$CYGPATH -u "$path"`
43032    fi
43033    if test "x$new_path" = x; then
43034      # It's still not found. Now this is an unrecoverable error.
43035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43036$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43037      has_space=`$ECHO "$complete" | $GREP " "`
43038      if test "x$has_space" != x; then
43039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43041      fi
43042      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43043    fi
43044  fi
43045
43046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43049  # "foo.exe" is OK but "foo" is an error.
43050  #
43051  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43052  # It is also a way to make sure we got the proper file name for the real test later on.
43053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43054  if test "x$test_shortpath" = x; then
43055    # Short path failed, file does not exist as specified.
43056    # Try adding .exe or .cmd
43057    if test -f "${new_path}.exe"; then
43058      input_to_shortpath="${new_path}.exe"
43059    elif test -f "${new_path}.cmd"; then
43060      input_to_shortpath="${new_path}.cmd"
43061    else
43062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43063$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43064      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43065$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43066      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43067    fi
43068  else
43069    input_to_shortpath="$new_path"
43070  fi
43071
43072  # Call helper function which possibly converts this using DOS-style short mode.
43073  # If so, the updated path is stored in $new_path.
43074  new_path="$input_to_shortpath"
43075
43076  input_path="$input_to_shortpath"
43077  # Check if we need to convert this using DOS-style short mode. If the path
43078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43079  # take no chances and rewrite it.
43080  # Note: m4 eats our [], so we need to use [ and ] instead.
43081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43082  if test "x$has_forbidden_chars" != x; then
43083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43087      # Going to short mode and back again did indeed matter. Since short mode is
43088      # case insensitive, let's make it lowercase to improve readability.
43089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43090      # Now convert it back to Unix-style (cygpath)
43091      input_path=`$CYGPATH -u "$shortmode_path"`
43092      new_path="$input_path"
43093    fi
43094  fi
43095
43096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43097  if test "x$test_cygdrive_prefix" = x; then
43098    # As a simple fix, exclude /usr/bin since it's not a real path.
43099    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43101      # a path prefixed by /cygdrive for fixpath to work.
43102      new_path="$CYGWIN_ROOT_PATH$input_path"
43103    fi
43104  fi
43105
43106  # remove trailing .exe if any
43107  new_path="${new_path/%.exe/}"
43108
43109    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43110
43111  # First separate the path from the arguments. This will split at the first
43112  # space.
43113  complete="$OBJDUMP"
43114  path="${complete%% *}"
43115  tmp="$complete EOL"
43116  arguments="${tmp#* }"
43117
43118  # Input might be given as Windows format, start by converting to
43119  # unix format.
43120  new_path="$path"
43121
43122  windows_path="$new_path"
43123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43124    unix_path=`$CYGPATH -u "$windows_path"`
43125    new_path="$unix_path"
43126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43128    new_path="$unix_path"
43129  fi
43130
43131
43132  # Now try to locate executable using which
43133  new_path=`$WHICH "$new_path" 2> /dev/null`
43134
43135  if test "x$new_path" = x; then
43136    # Oops. Which didn't find the executable.
43137    # The splitting of arguments from the executable at a space might have been incorrect,
43138    # since paths with space are more likely in Windows. Give it another try with the whole
43139    # argument.
43140    path="$complete"
43141    arguments="EOL"
43142    new_path="$path"
43143
43144  windows_path="$new_path"
43145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43146    unix_path=`$CYGPATH -u "$windows_path"`
43147    new_path="$unix_path"
43148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43150    new_path="$unix_path"
43151  fi
43152
43153
43154    new_path=`$WHICH "$new_path" 2> /dev/null`
43155    # bat and cmd files are not always considered executable in MSYS causing which
43156    # to not find them
43157    if test "x$new_path" = x \
43158        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43159        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43160      new_path="$path"
43161
43162  windows_path="$new_path"
43163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43164    unix_path=`$CYGPATH -u "$windows_path"`
43165    new_path="$unix_path"
43166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43168    new_path="$unix_path"
43169  fi
43170
43171    fi
43172
43173    if test "x$new_path" = x; then
43174      # It's still not found. Now this is an unrecoverable error.
43175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43176$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43177      has_space=`$ECHO "$complete" | $GREP " "`
43178      if test "x$has_space" != x; then
43179        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43180$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43181      fi
43182      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43183    fi
43184  fi
43185
43186  # Now new_path has a complete unix path to the binary
43187  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43188    # Keep paths in /bin as-is, but remove trailing .exe if any
43189    new_path="${new_path/%.exe/}"
43190    # Do not save /bin paths to all_fixpath_prefixes!
43191  else
43192    # Not in mixed or Windows style, start by that.
43193    new_path=`cmd //c echo $new_path`
43194
43195  input_path="$new_path"
43196  # Check if we need to convert this using DOS-style short mode. If the path
43197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43198  # take no chances and rewrite it.
43199  # Note: m4 eats our [], so we need to use [ and ] instead.
43200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43201  if test "x$has_forbidden_chars" != x; then
43202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43204  fi
43205
43206    # Output is in $new_path
43207
43208  windows_path="$new_path"
43209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43210    unix_path=`$CYGPATH -u "$windows_path"`
43211    new_path="$unix_path"
43212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43214    new_path="$unix_path"
43215  fi
43216
43217    # remove trailing .exe if any
43218    new_path="${new_path/%.exe/}"
43219
43220    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43221    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43222  fi
43223
43224    else
43225      # We're on a unix platform. Hooray! :)
43226      # First separate the path from the arguments. This will split at the first
43227      # space.
43228      complete="$OBJDUMP"
43229      path="${complete%% *}"
43230      tmp="$complete EOL"
43231      arguments="${tmp#* }"
43232
43233      # Cannot rely on the command "which" here since it doesn't always work.
43234      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43235      if test -z "$is_absolute_path"; then
43236        # Path to executable is not absolute. Find it.
43237        IFS_save="$IFS"
43238        IFS=:
43239        for p in $PATH; do
43240          if test -f "$p/$path" && test -x "$p/$path"; then
43241            new_path="$p/$path"
43242            break
43243          fi
43244        done
43245        IFS="$IFS_save"
43246      else
43247        # This is an absolute path, we can use it without further modifications.
43248        new_path="$path"
43249      fi
43250
43251      if test "x$new_path" = x; then
43252        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43253$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43254        has_space=`$ECHO "$complete" | $GREP " "`
43255        if test "x$has_space" != x; then
43256          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43257$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43258        fi
43259        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43260      fi
43261    fi
43262
43263    # Now join together the path and the arguments once again
43264    if test "x$arguments" != xEOL; then
43265      new_complete="$new_path ${arguments% *}"
43266    else
43267      new_complete="$new_path"
43268    fi
43269
43270    if test "x$complete" != "x$new_complete"; then
43271      OBJDUMP="$new_complete"
43272      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43273$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43274    fi
43275  fi
43276
43277  fi
43278
43279
43280  # Restore old path.
43281  PATH="$OLD_PATH"
43282
43283  # Restore the flags to the user specified values.
43284  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43285  CFLAGS="$ORG_CFLAGS"
43286  CXXFLAGS="$ORG_CXXFLAGS"
43287
43288
43289# Finally do some processing after the detection phase
43290
43291  if test "x$COMPILE_TYPE" = "xcross"; then
43292    # Now we need to find a C/C++ compiler that can build executables for the
43293    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43294    # used once. Also, we need to do this without adding a tools dir to the
43295    # path, otherwise we might pick up cross-compilers which don't use standard
43296    # naming.
43297
43298    OLDPATH="$PATH"
43299
43300
43301# Check whether --with-build-devkit was given.
43302if test "${with_build_devkit+set}" = set; then :
43303  withval=$with_build_devkit;
43304fi
43305
43306    if test "x$with_build_devkit" = "xyes"; then
43307      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43308    elif test -n "$with_build_devkit"; then
43309      if test ! -d "$with_build_devkit"; then
43310        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43311      else
43312
43313  # Only process if variable expands to non-empty
43314
43315  if test "x$with_build_devkit" != x; then
43316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43317
43318  # Input might be given as Windows format, start by converting to
43319  # unix format.
43320  path="$with_build_devkit"
43321  new_path=`$CYGPATH -u "$path"`
43322
43323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43326  # "foo.exe" is OK but "foo" is an error.
43327  #
43328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43329  # It is also a way to make sure we got the proper file name for the real test later on.
43330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43331  if test "x$test_shortpath" = x; then
43332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43333$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43334    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43335  fi
43336
43337  # Call helper function which possibly converts this using DOS-style short mode.
43338  # If so, the updated path is stored in $new_path.
43339
43340  input_path="$new_path"
43341  # Check if we need to convert this using DOS-style short mode. If the path
43342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43343  # take no chances and rewrite it.
43344  # Note: m4 eats our [], so we need to use [ and ] instead.
43345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43346  if test "x$has_forbidden_chars" != x; then
43347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43351      # Going to short mode and back again did indeed matter. Since short mode is
43352      # case insensitive, let's make it lowercase to improve readability.
43353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43354      # Now convert it back to Unix-style (cygpath)
43355      input_path=`$CYGPATH -u "$shortmode_path"`
43356      new_path="$input_path"
43357    fi
43358  fi
43359
43360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43361  if test "x$test_cygdrive_prefix" = x; then
43362    # As a simple fix, exclude /usr/bin since it's not a real path.
43363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43365      # a path prefixed by /cygdrive for fixpath to work.
43366      new_path="$CYGWIN_ROOT_PATH$input_path"
43367    fi
43368  fi
43369
43370
43371  if test "x$path" != "x$new_path"; then
43372    with_build_devkit="$new_path"
43373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43374$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43375  fi
43376
43377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43378
43379  path="$with_build_devkit"
43380  has_colon=`$ECHO $path | $GREP ^.:`
43381  new_path="$path"
43382  if test "x$has_colon" = x; then
43383    # Not in mixed or Windows style, start by that.
43384    new_path=`cmd //c echo $path`
43385  fi
43386
43387
43388  input_path="$new_path"
43389  # Check if we need to convert this using DOS-style short mode. If the path
43390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43391  # take no chances and rewrite it.
43392  # Note: m4 eats our [], so we need to use [ and ] instead.
43393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43394  if test "x$has_forbidden_chars" != x; then
43395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43397  fi
43398
43399
43400  windows_path="$new_path"
43401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43402    unix_path=`$CYGPATH -u "$windows_path"`
43403    new_path="$unix_path"
43404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43406    new_path="$unix_path"
43407  fi
43408
43409  if test "x$path" != "x$new_path"; then
43410    with_build_devkit="$new_path"
43411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43412$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43413  fi
43414
43415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43417
43418    else
43419      # We're on a unix platform. Hooray! :)
43420      path="$with_build_devkit"
43421      has_space=`$ECHO "$path" | $GREP " "`
43422      if test "x$has_space" != x; then
43423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43424$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43426      fi
43427
43428      # Use eval to expand a potential ~
43429      eval path="$path"
43430      if test ! -f "$path" && test ! -d "$path"; then
43431        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43432      fi
43433
43434      if test -d "$path"; then
43435        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43436      else
43437        dir="`$DIRNAME "$path"`"
43438        base="`$BASENAME "$path"`"
43439        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43440      fi
43441    fi
43442  fi
43443
43444        BUILD_DEVKIT_ROOT="$with_build_devkit"
43445        # Check for a meta data info file in the root of the devkit
43446        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43447          # Process devkit.info so that existing devkit variables are not
43448          # modified by this
43449          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43450              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43451              -e "s/\$host/\$build/g" \
43452              $BUILD_DEVKIT_ROOT/devkit.info \
43453              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43454          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43455          # This potentially sets the following:
43456          # A descriptive name of the devkit
43457
43458  if test "x$BUILD_DEVKIT_NAME" = x; then
43459    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43460  fi
43461
43462          # Corresponds to --with-extra-path
43463
43464  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43465    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43466  fi
43467
43468          # Corresponds to --with-toolchain-path
43469
43470  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43471    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43472  fi
43473
43474          # Corresponds to --with-sysroot
43475
43476  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43477    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43478  fi
43479
43480          # Skip the Window specific parts
43481        fi
43482
43483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43484$as_echo_n "checking for build platform devkit... " >&6; }
43485        if test "x$BUILD_DEVKIT_NAME" != x; then
43486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43487$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43488        else
43489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43490$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43491        fi
43492
43493        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43494
43495  if test "x$BUILD_SYSROOT" != "x"; then
43496    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43497      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43498        # Solaris Studio does not have a concept of sysroot. Instead we must
43499        # make sure the default include and lib dirs are appended to each
43500        # compile and link command line. Must also add -I-xbuiltin to enable
43501        # inlining of system functions and intrinsics.
43502        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43503        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43504            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43505            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43506      fi
43507    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43508      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43509      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43510    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43511      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43512      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43513    fi
43514    # Propagate the sysroot args to hotspot
43515    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43516    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43517    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43518    # The global CFLAGS and LDFLAGS variables need these for configure to function
43519    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43520    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43521    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43522    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43523  fi
43524
43525  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43526    # We also need -iframework<path>/System/Library/Frameworks
43527    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43528    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43529    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43530    # set this here so it doesn't have to be peppered throughout the forest
43531    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43532    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43533  fi
43534
43535
43536
43537
43538
43539         # Fallback default of just /bin if DEVKIT_PATH is not defined
43540        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43541          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43542        fi
43543        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43544      fi
43545    fi
43546
43547    # FIXME: we should list the discovered compilers as an exclude pattern!
43548    # If we do that, we can do this detection before POST_DETECTION, and still
43549    # find the build compilers in the tools dir, if needed.
43550
43551
43552
43553  # Publish this variable in the help.
43554
43555
43556  if [ -z "${BUILD_CC+x}" ]; then
43557    # The variable is not set by user, try to locate tool using the code snippet
43558    for ac_prog in cl cc gcc
43559do
43560  # Extract the first word of "$ac_prog", so it can be a program name with args.
43561set dummy $ac_prog; ac_word=$2
43562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43563$as_echo_n "checking for $ac_word... " >&6; }
43564if ${ac_cv_path_BUILD_CC+:} false; then :
43565  $as_echo_n "(cached) " >&6
43566else
43567  case $BUILD_CC in
43568  [\\/]* | ?:[\\/]*)
43569  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43570  ;;
43571  *)
43572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43573for as_dir in $PATH
43574do
43575  IFS=$as_save_IFS
43576  test -z "$as_dir" && as_dir=.
43577    for ac_exec_ext in '' $ac_executable_extensions; do
43578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43579    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43581    break 2
43582  fi
43583done
43584  done
43585IFS=$as_save_IFS
43586
43587  ;;
43588esac
43589fi
43590BUILD_CC=$ac_cv_path_BUILD_CC
43591if test -n "$BUILD_CC"; then
43592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43593$as_echo "$BUILD_CC" >&6; }
43594else
43595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43596$as_echo "no" >&6; }
43597fi
43598
43599
43600  test -n "$BUILD_CC" && break
43601done
43602
43603  else
43604    # The variable is set, but is it from the command line or the environment?
43605
43606    # Try to remove the string !BUILD_CC! from our list.
43607    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43608    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43609      # If it failed, the variable was not from the command line. Ignore it,
43610      # but warn the user (except for BASH, which is always set by the calling BASH).
43611      if test "xBUILD_CC" != xBASH; then
43612        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43613$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43614      fi
43615      # Try to locate tool using the code snippet
43616      for ac_prog in cl cc gcc
43617do
43618  # Extract the first word of "$ac_prog", so it can be a program name with args.
43619set dummy $ac_prog; ac_word=$2
43620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43621$as_echo_n "checking for $ac_word... " >&6; }
43622if ${ac_cv_path_BUILD_CC+:} false; then :
43623  $as_echo_n "(cached) " >&6
43624else
43625  case $BUILD_CC in
43626  [\\/]* | ?:[\\/]*)
43627  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43628  ;;
43629  *)
43630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43631for as_dir in $PATH
43632do
43633  IFS=$as_save_IFS
43634  test -z "$as_dir" && as_dir=.
43635    for ac_exec_ext in '' $ac_executable_extensions; do
43636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43637    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43639    break 2
43640  fi
43641done
43642  done
43643IFS=$as_save_IFS
43644
43645  ;;
43646esac
43647fi
43648BUILD_CC=$ac_cv_path_BUILD_CC
43649if test -n "$BUILD_CC"; then
43650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43651$as_echo "$BUILD_CC" >&6; }
43652else
43653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43654$as_echo "no" >&6; }
43655fi
43656
43657
43658  test -n "$BUILD_CC" && break
43659done
43660
43661    else
43662      # If it succeeded, then it was overridden by the user. We will use it
43663      # for the tool.
43664
43665      # First remove it from the list of overridden variables, so we can test
43666      # for unknown variables in the end.
43667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43668
43669      # Check if we try to supply an empty value
43670      if test "x$BUILD_CC" = x; then
43671        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43672$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43674$as_echo_n "checking for BUILD_CC... " >&6; }
43675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43676$as_echo "disabled" >&6; }
43677      else
43678        # Check if the provided tool contains a complete path.
43679        tool_specified="$BUILD_CC"
43680        tool_basename="${tool_specified##*/}"
43681        if test "x$tool_basename" = "x$tool_specified"; then
43682          # A command without a complete path is provided, search $PATH.
43683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43684$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43685          # Extract the first word of "$tool_basename", so it can be a program name with args.
43686set dummy $tool_basename; ac_word=$2
43687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43688$as_echo_n "checking for $ac_word... " >&6; }
43689if ${ac_cv_path_BUILD_CC+:} false; then :
43690  $as_echo_n "(cached) " >&6
43691else
43692  case $BUILD_CC in
43693  [\\/]* | ?:[\\/]*)
43694  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43695  ;;
43696  *)
43697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43698for as_dir in $PATH
43699do
43700  IFS=$as_save_IFS
43701  test -z "$as_dir" && as_dir=.
43702    for ac_exec_ext in '' $ac_executable_extensions; do
43703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43704    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43706    break 2
43707  fi
43708done
43709  done
43710IFS=$as_save_IFS
43711
43712  ;;
43713esac
43714fi
43715BUILD_CC=$ac_cv_path_BUILD_CC
43716if test -n "$BUILD_CC"; then
43717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43718$as_echo "$BUILD_CC" >&6; }
43719else
43720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43721$as_echo "no" >&6; }
43722fi
43723
43724
43725          if test "x$BUILD_CC" = x; then
43726            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43727          fi
43728        else
43729          # Otherwise we believe it is a complete path. Use it as it is.
43730          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43731$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43732          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43733$as_echo_n "checking for BUILD_CC... " >&6; }
43734          if test ! -x "$tool_specified"; then
43735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43736$as_echo "not found" >&6; }
43737            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43738          fi
43739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43740$as_echo "$tool_specified" >&6; }
43741        fi
43742      fi
43743    fi
43744
43745  fi
43746
43747
43748
43749  if test "x$BUILD_CC" = x; then
43750    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43751  fi
43752
43753
43754
43755  # Only process if variable expands to non-empty
43756
43757  if test "x$BUILD_CC" != x; then
43758    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43759
43760  # First separate the path from the arguments. This will split at the first
43761  # space.
43762  complete="$BUILD_CC"
43763  path="${complete%% *}"
43764  tmp="$complete EOL"
43765  arguments="${tmp#* }"
43766
43767  # Input might be given as Windows format, start by converting to
43768  # unix format.
43769  new_path=`$CYGPATH -u "$path"`
43770
43771  # Now try to locate executable using which
43772  new_path=`$WHICH "$new_path" 2> /dev/null`
43773  # bat and cmd files are not always considered executable in cygwin causing which
43774  # to not find them
43775  if test "x$new_path" = x \
43776      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43777      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43778    new_path=`$CYGPATH -u "$path"`
43779  fi
43780  if test "x$new_path" = x; then
43781    # Oops. Which didn't find the executable.
43782    # The splitting of arguments from the executable at a space might have been incorrect,
43783    # since paths with space are more likely in Windows. Give it another try with the whole
43784    # argument.
43785    path="$complete"
43786    arguments="EOL"
43787    new_path=`$CYGPATH -u "$path"`
43788    new_path=`$WHICH "$new_path" 2> /dev/null`
43789    # bat and cmd files are not always considered executable in cygwin causing which
43790    # to not find them
43791    if test "x$new_path" = x \
43792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43794      new_path=`$CYGPATH -u "$path"`
43795    fi
43796    if test "x$new_path" = x; then
43797      # It's still not found. Now this is an unrecoverable error.
43798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43799$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43800      has_space=`$ECHO "$complete" | $GREP " "`
43801      if test "x$has_space" != x; then
43802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43804      fi
43805      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43806    fi
43807  fi
43808
43809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43812  # "foo.exe" is OK but "foo" is an error.
43813  #
43814  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43815  # It is also a way to make sure we got the proper file name for the real test later on.
43816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43817  if test "x$test_shortpath" = x; then
43818    # Short path failed, file does not exist as specified.
43819    # Try adding .exe or .cmd
43820    if test -f "${new_path}.exe"; then
43821      input_to_shortpath="${new_path}.exe"
43822    elif test -f "${new_path}.cmd"; then
43823      input_to_shortpath="${new_path}.cmd"
43824    else
43825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43826$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43827      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43828$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43829      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43830    fi
43831  else
43832    input_to_shortpath="$new_path"
43833  fi
43834
43835  # Call helper function which possibly converts this using DOS-style short mode.
43836  # If so, the updated path is stored in $new_path.
43837  new_path="$input_to_shortpath"
43838
43839  input_path="$input_to_shortpath"
43840  # Check if we need to convert this using DOS-style short mode. If the path
43841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43842  # take no chances and rewrite it.
43843  # Note: m4 eats our [], so we need to use [ and ] instead.
43844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43845  if test "x$has_forbidden_chars" != x; then
43846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43850      # Going to short mode and back again did indeed matter. Since short mode is
43851      # case insensitive, let's make it lowercase to improve readability.
43852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43853      # Now convert it back to Unix-style (cygpath)
43854      input_path=`$CYGPATH -u "$shortmode_path"`
43855      new_path="$input_path"
43856    fi
43857  fi
43858
43859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43860  if test "x$test_cygdrive_prefix" = x; then
43861    # As a simple fix, exclude /usr/bin since it's not a real path.
43862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43864      # a path prefixed by /cygdrive for fixpath to work.
43865      new_path="$CYGWIN_ROOT_PATH$input_path"
43866    fi
43867  fi
43868
43869  # remove trailing .exe if any
43870  new_path="${new_path/%.exe/}"
43871
43872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43873
43874  # First separate the path from the arguments. This will split at the first
43875  # space.
43876  complete="$BUILD_CC"
43877  path="${complete%% *}"
43878  tmp="$complete EOL"
43879  arguments="${tmp#* }"
43880
43881  # Input might be given as Windows format, start by converting to
43882  # unix format.
43883  new_path="$path"
43884
43885  windows_path="$new_path"
43886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43887    unix_path=`$CYGPATH -u "$windows_path"`
43888    new_path="$unix_path"
43889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43891    new_path="$unix_path"
43892  fi
43893
43894
43895  # Now try to locate executable using which
43896  new_path=`$WHICH "$new_path" 2> /dev/null`
43897
43898  if test "x$new_path" = x; then
43899    # Oops. Which didn't find the executable.
43900    # The splitting of arguments from the executable at a space might have been incorrect,
43901    # since paths with space are more likely in Windows. Give it another try with the whole
43902    # argument.
43903    path="$complete"
43904    arguments="EOL"
43905    new_path="$path"
43906
43907  windows_path="$new_path"
43908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43909    unix_path=`$CYGPATH -u "$windows_path"`
43910    new_path="$unix_path"
43911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43913    new_path="$unix_path"
43914  fi
43915
43916
43917    new_path=`$WHICH "$new_path" 2> /dev/null`
43918    # bat and cmd files are not always considered executable in MSYS causing which
43919    # to not find them
43920    if test "x$new_path" = x \
43921        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43922        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43923      new_path="$path"
43924
43925  windows_path="$new_path"
43926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43927    unix_path=`$CYGPATH -u "$windows_path"`
43928    new_path="$unix_path"
43929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43931    new_path="$unix_path"
43932  fi
43933
43934    fi
43935
43936    if test "x$new_path" = x; then
43937      # It's still not found. Now this is an unrecoverable error.
43938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43939$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43940      has_space=`$ECHO "$complete" | $GREP " "`
43941      if test "x$has_space" != x; then
43942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43944      fi
43945      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43946    fi
43947  fi
43948
43949  # Now new_path has a complete unix path to the binary
43950  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43951    # Keep paths in /bin as-is, but remove trailing .exe if any
43952    new_path="${new_path/%.exe/}"
43953    # Do not save /bin paths to all_fixpath_prefixes!
43954  else
43955    # Not in mixed or Windows style, start by that.
43956    new_path=`cmd //c echo $new_path`
43957
43958  input_path="$new_path"
43959  # Check if we need to convert this using DOS-style short mode. If the path
43960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43961  # take no chances and rewrite it.
43962  # Note: m4 eats our [], so we need to use [ and ] instead.
43963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43964  if test "x$has_forbidden_chars" != x; then
43965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43967  fi
43968
43969    # Output is in $new_path
43970
43971  windows_path="$new_path"
43972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43973    unix_path=`$CYGPATH -u "$windows_path"`
43974    new_path="$unix_path"
43975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43977    new_path="$unix_path"
43978  fi
43979
43980    # remove trailing .exe if any
43981    new_path="${new_path/%.exe/}"
43982
43983    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43984    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43985  fi
43986
43987    else
43988      # We're on a unix platform. Hooray! :)
43989      # First separate the path from the arguments. This will split at the first
43990      # space.
43991      complete="$BUILD_CC"
43992      path="${complete%% *}"
43993      tmp="$complete EOL"
43994      arguments="${tmp#* }"
43995
43996      # Cannot rely on the command "which" here since it doesn't always work.
43997      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43998      if test -z "$is_absolute_path"; then
43999        # Path to executable is not absolute. Find it.
44000        IFS_save="$IFS"
44001        IFS=:
44002        for p in $PATH; do
44003          if test -f "$p/$path" && test -x "$p/$path"; then
44004            new_path="$p/$path"
44005            break
44006          fi
44007        done
44008        IFS="$IFS_save"
44009      else
44010        # This is an absolute path, we can use it without further modifications.
44011        new_path="$path"
44012      fi
44013
44014      if test "x$new_path" = x; then
44015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44016$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44017        has_space=`$ECHO "$complete" | $GREP " "`
44018        if test "x$has_space" != x; then
44019          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44020$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44021        fi
44022        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44023      fi
44024    fi
44025
44026    # Now join together the path and the arguments once again
44027    if test "x$arguments" != xEOL; then
44028      new_complete="$new_path ${arguments% *}"
44029    else
44030      new_complete="$new_path"
44031    fi
44032
44033    if test "x$complete" != "x$new_complete"; then
44034      BUILD_CC="$new_complete"
44035      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44036$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44037    fi
44038  fi
44039
44040
44041
44042
44043  # Publish this variable in the help.
44044
44045
44046  if [ -z "${BUILD_CXX+x}" ]; then
44047    # The variable is not set by user, try to locate tool using the code snippet
44048    for ac_prog in cl CC g++
44049do
44050  # Extract the first word of "$ac_prog", so it can be a program name with args.
44051set dummy $ac_prog; ac_word=$2
44052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44053$as_echo_n "checking for $ac_word... " >&6; }
44054if ${ac_cv_path_BUILD_CXX+:} false; then :
44055  $as_echo_n "(cached) " >&6
44056else
44057  case $BUILD_CXX in
44058  [\\/]* | ?:[\\/]*)
44059  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44060  ;;
44061  *)
44062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44063for as_dir in $PATH
44064do
44065  IFS=$as_save_IFS
44066  test -z "$as_dir" && as_dir=.
44067    for ac_exec_ext in '' $ac_executable_extensions; do
44068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44069    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44071    break 2
44072  fi
44073done
44074  done
44075IFS=$as_save_IFS
44076
44077  ;;
44078esac
44079fi
44080BUILD_CXX=$ac_cv_path_BUILD_CXX
44081if test -n "$BUILD_CXX"; then
44082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44083$as_echo "$BUILD_CXX" >&6; }
44084else
44085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44086$as_echo "no" >&6; }
44087fi
44088
44089
44090  test -n "$BUILD_CXX" && break
44091done
44092
44093  else
44094    # The variable is set, but is it from the command line or the environment?
44095
44096    # Try to remove the string !BUILD_CXX! from our list.
44097    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44098    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44099      # If it failed, the variable was not from the command line. Ignore it,
44100      # but warn the user (except for BASH, which is always set by the calling BASH).
44101      if test "xBUILD_CXX" != xBASH; then
44102        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44103$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44104      fi
44105      # Try to locate tool using the code snippet
44106      for ac_prog in cl CC g++
44107do
44108  # Extract the first word of "$ac_prog", so it can be a program name with args.
44109set dummy $ac_prog; ac_word=$2
44110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44111$as_echo_n "checking for $ac_word... " >&6; }
44112if ${ac_cv_path_BUILD_CXX+:} false; then :
44113  $as_echo_n "(cached) " >&6
44114else
44115  case $BUILD_CXX in
44116  [\\/]* | ?:[\\/]*)
44117  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44118  ;;
44119  *)
44120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44121for as_dir in $PATH
44122do
44123  IFS=$as_save_IFS
44124  test -z "$as_dir" && as_dir=.
44125    for ac_exec_ext in '' $ac_executable_extensions; do
44126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44127    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44129    break 2
44130  fi
44131done
44132  done
44133IFS=$as_save_IFS
44134
44135  ;;
44136esac
44137fi
44138BUILD_CXX=$ac_cv_path_BUILD_CXX
44139if test -n "$BUILD_CXX"; then
44140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44141$as_echo "$BUILD_CXX" >&6; }
44142else
44143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44144$as_echo "no" >&6; }
44145fi
44146
44147
44148  test -n "$BUILD_CXX" && break
44149done
44150
44151    else
44152      # If it succeeded, then it was overridden by the user. We will use it
44153      # for the tool.
44154
44155      # First remove it from the list of overridden variables, so we can test
44156      # for unknown variables in the end.
44157      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44158
44159      # Check if we try to supply an empty value
44160      if test "x$BUILD_CXX" = x; then
44161        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44162$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44163        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44164$as_echo_n "checking for BUILD_CXX... " >&6; }
44165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44166$as_echo "disabled" >&6; }
44167      else
44168        # Check if the provided tool contains a complete path.
44169        tool_specified="$BUILD_CXX"
44170        tool_basename="${tool_specified##*/}"
44171        if test "x$tool_basename" = "x$tool_specified"; then
44172          # A command without a complete path is provided, search $PATH.
44173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44174$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44175          # Extract the first word of "$tool_basename", so it can be a program name with args.
44176set dummy $tool_basename; ac_word=$2
44177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44178$as_echo_n "checking for $ac_word... " >&6; }
44179if ${ac_cv_path_BUILD_CXX+:} false; then :
44180  $as_echo_n "(cached) " >&6
44181else
44182  case $BUILD_CXX in
44183  [\\/]* | ?:[\\/]*)
44184  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44185  ;;
44186  *)
44187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44188for as_dir in $PATH
44189do
44190  IFS=$as_save_IFS
44191  test -z "$as_dir" && as_dir=.
44192    for ac_exec_ext in '' $ac_executable_extensions; do
44193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44194    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44196    break 2
44197  fi
44198done
44199  done
44200IFS=$as_save_IFS
44201
44202  ;;
44203esac
44204fi
44205BUILD_CXX=$ac_cv_path_BUILD_CXX
44206if test -n "$BUILD_CXX"; then
44207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44208$as_echo "$BUILD_CXX" >&6; }
44209else
44210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44211$as_echo "no" >&6; }
44212fi
44213
44214
44215          if test "x$BUILD_CXX" = x; then
44216            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44217          fi
44218        else
44219          # Otherwise we believe it is a complete path. Use it as it is.
44220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44221$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44222          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44223$as_echo_n "checking for BUILD_CXX... " >&6; }
44224          if test ! -x "$tool_specified"; then
44225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44226$as_echo "not found" >&6; }
44227            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44228          fi
44229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44230$as_echo "$tool_specified" >&6; }
44231        fi
44232      fi
44233    fi
44234
44235  fi
44236
44237
44238
44239  if test "x$BUILD_CXX" = x; then
44240    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44241  fi
44242
44243
44244
44245  # Only process if variable expands to non-empty
44246
44247  if test "x$BUILD_CXX" != x; then
44248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44249
44250  # First separate the path from the arguments. This will split at the first
44251  # space.
44252  complete="$BUILD_CXX"
44253  path="${complete%% *}"
44254  tmp="$complete EOL"
44255  arguments="${tmp#* }"
44256
44257  # Input might be given as Windows format, start by converting to
44258  # unix format.
44259  new_path=`$CYGPATH -u "$path"`
44260
44261  # Now try to locate executable using which
44262  new_path=`$WHICH "$new_path" 2> /dev/null`
44263  # bat and cmd files are not always considered executable in cygwin causing which
44264  # to not find them
44265  if test "x$new_path" = x \
44266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44268    new_path=`$CYGPATH -u "$path"`
44269  fi
44270  if test "x$new_path" = x; then
44271    # Oops. Which didn't find the executable.
44272    # The splitting of arguments from the executable at a space might have been incorrect,
44273    # since paths with space are more likely in Windows. Give it another try with the whole
44274    # argument.
44275    path="$complete"
44276    arguments="EOL"
44277    new_path=`$CYGPATH -u "$path"`
44278    new_path=`$WHICH "$new_path" 2> /dev/null`
44279    # bat and cmd files are not always considered executable in cygwin causing which
44280    # to not find them
44281    if test "x$new_path" = x \
44282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44284      new_path=`$CYGPATH -u "$path"`
44285    fi
44286    if test "x$new_path" = x; then
44287      # It's still not found. Now this is an unrecoverable error.
44288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44289$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44290      has_space=`$ECHO "$complete" | $GREP " "`
44291      if test "x$has_space" != x; then
44292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44294      fi
44295      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44296    fi
44297  fi
44298
44299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44302  # "foo.exe" is OK but "foo" is an error.
44303  #
44304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44305  # It is also a way to make sure we got the proper file name for the real test later on.
44306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44307  if test "x$test_shortpath" = x; then
44308    # Short path failed, file does not exist as specified.
44309    # Try adding .exe or .cmd
44310    if test -f "${new_path}.exe"; then
44311      input_to_shortpath="${new_path}.exe"
44312    elif test -f "${new_path}.cmd"; then
44313      input_to_shortpath="${new_path}.cmd"
44314    else
44315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44316$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44319      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44320    fi
44321  else
44322    input_to_shortpath="$new_path"
44323  fi
44324
44325  # Call helper function which possibly converts this using DOS-style short mode.
44326  # If so, the updated path is stored in $new_path.
44327  new_path="$input_to_shortpath"
44328
44329  input_path="$input_to_shortpath"
44330  # Check if we need to convert this using DOS-style short mode. If the path
44331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44332  # take no chances and rewrite it.
44333  # Note: m4 eats our [], so we need to use [ and ] instead.
44334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44335  if test "x$has_forbidden_chars" != x; then
44336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44340      # Going to short mode and back again did indeed matter. Since short mode is
44341      # case insensitive, let's make it lowercase to improve readability.
44342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44343      # Now convert it back to Unix-style (cygpath)
44344      input_path=`$CYGPATH -u "$shortmode_path"`
44345      new_path="$input_path"
44346    fi
44347  fi
44348
44349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44350  if test "x$test_cygdrive_prefix" = x; then
44351    # As a simple fix, exclude /usr/bin since it's not a real path.
44352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44354      # a path prefixed by /cygdrive for fixpath to work.
44355      new_path="$CYGWIN_ROOT_PATH$input_path"
44356    fi
44357  fi
44358
44359  # remove trailing .exe if any
44360  new_path="${new_path/%.exe/}"
44361
44362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44363
44364  # First separate the path from the arguments. This will split at the first
44365  # space.
44366  complete="$BUILD_CXX"
44367  path="${complete%% *}"
44368  tmp="$complete EOL"
44369  arguments="${tmp#* }"
44370
44371  # Input might be given as Windows format, start by converting to
44372  # unix format.
44373  new_path="$path"
44374
44375  windows_path="$new_path"
44376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44377    unix_path=`$CYGPATH -u "$windows_path"`
44378    new_path="$unix_path"
44379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44381    new_path="$unix_path"
44382  fi
44383
44384
44385  # Now try to locate executable using which
44386  new_path=`$WHICH "$new_path" 2> /dev/null`
44387
44388  if test "x$new_path" = x; then
44389    # Oops. Which didn't find the executable.
44390    # The splitting of arguments from the executable at a space might have been incorrect,
44391    # since paths with space are more likely in Windows. Give it another try with the whole
44392    # argument.
44393    path="$complete"
44394    arguments="EOL"
44395    new_path="$path"
44396
44397  windows_path="$new_path"
44398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44399    unix_path=`$CYGPATH -u "$windows_path"`
44400    new_path="$unix_path"
44401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44403    new_path="$unix_path"
44404  fi
44405
44406
44407    new_path=`$WHICH "$new_path" 2> /dev/null`
44408    # bat and cmd files are not always considered executable in MSYS causing which
44409    # to not find them
44410    if test "x$new_path" = x \
44411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44413      new_path="$path"
44414
44415  windows_path="$new_path"
44416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44417    unix_path=`$CYGPATH -u "$windows_path"`
44418    new_path="$unix_path"
44419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44421    new_path="$unix_path"
44422  fi
44423
44424    fi
44425
44426    if test "x$new_path" = x; then
44427      # It's still not found. Now this is an unrecoverable error.
44428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44429$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44430      has_space=`$ECHO "$complete" | $GREP " "`
44431      if test "x$has_space" != x; then
44432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44434      fi
44435      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44436    fi
44437  fi
44438
44439  # Now new_path has a complete unix path to the binary
44440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44441    # Keep paths in /bin as-is, but remove trailing .exe if any
44442    new_path="${new_path/%.exe/}"
44443    # Do not save /bin paths to all_fixpath_prefixes!
44444  else
44445    # Not in mixed or Windows style, start by that.
44446    new_path=`cmd //c echo $new_path`
44447
44448  input_path="$new_path"
44449  # Check if we need to convert this using DOS-style short mode. If the path
44450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44451  # take no chances and rewrite it.
44452  # Note: m4 eats our [], so we need to use [ and ] instead.
44453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44454  if test "x$has_forbidden_chars" != x; then
44455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44457  fi
44458
44459    # Output is in $new_path
44460
44461  windows_path="$new_path"
44462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44463    unix_path=`$CYGPATH -u "$windows_path"`
44464    new_path="$unix_path"
44465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44467    new_path="$unix_path"
44468  fi
44469
44470    # remove trailing .exe if any
44471    new_path="${new_path/%.exe/}"
44472
44473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44475  fi
44476
44477    else
44478      # We're on a unix platform. Hooray! :)
44479      # First separate the path from the arguments. This will split at the first
44480      # space.
44481      complete="$BUILD_CXX"
44482      path="${complete%% *}"
44483      tmp="$complete EOL"
44484      arguments="${tmp#* }"
44485
44486      # Cannot rely on the command "which" here since it doesn't always work.
44487      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44488      if test -z "$is_absolute_path"; then
44489        # Path to executable is not absolute. Find it.
44490        IFS_save="$IFS"
44491        IFS=:
44492        for p in $PATH; do
44493          if test -f "$p/$path" && test -x "$p/$path"; then
44494            new_path="$p/$path"
44495            break
44496          fi
44497        done
44498        IFS="$IFS_save"
44499      else
44500        # This is an absolute path, we can use it without further modifications.
44501        new_path="$path"
44502      fi
44503
44504      if test "x$new_path" = x; then
44505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44506$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44507        has_space=`$ECHO "$complete" | $GREP " "`
44508        if test "x$has_space" != x; then
44509          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44511        fi
44512        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44513      fi
44514    fi
44515
44516    # Now join together the path and the arguments once again
44517    if test "x$arguments" != xEOL; then
44518      new_complete="$new_path ${arguments% *}"
44519    else
44520      new_complete="$new_path"
44521    fi
44522
44523    if test "x$complete" != "x$new_complete"; then
44524      BUILD_CXX="$new_complete"
44525      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44526$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44527    fi
44528  fi
44529
44530
44531
44532  # Publish this variable in the help.
44533
44534
44535  if [ -z "${BUILD_NM+x}" ]; then
44536    # The variable is not set by user, try to locate tool using the code snippet
44537    for ac_prog in nm gcc-nm
44538do
44539  # Extract the first word of "$ac_prog", so it can be a program name with args.
44540set dummy $ac_prog; ac_word=$2
44541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44542$as_echo_n "checking for $ac_word... " >&6; }
44543if ${ac_cv_path_BUILD_NM+:} false; then :
44544  $as_echo_n "(cached) " >&6
44545else
44546  case $BUILD_NM in
44547  [\\/]* | ?:[\\/]*)
44548  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44549  ;;
44550  *)
44551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44552for as_dir in $PATH
44553do
44554  IFS=$as_save_IFS
44555  test -z "$as_dir" && as_dir=.
44556    for ac_exec_ext in '' $ac_executable_extensions; do
44557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44558    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44560    break 2
44561  fi
44562done
44563  done
44564IFS=$as_save_IFS
44565
44566  ;;
44567esac
44568fi
44569BUILD_NM=$ac_cv_path_BUILD_NM
44570if test -n "$BUILD_NM"; then
44571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44572$as_echo "$BUILD_NM" >&6; }
44573else
44574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44575$as_echo "no" >&6; }
44576fi
44577
44578
44579  test -n "$BUILD_NM" && break
44580done
44581
44582  else
44583    # The variable is set, but is it from the command line or the environment?
44584
44585    # Try to remove the string !BUILD_NM! from our list.
44586    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44587    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44588      # If it failed, the variable was not from the command line. Ignore it,
44589      # but warn the user (except for BASH, which is always set by the calling BASH).
44590      if test "xBUILD_NM" != xBASH; then
44591        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44592$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44593      fi
44594      # Try to locate tool using the code snippet
44595      for ac_prog in nm gcc-nm
44596do
44597  # Extract the first word of "$ac_prog", so it can be a program name with args.
44598set dummy $ac_prog; ac_word=$2
44599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44600$as_echo_n "checking for $ac_word... " >&6; }
44601if ${ac_cv_path_BUILD_NM+:} false; then :
44602  $as_echo_n "(cached) " >&6
44603else
44604  case $BUILD_NM in
44605  [\\/]* | ?:[\\/]*)
44606  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44607  ;;
44608  *)
44609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44610for as_dir in $PATH
44611do
44612  IFS=$as_save_IFS
44613  test -z "$as_dir" && as_dir=.
44614    for ac_exec_ext in '' $ac_executable_extensions; do
44615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44616    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44618    break 2
44619  fi
44620done
44621  done
44622IFS=$as_save_IFS
44623
44624  ;;
44625esac
44626fi
44627BUILD_NM=$ac_cv_path_BUILD_NM
44628if test -n "$BUILD_NM"; then
44629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44630$as_echo "$BUILD_NM" >&6; }
44631else
44632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44633$as_echo "no" >&6; }
44634fi
44635
44636
44637  test -n "$BUILD_NM" && break
44638done
44639
44640    else
44641      # If it succeeded, then it was overridden by the user. We will use it
44642      # for the tool.
44643
44644      # First remove it from the list of overridden variables, so we can test
44645      # for unknown variables in the end.
44646      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44647
44648      # Check if we try to supply an empty value
44649      if test "x$BUILD_NM" = x; then
44650        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44651$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44652        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44653$as_echo_n "checking for BUILD_NM... " >&6; }
44654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44655$as_echo "disabled" >&6; }
44656      else
44657        # Check if the provided tool contains a complete path.
44658        tool_specified="$BUILD_NM"
44659        tool_basename="${tool_specified##*/}"
44660        if test "x$tool_basename" = "x$tool_specified"; then
44661          # A command without a complete path is provided, search $PATH.
44662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44663$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44664          # Extract the first word of "$tool_basename", so it can be a program name with args.
44665set dummy $tool_basename; ac_word=$2
44666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44667$as_echo_n "checking for $ac_word... " >&6; }
44668if ${ac_cv_path_BUILD_NM+:} false; then :
44669  $as_echo_n "(cached) " >&6
44670else
44671  case $BUILD_NM in
44672  [\\/]* | ?:[\\/]*)
44673  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44674  ;;
44675  *)
44676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44677for as_dir in $PATH
44678do
44679  IFS=$as_save_IFS
44680  test -z "$as_dir" && as_dir=.
44681    for ac_exec_ext in '' $ac_executable_extensions; do
44682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44683    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44685    break 2
44686  fi
44687done
44688  done
44689IFS=$as_save_IFS
44690
44691  ;;
44692esac
44693fi
44694BUILD_NM=$ac_cv_path_BUILD_NM
44695if test -n "$BUILD_NM"; then
44696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44697$as_echo "$BUILD_NM" >&6; }
44698else
44699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44700$as_echo "no" >&6; }
44701fi
44702
44703
44704          if test "x$BUILD_NM" = x; then
44705            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44706          fi
44707        else
44708          # Otherwise we believe it is a complete path. Use it as it is.
44709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44710$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44711          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44712$as_echo_n "checking for BUILD_NM... " >&6; }
44713          if test ! -x "$tool_specified"; then
44714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44715$as_echo "not found" >&6; }
44716            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44717          fi
44718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44719$as_echo "$tool_specified" >&6; }
44720        fi
44721      fi
44722    fi
44723
44724  fi
44725
44726
44727
44728  # Only process if variable expands to non-empty
44729
44730  if test "x$BUILD_NM" != x; then
44731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44732
44733  # First separate the path from the arguments. This will split at the first
44734  # space.
44735  complete="$BUILD_NM"
44736  path="${complete%% *}"
44737  tmp="$complete EOL"
44738  arguments="${tmp#* }"
44739
44740  # Input might be given as Windows format, start by converting to
44741  # unix format.
44742  new_path=`$CYGPATH -u "$path"`
44743
44744  # Now try to locate executable using which
44745  new_path=`$WHICH "$new_path" 2> /dev/null`
44746  # bat and cmd files are not always considered executable in cygwin causing which
44747  # to not find them
44748  if test "x$new_path" = x \
44749      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44750      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44751    new_path=`$CYGPATH -u "$path"`
44752  fi
44753  if test "x$new_path" = x; then
44754    # Oops. Which didn't find the executable.
44755    # The splitting of arguments from the executable at a space might have been incorrect,
44756    # since paths with space are more likely in Windows. Give it another try with the whole
44757    # argument.
44758    path="$complete"
44759    arguments="EOL"
44760    new_path=`$CYGPATH -u "$path"`
44761    new_path=`$WHICH "$new_path" 2> /dev/null`
44762    # bat and cmd files are not always considered executable in cygwin causing which
44763    # to not find them
44764    if test "x$new_path" = x \
44765        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44766        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44767      new_path=`$CYGPATH -u "$path"`
44768    fi
44769    if test "x$new_path" = x; then
44770      # It's still not found. Now this is an unrecoverable error.
44771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44772$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44773      has_space=`$ECHO "$complete" | $GREP " "`
44774      if test "x$has_space" != x; then
44775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44777      fi
44778      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44779    fi
44780  fi
44781
44782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44785  # "foo.exe" is OK but "foo" is an error.
44786  #
44787  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44788  # It is also a way to make sure we got the proper file name for the real test later on.
44789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44790  if test "x$test_shortpath" = x; then
44791    # Short path failed, file does not exist as specified.
44792    # Try adding .exe or .cmd
44793    if test -f "${new_path}.exe"; then
44794      input_to_shortpath="${new_path}.exe"
44795    elif test -f "${new_path}.cmd"; then
44796      input_to_shortpath="${new_path}.cmd"
44797    else
44798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44799$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44800      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44801$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44802      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44803    fi
44804  else
44805    input_to_shortpath="$new_path"
44806  fi
44807
44808  # Call helper function which possibly converts this using DOS-style short mode.
44809  # If so, the updated path is stored in $new_path.
44810  new_path="$input_to_shortpath"
44811
44812  input_path="$input_to_shortpath"
44813  # Check if we need to convert this using DOS-style short mode. If the path
44814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44815  # take no chances and rewrite it.
44816  # Note: m4 eats our [], so we need to use [ and ] instead.
44817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44818  if test "x$has_forbidden_chars" != x; then
44819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44823      # Going to short mode and back again did indeed matter. Since short mode is
44824      # case insensitive, let's make it lowercase to improve readability.
44825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44826      # Now convert it back to Unix-style (cygpath)
44827      input_path=`$CYGPATH -u "$shortmode_path"`
44828      new_path="$input_path"
44829    fi
44830  fi
44831
44832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44833  if test "x$test_cygdrive_prefix" = x; then
44834    # As a simple fix, exclude /usr/bin since it's not a real path.
44835    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44837      # a path prefixed by /cygdrive for fixpath to work.
44838      new_path="$CYGWIN_ROOT_PATH$input_path"
44839    fi
44840  fi
44841
44842  # remove trailing .exe if any
44843  new_path="${new_path/%.exe/}"
44844
44845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44846
44847  # First separate the path from the arguments. This will split at the first
44848  # space.
44849  complete="$BUILD_NM"
44850  path="${complete%% *}"
44851  tmp="$complete EOL"
44852  arguments="${tmp#* }"
44853
44854  # Input might be given as Windows format, start by converting to
44855  # unix format.
44856  new_path="$path"
44857
44858  windows_path="$new_path"
44859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44860    unix_path=`$CYGPATH -u "$windows_path"`
44861    new_path="$unix_path"
44862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44864    new_path="$unix_path"
44865  fi
44866
44867
44868  # Now try to locate executable using which
44869  new_path=`$WHICH "$new_path" 2> /dev/null`
44870
44871  if test "x$new_path" = x; then
44872    # Oops. Which didn't find the executable.
44873    # The splitting of arguments from the executable at a space might have been incorrect,
44874    # since paths with space are more likely in Windows. Give it another try with the whole
44875    # argument.
44876    path="$complete"
44877    arguments="EOL"
44878    new_path="$path"
44879
44880  windows_path="$new_path"
44881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44882    unix_path=`$CYGPATH -u "$windows_path"`
44883    new_path="$unix_path"
44884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44886    new_path="$unix_path"
44887  fi
44888
44889
44890    new_path=`$WHICH "$new_path" 2> /dev/null`
44891    # bat and cmd files are not always considered executable in MSYS causing which
44892    # to not find them
44893    if test "x$new_path" = x \
44894        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44895        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44896      new_path="$path"
44897
44898  windows_path="$new_path"
44899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44900    unix_path=`$CYGPATH -u "$windows_path"`
44901    new_path="$unix_path"
44902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44904    new_path="$unix_path"
44905  fi
44906
44907    fi
44908
44909    if test "x$new_path" = x; then
44910      # It's still not found. Now this is an unrecoverable error.
44911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44912$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44913      has_space=`$ECHO "$complete" | $GREP " "`
44914      if test "x$has_space" != x; then
44915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44917      fi
44918      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44919    fi
44920  fi
44921
44922  # Now new_path has a complete unix path to the binary
44923  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44924    # Keep paths in /bin as-is, but remove trailing .exe if any
44925    new_path="${new_path/%.exe/}"
44926    # Do not save /bin paths to all_fixpath_prefixes!
44927  else
44928    # Not in mixed or Windows style, start by that.
44929    new_path=`cmd //c echo $new_path`
44930
44931  input_path="$new_path"
44932  # Check if we need to convert this using DOS-style short mode. If the path
44933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44934  # take no chances and rewrite it.
44935  # Note: m4 eats our [], so we need to use [ and ] instead.
44936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44937  if test "x$has_forbidden_chars" != x; then
44938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44940  fi
44941
44942    # Output is in $new_path
44943
44944  windows_path="$new_path"
44945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44946    unix_path=`$CYGPATH -u "$windows_path"`
44947    new_path="$unix_path"
44948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44950    new_path="$unix_path"
44951  fi
44952
44953    # remove trailing .exe if any
44954    new_path="${new_path/%.exe/}"
44955
44956    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44957    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44958  fi
44959
44960    else
44961      # We're on a unix platform. Hooray! :)
44962      # First separate the path from the arguments. This will split at the first
44963      # space.
44964      complete="$BUILD_NM"
44965      path="${complete%% *}"
44966      tmp="$complete EOL"
44967      arguments="${tmp#* }"
44968
44969      # Cannot rely on the command "which" here since it doesn't always work.
44970      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44971      if test -z "$is_absolute_path"; then
44972        # Path to executable is not absolute. Find it.
44973        IFS_save="$IFS"
44974        IFS=:
44975        for p in $PATH; do
44976          if test -f "$p/$path" && test -x "$p/$path"; then
44977            new_path="$p/$path"
44978            break
44979          fi
44980        done
44981        IFS="$IFS_save"
44982      else
44983        # This is an absolute path, we can use it without further modifications.
44984        new_path="$path"
44985      fi
44986
44987      if test "x$new_path" = x; then
44988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44989$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44990        has_space=`$ECHO "$complete" | $GREP " "`
44991        if test "x$has_space" != x; then
44992          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44993$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44994        fi
44995        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44996      fi
44997    fi
44998
44999    # Now join together the path and the arguments once again
45000    if test "x$arguments" != xEOL; then
45001      new_complete="$new_path ${arguments% *}"
45002    else
45003      new_complete="$new_path"
45004    fi
45005
45006    if test "x$complete" != "x$new_complete"; then
45007      BUILD_NM="$new_complete"
45008      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45009$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45010    fi
45011  fi
45012
45013
45014
45015  # Publish this variable in the help.
45016
45017
45018  if [ -z "${BUILD_AR+x}" ]; then
45019    # The variable is not set by user, try to locate tool using the code snippet
45020    for ac_prog in ar gcc-ar
45021do
45022  # Extract the first word of "$ac_prog", so it can be a program name with args.
45023set dummy $ac_prog; ac_word=$2
45024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45025$as_echo_n "checking for $ac_word... " >&6; }
45026if ${ac_cv_path_BUILD_AR+:} false; then :
45027  $as_echo_n "(cached) " >&6
45028else
45029  case $BUILD_AR in
45030  [\\/]* | ?:[\\/]*)
45031  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45032  ;;
45033  *)
45034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45035for as_dir in $PATH
45036do
45037  IFS=$as_save_IFS
45038  test -z "$as_dir" && as_dir=.
45039    for ac_exec_ext in '' $ac_executable_extensions; do
45040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45041    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45043    break 2
45044  fi
45045done
45046  done
45047IFS=$as_save_IFS
45048
45049  ;;
45050esac
45051fi
45052BUILD_AR=$ac_cv_path_BUILD_AR
45053if test -n "$BUILD_AR"; then
45054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45055$as_echo "$BUILD_AR" >&6; }
45056else
45057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45058$as_echo "no" >&6; }
45059fi
45060
45061
45062  test -n "$BUILD_AR" && break
45063done
45064
45065  else
45066    # The variable is set, but is it from the command line or the environment?
45067
45068    # Try to remove the string !BUILD_AR! from our list.
45069    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45070    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45071      # If it failed, the variable was not from the command line. Ignore it,
45072      # but warn the user (except for BASH, which is always set by the calling BASH).
45073      if test "xBUILD_AR" != xBASH; then
45074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45075$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45076      fi
45077      # Try to locate tool using the code snippet
45078      for ac_prog in ar gcc-ar
45079do
45080  # Extract the first word of "$ac_prog", so it can be a program name with args.
45081set dummy $ac_prog; ac_word=$2
45082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45083$as_echo_n "checking for $ac_word... " >&6; }
45084if ${ac_cv_path_BUILD_AR+:} false; then :
45085  $as_echo_n "(cached) " >&6
45086else
45087  case $BUILD_AR in
45088  [\\/]* | ?:[\\/]*)
45089  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45090  ;;
45091  *)
45092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45093for as_dir in $PATH
45094do
45095  IFS=$as_save_IFS
45096  test -z "$as_dir" && as_dir=.
45097    for ac_exec_ext in '' $ac_executable_extensions; do
45098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45099    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45101    break 2
45102  fi
45103done
45104  done
45105IFS=$as_save_IFS
45106
45107  ;;
45108esac
45109fi
45110BUILD_AR=$ac_cv_path_BUILD_AR
45111if test -n "$BUILD_AR"; then
45112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45113$as_echo "$BUILD_AR" >&6; }
45114else
45115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45116$as_echo "no" >&6; }
45117fi
45118
45119
45120  test -n "$BUILD_AR" && break
45121done
45122
45123    else
45124      # If it succeeded, then it was overridden by the user. We will use it
45125      # for the tool.
45126
45127      # First remove it from the list of overridden variables, so we can test
45128      # for unknown variables in the end.
45129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45130
45131      # Check if we try to supply an empty value
45132      if test "x$BUILD_AR" = x; then
45133        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45134$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45136$as_echo_n "checking for BUILD_AR... " >&6; }
45137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45138$as_echo "disabled" >&6; }
45139      else
45140        # Check if the provided tool contains a complete path.
45141        tool_specified="$BUILD_AR"
45142        tool_basename="${tool_specified##*/}"
45143        if test "x$tool_basename" = "x$tool_specified"; then
45144          # A command without a complete path is provided, search $PATH.
45145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45146$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45147          # Extract the first word of "$tool_basename", so it can be a program name with args.
45148set dummy $tool_basename; ac_word=$2
45149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45150$as_echo_n "checking for $ac_word... " >&6; }
45151if ${ac_cv_path_BUILD_AR+:} false; then :
45152  $as_echo_n "(cached) " >&6
45153else
45154  case $BUILD_AR in
45155  [\\/]* | ?:[\\/]*)
45156  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45157  ;;
45158  *)
45159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45160for as_dir in $PATH
45161do
45162  IFS=$as_save_IFS
45163  test -z "$as_dir" && as_dir=.
45164    for ac_exec_ext in '' $ac_executable_extensions; do
45165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45166    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45168    break 2
45169  fi
45170done
45171  done
45172IFS=$as_save_IFS
45173
45174  ;;
45175esac
45176fi
45177BUILD_AR=$ac_cv_path_BUILD_AR
45178if test -n "$BUILD_AR"; then
45179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45180$as_echo "$BUILD_AR" >&6; }
45181else
45182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45183$as_echo "no" >&6; }
45184fi
45185
45186
45187          if test "x$BUILD_AR" = x; then
45188            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45189          fi
45190        else
45191          # Otherwise we believe it is a complete path. Use it as it is.
45192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45193$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45194          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45195$as_echo_n "checking for BUILD_AR... " >&6; }
45196          if test ! -x "$tool_specified"; then
45197            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45198$as_echo "not found" >&6; }
45199            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45200          fi
45201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45202$as_echo "$tool_specified" >&6; }
45203        fi
45204      fi
45205    fi
45206
45207  fi
45208
45209
45210
45211  # Only process if variable expands to non-empty
45212
45213  if test "x$BUILD_AR" != x; then
45214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45215
45216  # First separate the path from the arguments. This will split at the first
45217  # space.
45218  complete="$BUILD_AR"
45219  path="${complete%% *}"
45220  tmp="$complete EOL"
45221  arguments="${tmp#* }"
45222
45223  # Input might be given as Windows format, start by converting to
45224  # unix format.
45225  new_path=`$CYGPATH -u "$path"`
45226
45227  # Now try to locate executable using which
45228  new_path=`$WHICH "$new_path" 2> /dev/null`
45229  # bat and cmd files are not always considered executable in cygwin causing which
45230  # to not find them
45231  if test "x$new_path" = x \
45232      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45233      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45234    new_path=`$CYGPATH -u "$path"`
45235  fi
45236  if test "x$new_path" = x; then
45237    # Oops. Which didn't find the executable.
45238    # The splitting of arguments from the executable at a space might have been incorrect,
45239    # since paths with space are more likely in Windows. Give it another try with the whole
45240    # argument.
45241    path="$complete"
45242    arguments="EOL"
45243    new_path=`$CYGPATH -u "$path"`
45244    new_path=`$WHICH "$new_path" 2> /dev/null`
45245    # bat and cmd files are not always considered executable in cygwin causing which
45246    # to not find them
45247    if test "x$new_path" = x \
45248        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45249        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45250      new_path=`$CYGPATH -u "$path"`
45251    fi
45252    if test "x$new_path" = x; then
45253      # It's still not found. Now this is an unrecoverable error.
45254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45255$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45256      has_space=`$ECHO "$complete" | $GREP " "`
45257      if test "x$has_space" != x; then
45258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45260      fi
45261      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45262    fi
45263  fi
45264
45265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45268  # "foo.exe" is OK but "foo" is an error.
45269  #
45270  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45271  # It is also a way to make sure we got the proper file name for the real test later on.
45272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45273  if test "x$test_shortpath" = x; then
45274    # Short path failed, file does not exist as specified.
45275    # Try adding .exe or .cmd
45276    if test -f "${new_path}.exe"; then
45277      input_to_shortpath="${new_path}.exe"
45278    elif test -f "${new_path}.cmd"; then
45279      input_to_shortpath="${new_path}.cmd"
45280    else
45281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45282$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45283      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45284$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45285      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45286    fi
45287  else
45288    input_to_shortpath="$new_path"
45289  fi
45290
45291  # Call helper function which possibly converts this using DOS-style short mode.
45292  # If so, the updated path is stored in $new_path.
45293  new_path="$input_to_shortpath"
45294
45295  input_path="$input_to_shortpath"
45296  # Check if we need to convert this using DOS-style short mode. If the path
45297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45298  # take no chances and rewrite it.
45299  # Note: m4 eats our [], so we need to use [ and ] instead.
45300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45301  if test "x$has_forbidden_chars" != x; then
45302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45306      # Going to short mode and back again did indeed matter. Since short mode is
45307      # case insensitive, let's make it lowercase to improve readability.
45308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45309      # Now convert it back to Unix-style (cygpath)
45310      input_path=`$CYGPATH -u "$shortmode_path"`
45311      new_path="$input_path"
45312    fi
45313  fi
45314
45315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45316  if test "x$test_cygdrive_prefix" = x; then
45317    # As a simple fix, exclude /usr/bin since it's not a real path.
45318    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45320      # a path prefixed by /cygdrive for fixpath to work.
45321      new_path="$CYGWIN_ROOT_PATH$input_path"
45322    fi
45323  fi
45324
45325  # remove trailing .exe if any
45326  new_path="${new_path/%.exe/}"
45327
45328    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45329
45330  # First separate the path from the arguments. This will split at the first
45331  # space.
45332  complete="$BUILD_AR"
45333  path="${complete%% *}"
45334  tmp="$complete EOL"
45335  arguments="${tmp#* }"
45336
45337  # Input might be given as Windows format, start by converting to
45338  # unix format.
45339  new_path="$path"
45340
45341  windows_path="$new_path"
45342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45343    unix_path=`$CYGPATH -u "$windows_path"`
45344    new_path="$unix_path"
45345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45347    new_path="$unix_path"
45348  fi
45349
45350
45351  # Now try to locate executable using which
45352  new_path=`$WHICH "$new_path" 2> /dev/null`
45353
45354  if test "x$new_path" = x; then
45355    # Oops. Which didn't find the executable.
45356    # The splitting of arguments from the executable at a space might have been incorrect,
45357    # since paths with space are more likely in Windows. Give it another try with the whole
45358    # argument.
45359    path="$complete"
45360    arguments="EOL"
45361    new_path="$path"
45362
45363  windows_path="$new_path"
45364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45365    unix_path=`$CYGPATH -u "$windows_path"`
45366    new_path="$unix_path"
45367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45369    new_path="$unix_path"
45370  fi
45371
45372
45373    new_path=`$WHICH "$new_path" 2> /dev/null`
45374    # bat and cmd files are not always considered executable in MSYS causing which
45375    # to not find them
45376    if test "x$new_path" = x \
45377        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45378        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45379      new_path="$path"
45380
45381  windows_path="$new_path"
45382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45383    unix_path=`$CYGPATH -u "$windows_path"`
45384    new_path="$unix_path"
45385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45387    new_path="$unix_path"
45388  fi
45389
45390    fi
45391
45392    if test "x$new_path" = x; then
45393      # It's still not found. Now this is an unrecoverable error.
45394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45395$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45396      has_space=`$ECHO "$complete" | $GREP " "`
45397      if test "x$has_space" != x; then
45398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45400      fi
45401      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45402    fi
45403  fi
45404
45405  # Now new_path has a complete unix path to the binary
45406  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45407    # Keep paths in /bin as-is, but remove trailing .exe if any
45408    new_path="${new_path/%.exe/}"
45409    # Do not save /bin paths to all_fixpath_prefixes!
45410  else
45411    # Not in mixed or Windows style, start by that.
45412    new_path=`cmd //c echo $new_path`
45413
45414  input_path="$new_path"
45415  # Check if we need to convert this using DOS-style short mode. If the path
45416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45417  # take no chances and rewrite it.
45418  # Note: m4 eats our [], so we need to use [ and ] instead.
45419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45420  if test "x$has_forbidden_chars" != x; then
45421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45423  fi
45424
45425    # Output is in $new_path
45426
45427  windows_path="$new_path"
45428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45429    unix_path=`$CYGPATH -u "$windows_path"`
45430    new_path="$unix_path"
45431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45433    new_path="$unix_path"
45434  fi
45435
45436    # remove trailing .exe if any
45437    new_path="${new_path/%.exe/}"
45438
45439    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45440    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45441  fi
45442
45443    else
45444      # We're on a unix platform. Hooray! :)
45445      # First separate the path from the arguments. This will split at the first
45446      # space.
45447      complete="$BUILD_AR"
45448      path="${complete%% *}"
45449      tmp="$complete EOL"
45450      arguments="${tmp#* }"
45451
45452      # Cannot rely on the command "which" here since it doesn't always work.
45453      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45454      if test -z "$is_absolute_path"; then
45455        # Path to executable is not absolute. Find it.
45456        IFS_save="$IFS"
45457        IFS=:
45458        for p in $PATH; do
45459          if test -f "$p/$path" && test -x "$p/$path"; then
45460            new_path="$p/$path"
45461            break
45462          fi
45463        done
45464        IFS="$IFS_save"
45465      else
45466        # This is an absolute path, we can use it without further modifications.
45467        new_path="$path"
45468      fi
45469
45470      if test "x$new_path" = x; then
45471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45472$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45473        has_space=`$ECHO "$complete" | $GREP " "`
45474        if test "x$has_space" != x; then
45475          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45476$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45477        fi
45478        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45479      fi
45480    fi
45481
45482    # Now join together the path and the arguments once again
45483    if test "x$arguments" != xEOL; then
45484      new_complete="$new_path ${arguments% *}"
45485    else
45486      new_complete="$new_path"
45487    fi
45488
45489    if test "x$complete" != "x$new_complete"; then
45490      BUILD_AR="$new_complete"
45491      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45492$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45493    fi
45494  fi
45495
45496
45497
45498  # Publish this variable in the help.
45499
45500
45501  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45502    # The variable is not set by user, try to locate tool using the code snippet
45503    for ac_prog in objcopy
45504do
45505  # Extract the first word of "$ac_prog", so it can be a program name with args.
45506set dummy $ac_prog; ac_word=$2
45507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45508$as_echo_n "checking for $ac_word... " >&6; }
45509if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45510  $as_echo_n "(cached) " >&6
45511else
45512  case $BUILD_OBJCOPY in
45513  [\\/]* | ?:[\\/]*)
45514  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45515  ;;
45516  *)
45517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45518for as_dir in $PATH
45519do
45520  IFS=$as_save_IFS
45521  test -z "$as_dir" && as_dir=.
45522    for ac_exec_ext in '' $ac_executable_extensions; do
45523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45524    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45526    break 2
45527  fi
45528done
45529  done
45530IFS=$as_save_IFS
45531
45532  ;;
45533esac
45534fi
45535BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45536if test -n "$BUILD_OBJCOPY"; then
45537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45538$as_echo "$BUILD_OBJCOPY" >&6; }
45539else
45540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45541$as_echo "no" >&6; }
45542fi
45543
45544
45545  test -n "$BUILD_OBJCOPY" && break
45546done
45547
45548  else
45549    # The variable is set, but is it from the command line or the environment?
45550
45551    # Try to remove the string !BUILD_OBJCOPY! from our list.
45552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45554      # If it failed, the variable was not from the command line. Ignore it,
45555      # but warn the user (except for BASH, which is always set by the calling BASH).
45556      if test "xBUILD_OBJCOPY" != xBASH; then
45557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45558$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45559      fi
45560      # Try to locate tool using the code snippet
45561      for ac_prog in objcopy
45562do
45563  # Extract the first word of "$ac_prog", so it can be a program name with args.
45564set dummy $ac_prog; ac_word=$2
45565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45566$as_echo_n "checking for $ac_word... " >&6; }
45567if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45568  $as_echo_n "(cached) " >&6
45569else
45570  case $BUILD_OBJCOPY in
45571  [\\/]* | ?:[\\/]*)
45572  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45573  ;;
45574  *)
45575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45576for as_dir in $PATH
45577do
45578  IFS=$as_save_IFS
45579  test -z "$as_dir" && as_dir=.
45580    for ac_exec_ext in '' $ac_executable_extensions; do
45581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45582    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45584    break 2
45585  fi
45586done
45587  done
45588IFS=$as_save_IFS
45589
45590  ;;
45591esac
45592fi
45593BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45594if test -n "$BUILD_OBJCOPY"; then
45595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45596$as_echo "$BUILD_OBJCOPY" >&6; }
45597else
45598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45599$as_echo "no" >&6; }
45600fi
45601
45602
45603  test -n "$BUILD_OBJCOPY" && break
45604done
45605
45606    else
45607      # If it succeeded, then it was overridden by the user. We will use it
45608      # for the tool.
45609
45610      # First remove it from the list of overridden variables, so we can test
45611      # for unknown variables in the end.
45612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45613
45614      # Check if we try to supply an empty value
45615      if test "x$BUILD_OBJCOPY" = x; then
45616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45617$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45619$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45621$as_echo "disabled" >&6; }
45622      else
45623        # Check if the provided tool contains a complete path.
45624        tool_specified="$BUILD_OBJCOPY"
45625        tool_basename="${tool_specified##*/}"
45626        if test "x$tool_basename" = "x$tool_specified"; then
45627          # A command without a complete path is provided, search $PATH.
45628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45629$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45630          # Extract the first word of "$tool_basename", so it can be a program name with args.
45631set dummy $tool_basename; ac_word=$2
45632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45633$as_echo_n "checking for $ac_word... " >&6; }
45634if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45635  $as_echo_n "(cached) " >&6
45636else
45637  case $BUILD_OBJCOPY in
45638  [\\/]* | ?:[\\/]*)
45639  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45640  ;;
45641  *)
45642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45643for as_dir in $PATH
45644do
45645  IFS=$as_save_IFS
45646  test -z "$as_dir" && as_dir=.
45647    for ac_exec_ext in '' $ac_executable_extensions; do
45648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45649    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45651    break 2
45652  fi
45653done
45654  done
45655IFS=$as_save_IFS
45656
45657  ;;
45658esac
45659fi
45660BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45661if test -n "$BUILD_OBJCOPY"; then
45662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45663$as_echo "$BUILD_OBJCOPY" >&6; }
45664else
45665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45666$as_echo "no" >&6; }
45667fi
45668
45669
45670          if test "x$BUILD_OBJCOPY" = x; then
45671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45672          fi
45673        else
45674          # Otherwise we believe it is a complete path. Use it as it is.
45675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45676$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45678$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45679          if test ! -x "$tool_specified"; then
45680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45681$as_echo "not found" >&6; }
45682            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45683          fi
45684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45685$as_echo "$tool_specified" >&6; }
45686        fi
45687      fi
45688    fi
45689
45690  fi
45691
45692
45693
45694  # Only process if variable expands to non-empty
45695
45696  if test "x$BUILD_OBJCOPY" != x; then
45697    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45698
45699  # First separate the path from the arguments. This will split at the first
45700  # space.
45701  complete="$BUILD_OBJCOPY"
45702  path="${complete%% *}"
45703  tmp="$complete EOL"
45704  arguments="${tmp#* }"
45705
45706  # Input might be given as Windows format, start by converting to
45707  # unix format.
45708  new_path=`$CYGPATH -u "$path"`
45709
45710  # Now try to locate executable using which
45711  new_path=`$WHICH "$new_path" 2> /dev/null`
45712  # bat and cmd files are not always considered executable in cygwin causing which
45713  # to not find them
45714  if test "x$new_path" = x \
45715      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45716      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45717    new_path=`$CYGPATH -u "$path"`
45718  fi
45719  if test "x$new_path" = x; then
45720    # Oops. Which didn't find the executable.
45721    # The splitting of arguments from the executable at a space might have been incorrect,
45722    # since paths with space are more likely in Windows. Give it another try with the whole
45723    # argument.
45724    path="$complete"
45725    arguments="EOL"
45726    new_path=`$CYGPATH -u "$path"`
45727    new_path=`$WHICH "$new_path" 2> /dev/null`
45728    # bat and cmd files are not always considered executable in cygwin causing which
45729    # to not find them
45730    if test "x$new_path" = x \
45731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45733      new_path=`$CYGPATH -u "$path"`
45734    fi
45735    if test "x$new_path" = x; then
45736      # It's still not found. Now this is an unrecoverable error.
45737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45738$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45739      has_space=`$ECHO "$complete" | $GREP " "`
45740      if test "x$has_space" != x; then
45741        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45742$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45743      fi
45744      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45745    fi
45746  fi
45747
45748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45751  # "foo.exe" is OK but "foo" is an error.
45752  #
45753  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45754  # It is also a way to make sure we got the proper file name for the real test later on.
45755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45756  if test "x$test_shortpath" = x; then
45757    # Short path failed, file does not exist as specified.
45758    # Try adding .exe or .cmd
45759    if test -f "${new_path}.exe"; then
45760      input_to_shortpath="${new_path}.exe"
45761    elif test -f "${new_path}.cmd"; then
45762      input_to_shortpath="${new_path}.cmd"
45763    else
45764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45765$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45766      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45767$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45768      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45769    fi
45770  else
45771    input_to_shortpath="$new_path"
45772  fi
45773
45774  # Call helper function which possibly converts this using DOS-style short mode.
45775  # If so, the updated path is stored in $new_path.
45776  new_path="$input_to_shortpath"
45777
45778  input_path="$input_to_shortpath"
45779  # Check if we need to convert this using DOS-style short mode. If the path
45780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45781  # take no chances and rewrite it.
45782  # Note: m4 eats our [], so we need to use [ and ] instead.
45783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45784  if test "x$has_forbidden_chars" != x; then
45785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45789      # Going to short mode and back again did indeed matter. Since short mode is
45790      # case insensitive, let's make it lowercase to improve readability.
45791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45792      # Now convert it back to Unix-style (cygpath)
45793      input_path=`$CYGPATH -u "$shortmode_path"`
45794      new_path="$input_path"
45795    fi
45796  fi
45797
45798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45799  if test "x$test_cygdrive_prefix" = x; then
45800    # As a simple fix, exclude /usr/bin since it's not a real path.
45801    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45803      # a path prefixed by /cygdrive for fixpath to work.
45804      new_path="$CYGWIN_ROOT_PATH$input_path"
45805    fi
45806  fi
45807
45808  # remove trailing .exe if any
45809  new_path="${new_path/%.exe/}"
45810
45811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45812
45813  # First separate the path from the arguments. This will split at the first
45814  # space.
45815  complete="$BUILD_OBJCOPY"
45816  path="${complete%% *}"
45817  tmp="$complete EOL"
45818  arguments="${tmp#* }"
45819
45820  # Input might be given as Windows format, start by converting to
45821  # unix format.
45822  new_path="$path"
45823
45824  windows_path="$new_path"
45825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45826    unix_path=`$CYGPATH -u "$windows_path"`
45827    new_path="$unix_path"
45828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45830    new_path="$unix_path"
45831  fi
45832
45833
45834  # Now try to locate executable using which
45835  new_path=`$WHICH "$new_path" 2> /dev/null`
45836
45837  if test "x$new_path" = x; then
45838    # Oops. Which didn't find the executable.
45839    # The splitting of arguments from the executable at a space might have been incorrect,
45840    # since paths with space are more likely in Windows. Give it another try with the whole
45841    # argument.
45842    path="$complete"
45843    arguments="EOL"
45844    new_path="$path"
45845
45846  windows_path="$new_path"
45847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45848    unix_path=`$CYGPATH -u "$windows_path"`
45849    new_path="$unix_path"
45850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45852    new_path="$unix_path"
45853  fi
45854
45855
45856    new_path=`$WHICH "$new_path" 2> /dev/null`
45857    # bat and cmd files are not always considered executable in MSYS causing which
45858    # to not find them
45859    if test "x$new_path" = x \
45860        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45861        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45862      new_path="$path"
45863
45864  windows_path="$new_path"
45865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45866    unix_path=`$CYGPATH -u "$windows_path"`
45867    new_path="$unix_path"
45868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45870    new_path="$unix_path"
45871  fi
45872
45873    fi
45874
45875    if test "x$new_path" = x; then
45876      # It's still not found. Now this is an unrecoverable error.
45877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45878$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45879      has_space=`$ECHO "$complete" | $GREP " "`
45880      if test "x$has_space" != x; then
45881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45883      fi
45884      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45885    fi
45886  fi
45887
45888  # Now new_path has a complete unix path to the binary
45889  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45890    # Keep paths in /bin as-is, but remove trailing .exe if any
45891    new_path="${new_path/%.exe/}"
45892    # Do not save /bin paths to all_fixpath_prefixes!
45893  else
45894    # Not in mixed or Windows style, start by that.
45895    new_path=`cmd //c echo $new_path`
45896
45897  input_path="$new_path"
45898  # Check if we need to convert this using DOS-style short mode. If the path
45899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45900  # take no chances and rewrite it.
45901  # Note: m4 eats our [], so we need to use [ and ] instead.
45902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45903  if test "x$has_forbidden_chars" != x; then
45904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45906  fi
45907
45908    # Output is in $new_path
45909
45910  windows_path="$new_path"
45911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45912    unix_path=`$CYGPATH -u "$windows_path"`
45913    new_path="$unix_path"
45914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45916    new_path="$unix_path"
45917  fi
45918
45919    # remove trailing .exe if any
45920    new_path="${new_path/%.exe/}"
45921
45922    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45923    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45924  fi
45925
45926    else
45927      # We're on a unix platform. Hooray! :)
45928      # First separate the path from the arguments. This will split at the first
45929      # space.
45930      complete="$BUILD_OBJCOPY"
45931      path="${complete%% *}"
45932      tmp="$complete EOL"
45933      arguments="${tmp#* }"
45934
45935      # Cannot rely on the command "which" here since it doesn't always work.
45936      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45937      if test -z "$is_absolute_path"; then
45938        # Path to executable is not absolute. Find it.
45939        IFS_save="$IFS"
45940        IFS=:
45941        for p in $PATH; do
45942          if test -f "$p/$path" && test -x "$p/$path"; then
45943            new_path="$p/$path"
45944            break
45945          fi
45946        done
45947        IFS="$IFS_save"
45948      else
45949        # This is an absolute path, we can use it without further modifications.
45950        new_path="$path"
45951      fi
45952
45953      if test "x$new_path" = x; then
45954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45955$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45956        has_space=`$ECHO "$complete" | $GREP " "`
45957        if test "x$has_space" != x; then
45958          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45959$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45960        fi
45961        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45962      fi
45963    fi
45964
45965    # Now join together the path and the arguments once again
45966    if test "x$arguments" != xEOL; then
45967      new_complete="$new_path ${arguments% *}"
45968    else
45969      new_complete="$new_path"
45970    fi
45971
45972    if test "x$complete" != "x$new_complete"; then
45973      BUILD_OBJCOPY="$new_complete"
45974      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45975$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45976    fi
45977  fi
45978
45979
45980
45981  # Publish this variable in the help.
45982
45983
45984  if [ -z "${BUILD_STRIP+x}" ]; then
45985    # The variable is not set by user, try to locate tool using the code snippet
45986    for ac_prog in strip
45987do
45988  # Extract the first word of "$ac_prog", so it can be a program name with args.
45989set dummy $ac_prog; ac_word=$2
45990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45991$as_echo_n "checking for $ac_word... " >&6; }
45992if ${ac_cv_path_BUILD_STRIP+:} false; then :
45993  $as_echo_n "(cached) " >&6
45994else
45995  case $BUILD_STRIP in
45996  [\\/]* | ?:[\\/]*)
45997  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45998  ;;
45999  *)
46000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46001for as_dir in $PATH
46002do
46003  IFS=$as_save_IFS
46004  test -z "$as_dir" && as_dir=.
46005    for ac_exec_ext in '' $ac_executable_extensions; do
46006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46007    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46009    break 2
46010  fi
46011done
46012  done
46013IFS=$as_save_IFS
46014
46015  ;;
46016esac
46017fi
46018BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46019if test -n "$BUILD_STRIP"; then
46020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46021$as_echo "$BUILD_STRIP" >&6; }
46022else
46023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46024$as_echo "no" >&6; }
46025fi
46026
46027
46028  test -n "$BUILD_STRIP" && break
46029done
46030
46031  else
46032    # The variable is set, but is it from the command line or the environment?
46033
46034    # Try to remove the string !BUILD_STRIP! from our list.
46035    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46036    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46037      # If it failed, the variable was not from the command line. Ignore it,
46038      # but warn the user (except for BASH, which is always set by the calling BASH).
46039      if test "xBUILD_STRIP" != xBASH; then
46040        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46041$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46042      fi
46043      # Try to locate tool using the code snippet
46044      for ac_prog in strip
46045do
46046  # Extract the first word of "$ac_prog", so it can be a program name with args.
46047set dummy $ac_prog; ac_word=$2
46048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46049$as_echo_n "checking for $ac_word... " >&6; }
46050if ${ac_cv_path_BUILD_STRIP+:} false; then :
46051  $as_echo_n "(cached) " >&6
46052else
46053  case $BUILD_STRIP in
46054  [\\/]* | ?:[\\/]*)
46055  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46056  ;;
46057  *)
46058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46059for as_dir in $PATH
46060do
46061  IFS=$as_save_IFS
46062  test -z "$as_dir" && as_dir=.
46063    for ac_exec_ext in '' $ac_executable_extensions; do
46064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46065    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46067    break 2
46068  fi
46069done
46070  done
46071IFS=$as_save_IFS
46072
46073  ;;
46074esac
46075fi
46076BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46077if test -n "$BUILD_STRIP"; then
46078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46079$as_echo "$BUILD_STRIP" >&6; }
46080else
46081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46082$as_echo "no" >&6; }
46083fi
46084
46085
46086  test -n "$BUILD_STRIP" && break
46087done
46088
46089    else
46090      # If it succeeded, then it was overridden by the user. We will use it
46091      # for the tool.
46092
46093      # First remove it from the list of overridden variables, so we can test
46094      # for unknown variables in the end.
46095      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46096
46097      # Check if we try to supply an empty value
46098      if test "x$BUILD_STRIP" = x; then
46099        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46100$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46102$as_echo_n "checking for BUILD_STRIP... " >&6; }
46103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46104$as_echo "disabled" >&6; }
46105      else
46106        # Check if the provided tool contains a complete path.
46107        tool_specified="$BUILD_STRIP"
46108        tool_basename="${tool_specified##*/}"
46109        if test "x$tool_basename" = "x$tool_specified"; then
46110          # A command without a complete path is provided, search $PATH.
46111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46112$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46113          # Extract the first word of "$tool_basename", so it can be a program name with args.
46114set dummy $tool_basename; ac_word=$2
46115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46116$as_echo_n "checking for $ac_word... " >&6; }
46117if ${ac_cv_path_BUILD_STRIP+:} false; then :
46118  $as_echo_n "(cached) " >&6
46119else
46120  case $BUILD_STRIP in
46121  [\\/]* | ?:[\\/]*)
46122  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46123  ;;
46124  *)
46125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46126for as_dir in $PATH
46127do
46128  IFS=$as_save_IFS
46129  test -z "$as_dir" && as_dir=.
46130    for ac_exec_ext in '' $ac_executable_extensions; do
46131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46132    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46134    break 2
46135  fi
46136done
46137  done
46138IFS=$as_save_IFS
46139
46140  ;;
46141esac
46142fi
46143BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46144if test -n "$BUILD_STRIP"; then
46145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46146$as_echo "$BUILD_STRIP" >&6; }
46147else
46148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46149$as_echo "no" >&6; }
46150fi
46151
46152
46153          if test "x$BUILD_STRIP" = x; then
46154            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46155          fi
46156        else
46157          # Otherwise we believe it is a complete path. Use it as it is.
46158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46159$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46160          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46161$as_echo_n "checking for BUILD_STRIP... " >&6; }
46162          if test ! -x "$tool_specified"; then
46163            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46164$as_echo "not found" >&6; }
46165            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46166          fi
46167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46168$as_echo "$tool_specified" >&6; }
46169        fi
46170      fi
46171    fi
46172
46173  fi
46174
46175
46176
46177  # Only process if variable expands to non-empty
46178
46179  if test "x$BUILD_STRIP" != x; then
46180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46181
46182  # First separate the path from the arguments. This will split at the first
46183  # space.
46184  complete="$BUILD_STRIP"
46185  path="${complete%% *}"
46186  tmp="$complete EOL"
46187  arguments="${tmp#* }"
46188
46189  # Input might be given as Windows format, start by converting to
46190  # unix format.
46191  new_path=`$CYGPATH -u "$path"`
46192
46193  # Now try to locate executable using which
46194  new_path=`$WHICH "$new_path" 2> /dev/null`
46195  # bat and cmd files are not always considered executable in cygwin causing which
46196  # to not find them
46197  if test "x$new_path" = x \
46198      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46199      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46200    new_path=`$CYGPATH -u "$path"`
46201  fi
46202  if test "x$new_path" = x; then
46203    # Oops. Which didn't find the executable.
46204    # The splitting of arguments from the executable at a space might have been incorrect,
46205    # since paths with space are more likely in Windows. Give it another try with the whole
46206    # argument.
46207    path="$complete"
46208    arguments="EOL"
46209    new_path=`$CYGPATH -u "$path"`
46210    new_path=`$WHICH "$new_path" 2> /dev/null`
46211    # bat and cmd files are not always considered executable in cygwin causing which
46212    # to not find them
46213    if test "x$new_path" = x \
46214        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46215        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46216      new_path=`$CYGPATH -u "$path"`
46217    fi
46218    if test "x$new_path" = x; then
46219      # It's still not found. Now this is an unrecoverable error.
46220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46221$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46222      has_space=`$ECHO "$complete" | $GREP " "`
46223      if test "x$has_space" != x; then
46224        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46225$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46226      fi
46227      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46228    fi
46229  fi
46230
46231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46234  # "foo.exe" is OK but "foo" is an error.
46235  #
46236  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46237  # It is also a way to make sure we got the proper file name for the real test later on.
46238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46239  if test "x$test_shortpath" = x; then
46240    # Short path failed, file does not exist as specified.
46241    # Try adding .exe or .cmd
46242    if test -f "${new_path}.exe"; then
46243      input_to_shortpath="${new_path}.exe"
46244    elif test -f "${new_path}.cmd"; then
46245      input_to_shortpath="${new_path}.cmd"
46246    else
46247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46248$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46249      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46250$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46251      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46252    fi
46253  else
46254    input_to_shortpath="$new_path"
46255  fi
46256
46257  # Call helper function which possibly converts this using DOS-style short mode.
46258  # If so, the updated path is stored in $new_path.
46259  new_path="$input_to_shortpath"
46260
46261  input_path="$input_to_shortpath"
46262  # Check if we need to convert this using DOS-style short mode. If the path
46263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46264  # take no chances and rewrite it.
46265  # Note: m4 eats our [], so we need to use [ and ] instead.
46266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46267  if test "x$has_forbidden_chars" != x; then
46268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46272      # Going to short mode and back again did indeed matter. Since short mode is
46273      # case insensitive, let's make it lowercase to improve readability.
46274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46275      # Now convert it back to Unix-style (cygpath)
46276      input_path=`$CYGPATH -u "$shortmode_path"`
46277      new_path="$input_path"
46278    fi
46279  fi
46280
46281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46282  if test "x$test_cygdrive_prefix" = x; then
46283    # As a simple fix, exclude /usr/bin since it's not a real path.
46284    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46286      # a path prefixed by /cygdrive for fixpath to work.
46287      new_path="$CYGWIN_ROOT_PATH$input_path"
46288    fi
46289  fi
46290
46291  # remove trailing .exe if any
46292  new_path="${new_path/%.exe/}"
46293
46294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46295
46296  # First separate the path from the arguments. This will split at the first
46297  # space.
46298  complete="$BUILD_STRIP"
46299  path="${complete%% *}"
46300  tmp="$complete EOL"
46301  arguments="${tmp#* }"
46302
46303  # Input might be given as Windows format, start by converting to
46304  # unix format.
46305  new_path="$path"
46306
46307  windows_path="$new_path"
46308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46309    unix_path=`$CYGPATH -u "$windows_path"`
46310    new_path="$unix_path"
46311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46313    new_path="$unix_path"
46314  fi
46315
46316
46317  # Now try to locate executable using which
46318  new_path=`$WHICH "$new_path" 2> /dev/null`
46319
46320  if test "x$new_path" = x; then
46321    # Oops. Which didn't find the executable.
46322    # The splitting of arguments from the executable at a space might have been incorrect,
46323    # since paths with space are more likely in Windows. Give it another try with the whole
46324    # argument.
46325    path="$complete"
46326    arguments="EOL"
46327    new_path="$path"
46328
46329  windows_path="$new_path"
46330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46331    unix_path=`$CYGPATH -u "$windows_path"`
46332    new_path="$unix_path"
46333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46335    new_path="$unix_path"
46336  fi
46337
46338
46339    new_path=`$WHICH "$new_path" 2> /dev/null`
46340    # bat and cmd files are not always considered executable in MSYS causing which
46341    # to not find them
46342    if test "x$new_path" = x \
46343        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46344        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46345      new_path="$path"
46346
46347  windows_path="$new_path"
46348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46349    unix_path=`$CYGPATH -u "$windows_path"`
46350    new_path="$unix_path"
46351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46353    new_path="$unix_path"
46354  fi
46355
46356    fi
46357
46358    if test "x$new_path" = x; then
46359      # It's still not found. Now this is an unrecoverable error.
46360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46361$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46362      has_space=`$ECHO "$complete" | $GREP " "`
46363      if test "x$has_space" != x; then
46364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46366      fi
46367      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46368    fi
46369  fi
46370
46371  # Now new_path has a complete unix path to the binary
46372  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46373    # Keep paths in /bin as-is, but remove trailing .exe if any
46374    new_path="${new_path/%.exe/}"
46375    # Do not save /bin paths to all_fixpath_prefixes!
46376  else
46377    # Not in mixed or Windows style, start by that.
46378    new_path=`cmd //c echo $new_path`
46379
46380  input_path="$new_path"
46381  # Check if we need to convert this using DOS-style short mode. If the path
46382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46383  # take no chances and rewrite it.
46384  # Note: m4 eats our [], so we need to use [ and ] instead.
46385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46386  if test "x$has_forbidden_chars" != x; then
46387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46389  fi
46390
46391    # Output is in $new_path
46392
46393  windows_path="$new_path"
46394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46395    unix_path=`$CYGPATH -u "$windows_path"`
46396    new_path="$unix_path"
46397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46399    new_path="$unix_path"
46400  fi
46401
46402    # remove trailing .exe if any
46403    new_path="${new_path/%.exe/}"
46404
46405    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46406    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46407  fi
46408
46409    else
46410      # We're on a unix platform. Hooray! :)
46411      # First separate the path from the arguments. This will split at the first
46412      # space.
46413      complete="$BUILD_STRIP"
46414      path="${complete%% *}"
46415      tmp="$complete EOL"
46416      arguments="${tmp#* }"
46417
46418      # Cannot rely on the command "which" here since it doesn't always work.
46419      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46420      if test -z "$is_absolute_path"; then
46421        # Path to executable is not absolute. Find it.
46422        IFS_save="$IFS"
46423        IFS=:
46424        for p in $PATH; do
46425          if test -f "$p/$path" && test -x "$p/$path"; then
46426            new_path="$p/$path"
46427            break
46428          fi
46429        done
46430        IFS="$IFS_save"
46431      else
46432        # This is an absolute path, we can use it without further modifications.
46433        new_path="$path"
46434      fi
46435
46436      if test "x$new_path" = x; then
46437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46438$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46439        has_space=`$ECHO "$complete" | $GREP " "`
46440        if test "x$has_space" != x; then
46441          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46442$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46443        fi
46444        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46445      fi
46446    fi
46447
46448    # Now join together the path and the arguments once again
46449    if test "x$arguments" != xEOL; then
46450      new_complete="$new_path ${arguments% *}"
46451    else
46452      new_complete="$new_path"
46453    fi
46454
46455    if test "x$complete" != "x$new_complete"; then
46456      BUILD_STRIP="$new_complete"
46457      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46458$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46459    fi
46460  fi
46461
46462    # Assume the C compiler is the assembler
46463    BUILD_AS="$BUILD_CC -c"
46464    # Just like for the target compiler, use the compiler as linker
46465    BUILD_LD="$BUILD_CC"
46466    BUILD_LDCXX="$BUILD_CXX"
46467
46468    PATH="$OLDPATH"
46469
46470
46471  COMPILER=$BUILD_CC
46472  COMPILER_NAME=BuildC
46473
46474  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46475    # cc -V output typically looks like
46476    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46477    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46478    # Check that this is likely to be the Solaris Studio cc.
46479    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46480    if test $? -ne 0; then
46481      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46482      { $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
46483$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46484      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46485$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46486      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46487$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46488      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46489    fi
46490    # Remove usage instructions (if present), and
46491    # collapse compiler output into a single line
46492    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46493        $SED -e 's/ *[Uu]sage:.*//'`
46494    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46495        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46496  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46497    # xlc -qversion output typically looks like
46498    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46499    #     Version: 11.01.0000.0015
46500    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46501    # Check that this is likely to be the IBM XL C compiler.
46502    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46503    if test $? -ne 0; then
46504      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46505      { $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
46506$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46507      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46508$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46509      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46510$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46511      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46512    fi
46513    # Collapse compiler output into a single line
46514    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46515    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46516        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46517  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46518    # There is no specific version flag, but all output starts with a version string.
46519    # First line typically looks something like:
46520    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
46521    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46522    # Check that this is likely to be Microsoft CL.EXE.
46523    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
46524    if test $? -ne 0; then
46525      { $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
46526$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46527      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46528$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46529      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46530    fi
46531    # Collapse compiler output into a single line
46532    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46533    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46534        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
46535  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
46536    # gcc --version output typically looks like
46537    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
46538    #     Copyright (C) 2013 Free Software Foundation, Inc.
46539    #     This is free software; see the source for copying conditions.  There is NO
46540    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
46541    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46542    # Check that this is likely to be GCC.
46543    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
46544    if test $? -ne 0; then
46545      { $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
46546$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46547      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
46548$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
46549      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46550    fi
46551    # Remove Copyright and legalese from version string, and
46552    # collapse into a single line
46553    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46554        $SED -e 's/ *Copyright .*//'`
46555    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46556        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
46557  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
46558    # clang --version output typically looks like
46559    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
46560    #    clang version 3.3 (tags/RELEASE_33/final)
46561    # or
46562    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
46563    #    Target: x86_64-pc-linux-gnu
46564    #    Thread model: posix
46565    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46566    # Check that this is likely to be clang
46567    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
46568    if test $? -ne 0; then
46569      { $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
46570$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46571      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46572$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46573      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46574    fi
46575    # Collapse compiler output into a single line
46576    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46577    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46578        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
46579  else
46580      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
46581  fi
46582  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
46583  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
46584  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
46585  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
46586
46587  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
46588$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
46589
46590
46591  COMPILER=$BUILD_CXX
46592  COMPILER_NAME=BuildC++
46593
46594  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46595    # cc -V output typically looks like
46596    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46597    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46598    # Check that this is likely to be the Solaris Studio cc.
46599    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46600    if test $? -ne 0; then
46601      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46602      { $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
46603$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46604      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46605$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46606      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46607$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46608      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46609    fi
46610    # Remove usage instructions (if present), and
46611    # collapse compiler output into a single line
46612    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46613        $SED -e 's/ *[Uu]sage:.*//'`
46614    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46615        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46616  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46617    # xlc -qversion output typically looks like
46618    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46619    #     Version: 11.01.0000.0015
46620    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46621    # Check that this is likely to be the IBM XL C compiler.
46622    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46623    if test $? -ne 0; then
46624      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46625      { $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
46626$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46627      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46628$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46629      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46630$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46631      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46632    fi
46633    # Collapse compiler output into a single line
46634    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46635    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46636        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46637  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46638    # There is no specific version flag, but all output starts with a version string.
46639    # First line typically looks something like:
46640    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
46641    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46642    # Check that this is likely to be Microsoft CL.EXE.
46643    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
46644    if test $? -ne 0; then
46645      { $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
46646$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46647      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46648$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46649      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46650    fi
46651    # Collapse compiler output into a single line
46652    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46653    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46654        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
46655  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
46656    # gcc --version output typically looks like
46657    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
46658    #     Copyright (C) 2013 Free Software Foundation, Inc.
46659    #     This is free software; see the source for copying conditions.  There is NO
46660    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
46661    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46662    # Check that this is likely to be GCC.
46663    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
46664    if test $? -ne 0; then
46665      { $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
46666$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46667      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
46668$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
46669      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46670    fi
46671    # Remove Copyright and legalese from version string, and
46672    # collapse into a single line
46673    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46674        $SED -e 's/ *Copyright .*//'`
46675    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46676        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
46677  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
46678    # clang --version output typically looks like
46679    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
46680    #    clang version 3.3 (tags/RELEASE_33/final)
46681    # or
46682    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
46683    #    Target: x86_64-pc-linux-gnu
46684    #    Thread model: posix
46685    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46686    # Check that this is likely to be clang
46687    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
46688    if test $? -ne 0; then
46689      { $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
46690$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46691      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46692$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46693      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46694    fi
46695    # Collapse compiler output into a single line
46696    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46697    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46698        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
46699  else
46700      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
46701  fi
46702  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
46703  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
46704  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
46705  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
46706
46707  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
46708$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
46709
46710
46711  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
46712    { $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
46713$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
46714    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
46715$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
46716  fi
46717
46718  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
46719  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
46720    { $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
46721$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;}
46722  fi
46723
46724  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
46725    { $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
46726$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
46727  fi
46728
46729  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
46730
46731  else
46732    # If we are not cross compiling, use the normal target compilers for
46733    # building the build platform executables.
46734    BUILD_CC="$CC"
46735    BUILD_CXX="$CXX"
46736    BUILD_LD="$LD"
46737    BUILD_LDCXX="$LDCXX"
46738    BUILD_NM="$NM"
46739    BUILD_AS="$AS"
46740    BUILD_OBJCOPY="$OBJCOPY"
46741    BUILD_STRIP="$STRIP"
46742    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46743    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46744    BUILD_AR="$AR"
46745  fi
46746
46747
46748
46749
46750
46751
46752
46753
46754
46755
46756
46757
46758  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46759    # For hotspot, we need these in Windows mixed path,
46760    # so rewrite them all. Need added .exe suffix.
46761    HOTSPOT_CXX="$CXX.exe"
46762    HOTSPOT_LD="$LD.exe"
46763    HOTSPOT_MT="$MT.exe"
46764    HOTSPOT_RC="$RC.exe"
46765
46766  unix_path="$HOTSPOT_CXX"
46767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46768    windows_path=`$CYGPATH -m "$unix_path"`
46769    HOTSPOT_CXX="$windows_path"
46770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46771    windows_path=`cmd //c echo $unix_path`
46772    HOTSPOT_CXX="$windows_path"
46773  fi
46774
46775
46776  unix_path="$HOTSPOT_LD"
46777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46778    windows_path=`$CYGPATH -m "$unix_path"`
46779    HOTSPOT_LD="$windows_path"
46780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46781    windows_path=`cmd //c echo $unix_path`
46782    HOTSPOT_LD="$windows_path"
46783  fi
46784
46785
46786  unix_path="$HOTSPOT_MT"
46787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46788    windows_path=`$CYGPATH -m "$unix_path"`
46789    HOTSPOT_MT="$windows_path"
46790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46791    windows_path=`cmd //c echo $unix_path`
46792    HOTSPOT_MT="$windows_path"
46793  fi
46794
46795
46796  unix_path="$HOTSPOT_RC"
46797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46798    windows_path=`$CYGPATH -m "$unix_path"`
46799    HOTSPOT_RC="$windows_path"
46800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46801    windows_path=`cmd //c echo $unix_path`
46802    HOTSPOT_RC="$windows_path"
46803  fi
46804
46805
46806
46807  else
46808    HOTSPOT_CXX="$CXX"
46809    HOTSPOT_LD="$LD"
46810  fi
46811
46812
46813
46814  if test  "x$TOOLCHAIN_TYPE" = xclang; then
46815    USE_CLANG=true
46816  fi
46817
46818
46819
46820
46821
46822  # The package path is used only on macosx?
46823  # FIXME: clean this up, and/or move it elsewhere.
46824  PACKAGE_PATH=/opt/local
46825
46826
46827  # Check for extra potential brokenness.
46828  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46829    # On Windows, double-check that we got the right compiler.
46830    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46831    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46832    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46833      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46834        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
46835      fi
46836    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46837      if test "x$COMPILER_CPU_TEST" != "xx64"; then
46838        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46839      fi
46840    fi
46841  fi
46842
46843  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46844    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46845    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46846    # This is later checked when setting flags.
46847
46848    # "-Og" suppported for GCC 4.8 and later
46849    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46850
46851
46852
46853
46854
46855
46856
46857
46858
46859
46860
46861
46862
46863
46864
46865
46866
46867
46868
46869
46870
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    # Execute function body
46898
46899
46900
46901
46902
46903
46904
46905
46906
46907
46908
46909
46910
46911
46912
46913
46914
46915
46916
46917
46918
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    # Execute function body
46947
46948  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46949$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46950  supports=yes
46951
46952  saved_cflags="$CFLAGS"
46953  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46954  ac_ext=c
46955ac_cpp='$CPP $CPPFLAGS'
46956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46958ac_compiler_gnu=$ac_cv_c_compiler_gnu
46959
46960  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46961/* end confdefs.h.  */
46962int i;
46963_ACEOF
46964if ac_fn_c_try_compile "$LINENO"; then :
46965
46966else
46967  supports=no
46968fi
46969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46970  ac_ext=cpp
46971ac_cpp='$CXXCPP $CPPFLAGS'
46972ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46973ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46974ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46975
46976  CFLAGS="$saved_cflags"
46977
46978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46979$as_echo "$supports" >&6; }
46980  if test "x$supports" = "xyes" ; then
46981    :
46982    C_COMP_SUPPORTS="yes"
46983  else
46984    :
46985    C_COMP_SUPPORTS="no"
46986  fi
46987
46988
46989
46990
46991
46992
46993
46994
46995
46996
46997
46998
46999
47000
47001
47002
47003
47004
47005
47006
47007
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    # Execute function body
47047
47048  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47049$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47050  supports=yes
47051
47052  saved_cxxflags="$CXXFLAGS"
47053  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47054  ac_ext=cpp
47055ac_cpp='$CXXCPP $CPPFLAGS'
47056ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47057ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47058ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47059
47060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47061/* end confdefs.h.  */
47062int i;
47063_ACEOF
47064if ac_fn_cxx_try_compile "$LINENO"; then :
47065
47066else
47067  supports=no
47068fi
47069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47070  ac_ext=cpp
47071ac_cpp='$CXXCPP $CPPFLAGS'
47072ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47073ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47074ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47075
47076  CXXFLAGS="$saved_cxxflags"
47077
47078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47079$as_echo "$supports" >&6; }
47080  if test "x$supports" = "xyes" ; then
47081    :
47082    CXX_COMP_SUPPORTS="yes"
47083  else
47084    :
47085    CXX_COMP_SUPPORTS="no"
47086  fi
47087
47088
47089
47090
47091
47092
47093
47094
47095
47096
47097
47098
47099
47100  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47101$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47102  supports=no
47103  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47104
47105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47106$as_echo "$supports" >&6; }
47107  if test "x$supports" = "xyes" ; then
47108    :
47109    HAS_CFLAG_OPTIMIZE_DEBUG=true
47110  else
47111    :
47112    HAS_CFLAG_OPTIMIZE_DEBUG=false
47113  fi
47114
47115
47116
47117
47118
47119
47120
47121    # "-z relro" supported in GNU binutils 2.17 and later
47122    LINKER_RELRO_FLAG="-Wl,-z,relro"
47123
47124
47125
47126
47127
47128
47129
47130
47131
47132
47133
47134
47135
47136
47137
47138
47139
47140
47141
47142
47143
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    # Execute function body
47171
47172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47173$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47174  supports=yes
47175
47176  saved_ldflags="$LDFLAGS"
47177  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47178  ac_ext=c
47179ac_cpp='$CPP $CPPFLAGS'
47180ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47181ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47182ac_compiler_gnu=$ac_cv_c_compiler_gnu
47183
47184  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47185/* end confdefs.h.  */
47186
47187int
47188main ()
47189{
47190
47191  ;
47192  return 0;
47193}
47194_ACEOF
47195if ac_fn_c_try_link "$LINENO"; then :
47196
47197else
47198  supports=no
47199fi
47200rm -f core conftest.err conftest.$ac_objext \
47201    conftest$ac_exeext conftest.$ac_ext
47202  ac_ext=cpp
47203ac_cpp='$CXXCPP $CPPFLAGS'
47204ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47205ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47206ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47207
47208  LDFLAGS="$saved_ldflags"
47209
47210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47211$as_echo "$supports" >&6; }
47212  if test "x$supports" = "xyes" ; then
47213    :
47214    HAS_LINKER_RELRO=true
47215  else
47216    :
47217    HAS_LINKER_RELRO=false
47218  fi
47219
47220
47221
47222
47223
47224
47225
47226
47227
47228
47229
47230
47231
47232    # "-z now" supported in GNU binutils 2.11 and later
47233    LINKER_NOW_FLAG="-Wl,-z,now"
47234
47235
47236
47237
47238
47239
47240
47241
47242
47243
47244
47245
47246
47247
47248
47249
47250
47251
47252
47253
47254
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    # Execute function body
47282
47283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47284$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47285  supports=yes
47286
47287  saved_ldflags="$LDFLAGS"
47288  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47289  ac_ext=c
47290ac_cpp='$CPP $CPPFLAGS'
47291ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47292ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47293ac_compiler_gnu=$ac_cv_c_compiler_gnu
47294
47295  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47296/* end confdefs.h.  */
47297
47298int
47299main ()
47300{
47301
47302  ;
47303  return 0;
47304}
47305_ACEOF
47306if ac_fn_c_try_link "$LINENO"; then :
47307
47308else
47309  supports=no
47310fi
47311rm -f core conftest.err conftest.$ac_objext \
47312    conftest$ac_exeext conftest.$ac_ext
47313  ac_ext=cpp
47314ac_cpp='$CXXCPP $CPPFLAGS'
47315ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47316ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47317ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47318
47319  LDFLAGS="$saved_ldflags"
47320
47321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47322$as_echo "$supports" >&6; }
47323  if test "x$supports" = "xyes" ; then
47324    :
47325    HAS_LINKER_NOW=true
47326  else
47327    :
47328    HAS_LINKER_NOW=false
47329  fi
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342  fi
47343
47344  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47345  # in executable.'
47346  USING_BROKEN_SUSE_LD=no
47347  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47349$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47350    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47351    $ECHO "int main() { }" > main.c
47352    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47354$as_echo "no" >&6; }
47355      USING_BROKEN_SUSE_LD=no
47356    else
47357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47358$as_echo "yes" >&6; }
47359      USING_BROKEN_SUSE_LD=yes
47360    fi
47361    rm -rf version-script.map main.c a.out
47362  fi
47363
47364
47365  # Setup hotspot lecagy names for toolchains
47366  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47367  if test "x$TOOLCHAIN_TYPE" = xclang; then
47368    HOTSPOT_TOOLCHAIN_TYPE=gcc
47369  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47370    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47371  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47372    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47373  fi
47374
47375
47376
47377# Setup the JTReg Regression Test Harness.
47378
47379
47380# Check whether --with-jtreg was given.
47381if test "${with_jtreg+set}" = set; then :
47382  withval=$with_jtreg;
47383else
47384  with_jtreg=no
47385fi
47386
47387
47388  if test "x$with_jtreg" = xno; then
47389    # jtreg disabled
47390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47391$as_echo_n "checking for jtreg... " >&6; }
47392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47393$as_echo "no" >&6; }
47394  else
47395    if test "x$with_jtreg" != xyes; then
47396      # with path specified.
47397      JT_HOME="$with_jtreg"
47398    fi
47399
47400    if test "x$JT_HOME" != x; then
47401      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47402$as_echo_n "checking for jtreg... " >&6; }
47403
47404      # use JT_HOME enviroment var.
47405
47406  # Only process if variable expands to non-empty
47407
47408  if test "x$JT_HOME" != x; then
47409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47410
47411  # Input might be given as Windows format, start by converting to
47412  # unix format.
47413  path="$JT_HOME"
47414  new_path=`$CYGPATH -u "$path"`
47415
47416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47419  # "foo.exe" is OK but "foo" is an error.
47420  #
47421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47422  # It is also a way to make sure we got the proper file name for the real test later on.
47423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47424  if test "x$test_shortpath" = x; then
47425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47426$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47427    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47428  fi
47429
47430  # Call helper function which possibly converts this using DOS-style short mode.
47431  # If so, the updated path is stored in $new_path.
47432
47433  input_path="$new_path"
47434  # Check if we need to convert this using DOS-style short mode. If the path
47435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47436  # take no chances and rewrite it.
47437  # Note: m4 eats our [], so we need to use [ and ] instead.
47438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47439  if test "x$has_forbidden_chars" != x; then
47440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47444      # Going to short mode and back again did indeed matter. Since short mode is
47445      # case insensitive, let's make it lowercase to improve readability.
47446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47447      # Now convert it back to Unix-style (cygpath)
47448      input_path=`$CYGPATH -u "$shortmode_path"`
47449      new_path="$input_path"
47450    fi
47451  fi
47452
47453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47454  if test "x$test_cygdrive_prefix" = x; then
47455    # As a simple fix, exclude /usr/bin since it's not a real path.
47456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47458      # a path prefixed by /cygdrive for fixpath to work.
47459      new_path="$CYGWIN_ROOT_PATH$input_path"
47460    fi
47461  fi
47462
47463
47464  if test "x$path" != "x$new_path"; then
47465    JT_HOME="$new_path"
47466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47467$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47468  fi
47469
47470    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47471
47472  path="$JT_HOME"
47473  has_colon=`$ECHO $path | $GREP ^.:`
47474  new_path="$path"
47475  if test "x$has_colon" = x; then
47476    # Not in mixed or Windows style, start by that.
47477    new_path=`cmd //c echo $path`
47478  fi
47479
47480
47481  input_path="$new_path"
47482  # Check if we need to convert this using DOS-style short mode. If the path
47483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47484  # take no chances and rewrite it.
47485  # Note: m4 eats our [], so we need to use [ and ] instead.
47486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47487  if test "x$has_forbidden_chars" != x; then
47488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47490  fi
47491
47492
47493  windows_path="$new_path"
47494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47495    unix_path=`$CYGPATH -u "$windows_path"`
47496    new_path="$unix_path"
47497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47499    new_path="$unix_path"
47500  fi
47501
47502  if test "x$path" != "x$new_path"; then
47503    JT_HOME="$new_path"
47504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47505$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47506  fi
47507
47508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47510
47511    else
47512      # We're on a unix platform. Hooray! :)
47513      path="$JT_HOME"
47514      has_space=`$ECHO "$path" | $GREP " "`
47515      if test "x$has_space" != x; then
47516        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47517$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47518        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47519      fi
47520
47521      # Use eval to expand a potential ~
47522      eval path="$path"
47523      if test ! -f "$path" && test ! -d "$path"; then
47524        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47525      fi
47526
47527      if test -d "$path"; then
47528        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47529      else
47530        dir="`$DIRNAME "$path"`"
47531        base="`$BASENAME "$path"`"
47532        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47533      fi
47534    fi
47535  fi
47536
47537
47538      # jtreg win32 script works for everybody
47539      JTREGEXE="$JT_HOME/bin/jtreg"
47540
47541      if test ! -f "$JTREGEXE"; then
47542        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47543      fi
47544
47545      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47546$as_echo "$JTREGEXE" >&6; }
47547    else
47548      # try to find jtreg on path
47549
47550
47551
47552  # Publish this variable in the help.
47553
47554
47555  if [ -z "${JTREGEXE+x}" ]; then
47556    # The variable is not set by user, try to locate tool using the code snippet
47557    for ac_prog in jtreg
47558do
47559  # Extract the first word of "$ac_prog", so it can be a program name with args.
47560set dummy $ac_prog; ac_word=$2
47561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47562$as_echo_n "checking for $ac_word... " >&6; }
47563if ${ac_cv_path_JTREGEXE+:} false; then :
47564  $as_echo_n "(cached) " >&6
47565else
47566  case $JTREGEXE in
47567  [\\/]* | ?:[\\/]*)
47568  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47569  ;;
47570  *)
47571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47572for as_dir in $PATH
47573do
47574  IFS=$as_save_IFS
47575  test -z "$as_dir" && as_dir=.
47576    for ac_exec_ext in '' $ac_executable_extensions; do
47577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47578    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47580    break 2
47581  fi
47582done
47583  done
47584IFS=$as_save_IFS
47585
47586  ;;
47587esac
47588fi
47589JTREGEXE=$ac_cv_path_JTREGEXE
47590if test -n "$JTREGEXE"; then
47591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47592$as_echo "$JTREGEXE" >&6; }
47593else
47594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47595$as_echo "no" >&6; }
47596fi
47597
47598
47599  test -n "$JTREGEXE" && break
47600done
47601
47602  else
47603    # The variable is set, but is it from the command line or the environment?
47604
47605    # Try to remove the string !JTREGEXE! from our list.
47606    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
47607    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47608      # If it failed, the variable was not from the command line. Ignore it,
47609      # but warn the user (except for BASH, which is always set by the calling BASH).
47610      if test "xJTREGEXE" != xBASH; then
47611        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
47612$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
47613      fi
47614      # Try to locate tool using the code snippet
47615      for ac_prog in jtreg
47616do
47617  # Extract the first word of "$ac_prog", so it can be a program name with args.
47618set dummy $ac_prog; ac_word=$2
47619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47620$as_echo_n "checking for $ac_word... " >&6; }
47621if ${ac_cv_path_JTREGEXE+:} false; then :
47622  $as_echo_n "(cached) " >&6
47623else
47624  case $JTREGEXE in
47625  [\\/]* | ?:[\\/]*)
47626  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47627  ;;
47628  *)
47629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47630for as_dir in $PATH
47631do
47632  IFS=$as_save_IFS
47633  test -z "$as_dir" && as_dir=.
47634    for ac_exec_ext in '' $ac_executable_extensions; do
47635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47636    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47638    break 2
47639  fi
47640done
47641  done
47642IFS=$as_save_IFS
47643
47644  ;;
47645esac
47646fi
47647JTREGEXE=$ac_cv_path_JTREGEXE
47648if test -n "$JTREGEXE"; then
47649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47650$as_echo "$JTREGEXE" >&6; }
47651else
47652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47653$as_echo "no" >&6; }
47654fi
47655
47656
47657  test -n "$JTREGEXE" && break
47658done
47659
47660    else
47661      # If it succeeded, then it was overridden by the user. We will use it
47662      # for the tool.
47663
47664      # First remove it from the list of overridden variables, so we can test
47665      # for unknown variables in the end.
47666      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47667
47668      # Check if we try to supply an empty value
47669      if test "x$JTREGEXE" = x; then
47670        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47671$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47673$as_echo_n "checking for JTREGEXE... " >&6; }
47674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47675$as_echo "disabled" >&6; }
47676      else
47677        # Check if the provided tool contains a complete path.
47678        tool_specified="$JTREGEXE"
47679        tool_basename="${tool_specified##*/}"
47680        if test "x$tool_basename" = "x$tool_specified"; then
47681          # A command without a complete path is provided, search $PATH.
47682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47683$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47684          # Extract the first word of "$tool_basename", so it can be a program name with args.
47685set dummy $tool_basename; ac_word=$2
47686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47687$as_echo_n "checking for $ac_word... " >&6; }
47688if ${ac_cv_path_JTREGEXE+:} false; then :
47689  $as_echo_n "(cached) " >&6
47690else
47691  case $JTREGEXE in
47692  [\\/]* | ?:[\\/]*)
47693  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47694  ;;
47695  *)
47696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47697for as_dir in $PATH
47698do
47699  IFS=$as_save_IFS
47700  test -z "$as_dir" && as_dir=.
47701    for ac_exec_ext in '' $ac_executable_extensions; do
47702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47703    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47705    break 2
47706  fi
47707done
47708  done
47709IFS=$as_save_IFS
47710
47711  ;;
47712esac
47713fi
47714JTREGEXE=$ac_cv_path_JTREGEXE
47715if test -n "$JTREGEXE"; then
47716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47717$as_echo "$JTREGEXE" >&6; }
47718else
47719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47720$as_echo "no" >&6; }
47721fi
47722
47723
47724          if test "x$JTREGEXE" = x; then
47725            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47726          fi
47727        else
47728          # Otherwise we believe it is a complete path. Use it as it is.
47729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47730$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47731          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47732$as_echo_n "checking for JTREGEXE... " >&6; }
47733          if test ! -x "$tool_specified"; then
47734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47735$as_echo "not found" >&6; }
47736            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47737          fi
47738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47739$as_echo "$tool_specified" >&6; }
47740        fi
47741      fi
47742    fi
47743
47744  fi
47745
47746
47747
47748  if test "x$JTREGEXE" = x; then
47749    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47750  fi
47751
47752
47753      JT_HOME="`$DIRNAME $JTREGEXE`"
47754    fi
47755  fi
47756
47757
47758
47759
47760
47761
47762  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47763  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47764  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47765  #                              commands produced by the link step (currently AIX only)
47766  if test "x$TOOLCHAIN_TYPE" = xxlc; then
47767    COMPILER_TARGET_BITS_FLAG="-q"
47768    COMPILER_COMMAND_FILE_FLAG="-f"
47769    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47770  else
47771    COMPILER_TARGET_BITS_FLAG="-m"
47772    COMPILER_COMMAND_FILE_FLAG="@"
47773    COMPILER_BINDCMD_FILE_FLAG=""
47774
47775    # The solstudio linker does not support @-files.
47776    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47777      COMPILER_COMMAND_FILE_FLAG=
47778    fi
47779
47780    # Check if @file is supported by gcc
47781    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47783$as_echo_n "checking if @file is supported by gcc... " >&6; }
47784      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47785      $ECHO "" "--version" > command.file
47786      if $CXX @command.file 2>&5 >&5; then
47787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47788$as_echo "yes" >&6; }
47789        COMPILER_COMMAND_FILE_FLAG="@"
47790      else
47791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47792$as_echo "no" >&6; }
47793        COMPILER_COMMAND_FILE_FLAG=
47794      fi
47795      rm -rf command.file
47796    fi
47797  fi
47798
47799
47800
47801
47802  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47803  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47804    ARFLAGS="-r"
47805  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47806    ARFLAGS="-X64"
47807  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47808    # lib.exe is used as AR to create static libraries.
47809    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47810  else
47811    ARFLAGS=""
47812  fi
47813
47814
47815  ## Setup strip.
47816  # FIXME: should this really be per platform, or should it be per toolchain type?
47817  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47818  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47819  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47820    STRIPFLAGS="-g"
47821  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47822    STRIPFLAGS="-x"
47823  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47824    STRIPFLAGS="-S"
47825  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47826    STRIPFLAGS="-X32_64"
47827  fi
47828
47829
47830
47831  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47832    CC_OUT_OPTION=-Fo
47833    EXE_OUT_OPTION=-out:
47834    LD_OUT_OPTION=-out:
47835    AR_OUT_OPTION=-out:
47836  else
47837    # The option used to specify the target .o,.a or .so file.
47838    # When compiling, how to specify the to be created object file.
47839    CC_OUT_OPTION='-o$(SPACE)'
47840    # When linking, how to specify the to be created executable.
47841    EXE_OUT_OPTION='-o$(SPACE)'
47842    # When linking, how to specify the to be created dynamically linkable library.
47843    LD_OUT_OPTION='-o$(SPACE)'
47844    # When archiving, how to specify the to be create static archive for object files.
47845    AR_OUT_OPTION='rcs$(SPACE)'
47846  fi
47847
47848
47849
47850
47851
47852  # On Windows, we need to set RC flags.
47853  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47854    RC_FLAGS="-nologo -l0x409"
47855    JVM_RCFLAGS="-nologo"
47856    if test "x$DEBUG_LEVEL" = xrelease; then
47857      RC_FLAGS="$RC_FLAGS -DNDEBUG"
47858      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
47859    fi
47860
47861    # The version variables used to create RC_FLAGS may be overridden
47862    # in a custom configure script, or possibly the command line.
47863    # Let those variables be expanded at make time in spec.gmk.
47864    # The \$ are escaped to the shell, and the $(...) variables
47865    # are evaluated by make.
47866    RC_FLAGS="$RC_FLAGS \
47867        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47868        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47869        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47870        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47871        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47872        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47873        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47874
47875    JVM_RCFLAGS="$JVM_RCFLAGS \
47876        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
47877        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
47878        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
47879        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
47880        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
47881        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
47882        -D\"HS_FNAME=jvm.dll\" \
47883        -D\"HS_INTERNAL_NAME=jvm\""
47884  fi
47885
47886
47887
47888  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47889    # silence copyright notice and other headers.
47890    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47891  fi
47892
47893
47894# Now we can test some aspects on the target using configure macros.
47895
47896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47897$as_echo_n "checking for ANSI C header files... " >&6; }
47898if ${ac_cv_header_stdc+:} false; then :
47899  $as_echo_n "(cached) " >&6
47900else
47901  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47902/* end confdefs.h.  */
47903#include <stdlib.h>
47904#include <stdarg.h>
47905#include <string.h>
47906#include <float.h>
47907
47908int
47909main ()
47910{
47911
47912  ;
47913  return 0;
47914}
47915_ACEOF
47916if ac_fn_cxx_try_compile "$LINENO"; then :
47917  ac_cv_header_stdc=yes
47918else
47919  ac_cv_header_stdc=no
47920fi
47921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47922
47923if test $ac_cv_header_stdc = yes; then
47924  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47925  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47926/* end confdefs.h.  */
47927#include <string.h>
47928
47929_ACEOF
47930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47931  $EGREP "memchr" >/dev/null 2>&1; then :
47932
47933else
47934  ac_cv_header_stdc=no
47935fi
47936rm -f conftest*
47937
47938fi
47939
47940if test $ac_cv_header_stdc = yes; then
47941  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47943/* end confdefs.h.  */
47944#include <stdlib.h>
47945
47946_ACEOF
47947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47948  $EGREP "free" >/dev/null 2>&1; then :
47949
47950else
47951  ac_cv_header_stdc=no
47952fi
47953rm -f conftest*
47954
47955fi
47956
47957if test $ac_cv_header_stdc = yes; then
47958  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47959  if test "$cross_compiling" = yes; then :
47960  :
47961else
47962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47963/* end confdefs.h.  */
47964#include <ctype.h>
47965#include <stdlib.h>
47966#if ((' ' & 0x0FF) == 0x020)
47967# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47968# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47969#else
47970# define ISLOWER(c) \
47971		   (('a' <= (c) && (c) <= 'i') \
47972		     || ('j' <= (c) && (c) <= 'r') \
47973		     || ('s' <= (c) && (c) <= 'z'))
47974# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47975#endif
47976
47977#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47978int
47979main ()
47980{
47981  int i;
47982  for (i = 0; i < 256; i++)
47983    if (XOR (islower (i), ISLOWER (i))
47984	|| toupper (i) != TOUPPER (i))
47985      return 2;
47986  return 0;
47987}
47988_ACEOF
47989if ac_fn_cxx_try_run "$LINENO"; then :
47990
47991else
47992  ac_cv_header_stdc=no
47993fi
47994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47995  conftest.$ac_objext conftest.beam conftest.$ac_ext
47996fi
47997
47998fi
47999fi
48000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48001$as_echo "$ac_cv_header_stdc" >&6; }
48002if test $ac_cv_header_stdc = yes; then
48003
48004$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48005
48006fi
48007
48008# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48009for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48010		  inttypes.h stdint.h unistd.h
48011do :
48012  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48013ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48014"
48015if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48016  cat >>confdefs.h <<_ACEOF
48017#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48018_ACEOF
48019
48020fi
48021
48022done
48023
48024
48025
48026  ###############################################################################
48027  #
48028  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48029  # (The JVM can use 32 or 64 bit Java pointers but that decision
48030  # is made at runtime.)
48031  #
48032
48033  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48034    # Always specify -m flag on Solaris
48035    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48036
48037  # When we add flags to the "official" CFLAGS etc, we need to
48038  # keep track of these additions in ADDED_CFLAGS etc. These
48039  # will later be checked to make sure only controlled additions
48040  # have been made to CFLAGS etc.
48041  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48042  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48043  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48044
48045  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48046  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48047  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48048
48049  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48050  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48051  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48052
48053  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48054  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48055  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48056
48057  elif test "x$COMPILE_TYPE" = xreduced; then
48058    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48059      # Specify -m if running reduced on unix platforms
48060
48061  # When we add flags to the "official" CFLAGS etc, we need to
48062  # keep track of these additions in ADDED_CFLAGS etc. These
48063  # will later be checked to make sure only controlled additions
48064  # have been made to CFLAGS etc.
48065  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48066  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48067  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48068
48069  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48070  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48071  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48072
48073  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48074  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48075  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48076
48077  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48078  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48079  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48080
48081    fi
48082  fi
48083  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48084    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48085    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48086    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48087  fi
48088
48089  # Make compilation sanity check
48090  for ac_header in stdio.h
48091do :
48092  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48093if test "x$ac_cv_header_stdio_h" = xyes; then :
48094  cat >>confdefs.h <<_ACEOF
48095#define HAVE_STDIO_H 1
48096_ACEOF
48097
48098else
48099
48100    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48101$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48102    if test "x$COMPILE_TYPE" = xreduced; then
48103
48104  # Print a helpful message on how to acquire the necessary build dependency.
48105  # reduced is the help tag: freetype, cups, alsa etc
48106  MISSING_DEPENDENCY=reduced
48107
48108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48109    cygwin_help $MISSING_DEPENDENCY
48110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48111    msys_help $MISSING_DEPENDENCY
48112  else
48113    PKGHANDLER_COMMAND=
48114
48115    case $PKGHANDLER in
48116      apt-get)
48117        apt_help     $MISSING_DEPENDENCY ;;
48118      yum)
48119        yum_help     $MISSING_DEPENDENCY ;;
48120      port)
48121        port_help    $MISSING_DEPENDENCY ;;
48122      pkgutil)
48123        pkgutil_help $MISSING_DEPENDENCY ;;
48124      pkgadd)
48125        pkgadd_help  $MISSING_DEPENDENCY ;;
48126    esac
48127
48128    if test "x$PKGHANDLER_COMMAND" != x; then
48129      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48130    fi
48131  fi
48132
48133      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48134$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48135    elif test "x$COMPILE_TYPE" = xcross; then
48136      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48137$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48138    fi
48139    as_fn_error $? "Cannot continue." "$LINENO" 5
48140
48141fi
48142
48143done
48144
48145
48146  # The cast to long int works around a bug in the HP C Compiler
48147# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48148# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48149# This bug is HP SR number 8606223364.
48150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48151$as_echo_n "checking size of int *... " >&6; }
48152if ${ac_cv_sizeof_int_p+:} false; then :
48153  $as_echo_n "(cached) " >&6
48154else
48155  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48156
48157else
48158  if test "$ac_cv_type_int_p" = yes; then
48159     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48161as_fn_error 77 "cannot compute sizeof (int *)
48162See \`config.log' for more details" "$LINENO" 5; }
48163   else
48164     ac_cv_sizeof_int_p=0
48165   fi
48166fi
48167
48168fi
48169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48170$as_echo "$ac_cv_sizeof_int_p" >&6; }
48171
48172
48173
48174cat >>confdefs.h <<_ACEOF
48175#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48176_ACEOF
48177
48178
48179
48180  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48181  if test "x$ac_cv_sizeof_int_p" = x; then
48182    # The test failed, lets stick to the assumed value.
48183    { $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
48184$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48185  else
48186    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48187
48188    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48189      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48190      # Let's try to implicitely set the compilers target architecture and retry the test
48191      { $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
48192$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;}
48193      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48194$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48195
48196  # When we add flags to the "official" CFLAGS etc, we need to
48197  # keep track of these additions in ADDED_CFLAGS etc. These
48198  # will later be checked to make sure only controlled additions
48199  # have been made to CFLAGS etc.
48200  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48201  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48202  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48203
48204  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48205  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48206  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48207
48208  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48209  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48210  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48211
48212  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48213  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48214  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48215
48216
48217      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48218      unset ac_cv_sizeof_int_p
48219      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48220      cat >>confdefs.h <<_ACEOF
48221#undef SIZEOF_INT_P
48222_ACEOF
48223
48224      # The cast to long int works around a bug in the HP C Compiler
48225# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48226# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48227# This bug is HP SR number 8606223364.
48228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48229$as_echo_n "checking size of int *... " >&6; }
48230if ${ac_cv_sizeof_int_p+:} false; then :
48231  $as_echo_n "(cached) " >&6
48232else
48233  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48234
48235else
48236  if test "$ac_cv_type_int_p" = yes; then
48237     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48239as_fn_error 77 "cannot compute sizeof (int *)
48240See \`config.log' for more details" "$LINENO" 5; }
48241   else
48242     ac_cv_sizeof_int_p=0
48243   fi
48244fi
48245
48246fi
48247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48248$as_echo "$ac_cv_sizeof_int_p" >&6; }
48249
48250
48251
48252cat >>confdefs.h <<_ACEOF
48253#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48254_ACEOF
48255
48256
48257
48258      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48259
48260      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48261        { $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
48262$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;}
48263        if test "x$COMPILE_TYPE" = xreduced; then
48264
48265  # Print a helpful message on how to acquire the necessary build dependency.
48266  # reduced is the help tag: freetype, cups, alsa etc
48267  MISSING_DEPENDENCY=reduced
48268
48269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48270    cygwin_help $MISSING_DEPENDENCY
48271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48272    msys_help $MISSING_DEPENDENCY
48273  else
48274    PKGHANDLER_COMMAND=
48275
48276    case $PKGHANDLER in
48277      apt-get)
48278        apt_help     $MISSING_DEPENDENCY ;;
48279      yum)
48280        yum_help     $MISSING_DEPENDENCY ;;
48281      port)
48282        port_help    $MISSING_DEPENDENCY ;;
48283      pkgutil)
48284        pkgutil_help $MISSING_DEPENDENCY ;;
48285      pkgadd)
48286        pkgadd_help  $MISSING_DEPENDENCY ;;
48287    esac
48288
48289    if test "x$PKGHANDLER_COMMAND" != x; then
48290      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48291    fi
48292  fi
48293
48294          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48295$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48296        elif test "x$COMPILE_TYPE" = xcross; then
48297          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48298$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48299        fi
48300        as_fn_error $? "Cannot continue." "$LINENO" 5
48301      fi
48302    fi
48303  fi
48304
48305  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48306$as_echo_n "checking for target address size... " >&6; }
48307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48308$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48309
48310
48311  ###############################################################################
48312  #
48313  # Is the target little of big endian?
48314  #
48315   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48316$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48317if ${ac_cv_c_bigendian+:} false; then :
48318  $as_echo_n "(cached) " >&6
48319else
48320  ac_cv_c_bigendian=unknown
48321    # See if we're dealing with a universal compiler.
48322    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48323/* end confdefs.h.  */
48324#ifndef __APPLE_CC__
48325	       not a universal capable compiler
48326	     #endif
48327	     typedef int dummy;
48328
48329_ACEOF
48330if ac_fn_cxx_try_compile "$LINENO"; then :
48331
48332	# Check for potential -arch flags.  It is not universal unless
48333	# there are at least two -arch flags with different values.
48334	ac_arch=
48335	ac_prev=
48336	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48337	 if test -n "$ac_prev"; then
48338	   case $ac_word in
48339	     i?86 | x86_64 | ppc | ppc64)
48340	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48341		 ac_arch=$ac_word
48342	       else
48343		 ac_cv_c_bigendian=universal
48344		 break
48345	       fi
48346	       ;;
48347	   esac
48348	   ac_prev=
48349	 elif test "x$ac_word" = "x-arch"; then
48350	   ac_prev=arch
48351	 fi
48352       done
48353fi
48354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48355    if test $ac_cv_c_bigendian = unknown; then
48356      # See if sys/param.h defines the BYTE_ORDER macro.
48357      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48358/* end confdefs.h.  */
48359#include <sys/types.h>
48360	     #include <sys/param.h>
48361
48362int
48363main ()
48364{
48365#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48366		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48367		     && LITTLE_ENDIAN)
48368	      bogus endian macros
48369	     #endif
48370
48371  ;
48372  return 0;
48373}
48374_ACEOF
48375if ac_fn_cxx_try_compile "$LINENO"; then :
48376  # It does; now see whether it defined to BIG_ENDIAN or not.
48377	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48378/* end confdefs.h.  */
48379#include <sys/types.h>
48380		#include <sys/param.h>
48381
48382int
48383main ()
48384{
48385#if BYTE_ORDER != BIG_ENDIAN
48386		 not big endian
48387		#endif
48388
48389  ;
48390  return 0;
48391}
48392_ACEOF
48393if ac_fn_cxx_try_compile "$LINENO"; then :
48394  ac_cv_c_bigendian=yes
48395else
48396  ac_cv_c_bigendian=no
48397fi
48398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48399fi
48400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48401    fi
48402    if test $ac_cv_c_bigendian = unknown; then
48403      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48404      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48405/* end confdefs.h.  */
48406#include <limits.h>
48407
48408int
48409main ()
48410{
48411#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48412	      bogus endian macros
48413	     #endif
48414
48415  ;
48416  return 0;
48417}
48418_ACEOF
48419if ac_fn_cxx_try_compile "$LINENO"; then :
48420  # It does; now see whether it defined to _BIG_ENDIAN or not.
48421	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48422/* end confdefs.h.  */
48423#include <limits.h>
48424
48425int
48426main ()
48427{
48428#ifndef _BIG_ENDIAN
48429		 not big endian
48430		#endif
48431
48432  ;
48433  return 0;
48434}
48435_ACEOF
48436if ac_fn_cxx_try_compile "$LINENO"; then :
48437  ac_cv_c_bigendian=yes
48438else
48439  ac_cv_c_bigendian=no
48440fi
48441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48442fi
48443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48444    fi
48445    if test $ac_cv_c_bigendian = unknown; then
48446      # Compile a test program.
48447      if test "$cross_compiling" = yes; then :
48448  # Try to guess by grepping values from an object file.
48449	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48450/* end confdefs.h.  */
48451short int ascii_mm[] =
48452		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48453		short int ascii_ii[] =
48454		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48455		int use_ascii (int i) {
48456		  return ascii_mm[i] + ascii_ii[i];
48457		}
48458		short int ebcdic_ii[] =
48459		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48460		short int ebcdic_mm[] =
48461		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48462		int use_ebcdic (int i) {
48463		  return ebcdic_mm[i] + ebcdic_ii[i];
48464		}
48465		extern int foo;
48466
48467int
48468main ()
48469{
48470return use_ascii (foo) == use_ebcdic (foo);
48471  ;
48472  return 0;
48473}
48474_ACEOF
48475if ac_fn_cxx_try_compile "$LINENO"; then :
48476  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48477	      ac_cv_c_bigendian=yes
48478	    fi
48479	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48480	      if test "$ac_cv_c_bigendian" = unknown; then
48481		ac_cv_c_bigendian=no
48482	      else
48483		# finding both strings is unlikely to happen, but who knows?
48484		ac_cv_c_bigendian=unknown
48485	      fi
48486	    fi
48487fi
48488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48489else
48490  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48491/* end confdefs.h.  */
48492$ac_includes_default
48493int
48494main ()
48495{
48496
48497	     /* Are we little or big endian?  From Harbison&Steele.  */
48498	     union
48499	     {
48500	       long int l;
48501	       char c[sizeof (long int)];
48502	     } u;
48503	     u.l = 1;
48504	     return u.c[sizeof (long int) - 1] == 1;
48505
48506  ;
48507  return 0;
48508}
48509_ACEOF
48510if ac_fn_cxx_try_run "$LINENO"; then :
48511  ac_cv_c_bigendian=no
48512else
48513  ac_cv_c_bigendian=yes
48514fi
48515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48516  conftest.$ac_objext conftest.beam conftest.$ac_ext
48517fi
48518
48519    fi
48520fi
48521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48522$as_echo "$ac_cv_c_bigendian" >&6; }
48523 case $ac_cv_c_bigendian in #(
48524   yes)
48525     ENDIAN="big";; #(
48526   no)
48527     ENDIAN="little" ;; #(
48528   universal)
48529     ENDIAN="universal_endianness"
48530     ;; #(
48531   *)
48532     ENDIAN="unknown" ;;
48533 esac
48534
48535
48536  if test "x$ENDIAN" = xuniversal_endianness; then
48537    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48538  fi
48539  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48540    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
48541  fi
48542
48543
48544# Configure flags for the tools
48545
48546  ###############################################################################
48547  #
48548  # How to compile shared libraries.
48549  #
48550
48551  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48552    PICFLAG="-fPIC"
48553    C_FLAG_REORDER=''
48554    CXX_FLAG_REORDER=''
48555
48556    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48557      # Linking is different on MacOSX
48558      if test "x$STATIC_BUILD" = xtrue; then
48559        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48560      else
48561        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48562        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48563      fi
48564      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48565      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48566      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48567      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48568    else
48569      # Default works for linux, might work on other platforms as well.
48570      SHARED_LIBRARY_FLAGS='-shared'
48571      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48572      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48573      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48574      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48575    fi
48576  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48577    C_FLAG_REORDER=''
48578    CXX_FLAG_REORDER=''
48579
48580    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48581      # Linking is different on MacOSX
48582      PICFLAG=''
48583      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48584      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48585      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48586      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48587      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48588
48589      if test "x$STATIC_BUILD" = xfalse; then
48590        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48591      fi
48592    else
48593      # Default works for linux, might work on other platforms as well.
48594      PICFLAG='-fPIC'
48595      SHARED_LIBRARY_FLAGS='-shared'
48596      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48597      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48598      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48599      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48600    fi
48601  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48602    PICFLAG="-KPIC"
48603    C_FLAG_REORDER='-xF'
48604    CXX_FLAG_REORDER='-xF'
48605    SHARED_LIBRARY_FLAGS="-G"
48606    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
48607    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48608    SET_SHARED_LIBRARY_NAME='-h $1'
48609    SET_SHARED_LIBRARY_MAPFILE='-M$1'
48610  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48611    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
48612    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
48613    # will have to patch this single instruction with a call to some out-of-order code which
48614    # does the load from the TOC. This is of course slow. But in that case we also would have
48615    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
48616    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
48617    # can be patched directly by the linker and does not require a jump to out-of-order code.
48618    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
48619    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
48620    # loads for accessing a global variable). But there are rumors that this may be seen as a
48621    # 'performance feature' because of improved code locality of the symbols used in a
48622    # compilation unit.
48623    PICFLAG="-qpic"
48624    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48625    C_FLAG_REORDER=''
48626    CXX_FLAG_REORDER=''
48627    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
48628    SET_EXECUTABLE_ORIGIN=""
48629    SET_SHARED_LIBRARY_ORIGIN=''
48630    SET_SHARED_LIBRARY_NAME=''
48631    SET_SHARED_LIBRARY_MAPFILE=''
48632  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48633    PICFLAG=""
48634    C_FLAG_REORDER=''
48635    CXX_FLAG_REORDER=''
48636    SHARED_LIBRARY_FLAGS="-dll"
48637    SET_EXECUTABLE_ORIGIN=''
48638    SET_SHARED_LIBRARY_ORIGIN=''
48639    SET_SHARED_LIBRARY_NAME=''
48640    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
48641  fi
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651  # The (cross) compiler is now configured, we can now test capabilities
48652  # of the target platform.
48653
48654
48655
48656  ###############################################################################
48657  #
48658  # Setup the opt flags for different compilers
48659  # and different operating systems.
48660  #
48661
48662  # FIXME: this was indirectly the old default, but just inherited.
48663  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48664  #   C_FLAG_DEPS="-MMD -MF"
48665  # fi
48666
48667  # Generate make dependency files
48668  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48669    C_FLAG_DEPS="-MMD -MF"
48670  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48671    C_FLAG_DEPS="-MMD -MF"
48672  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48673    C_FLAG_DEPS="-xMMD -xMF"
48674  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48675    C_FLAG_DEPS="-qmakedep=gcc -MF"
48676  fi
48677  CXX_FLAG_DEPS="$C_FLAG_DEPS"
48678
48679
48680
48681  # Debug symbols
48682  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48683    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48684      # reduce from default "-g2" option to save space
48685      CFLAGS_DEBUG_SYMBOLS="-g1"
48686      CXXFLAGS_DEBUG_SYMBOLS="-g1"
48687    else
48688      CFLAGS_DEBUG_SYMBOLS="-g"
48689      CXXFLAGS_DEBUG_SYMBOLS="-g"
48690    fi
48691  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48692    CFLAGS_DEBUG_SYMBOLS="-g"
48693    CXXFLAGS_DEBUG_SYMBOLS="-g"
48694  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48695    CFLAGS_DEBUG_SYMBOLS="-g -xs"
48696    # -g0 enables debug symbols without disabling inlining.
48697    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48698  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48699    CFLAGS_DEBUG_SYMBOLS="-g"
48700    CXXFLAGS_DEBUG_SYMBOLS="-g"
48701  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48702    CFLAGS_DEBUG_SYMBOLS="-Zi"
48703    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48704  fi
48705
48706
48707
48708  # Debug symbols for JVM_CFLAGS
48709  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48710    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
48711    if test "x$DEBUG_LEVEL" = xslowdebug; then
48712      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48713    else
48714      # -g0 does not disable inlining, which -g does.
48715      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
48716    fi
48717  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48718    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
48719  else
48720    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48721  fi
48722
48723
48724  # bounds, memory and behavior checking options
48725  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48726    case $DEBUG_LEVEL in
48727    release )
48728      # no adjustment
48729      ;;
48730    fastdebug )
48731      # no adjustment
48732      ;;
48733    slowdebug )
48734      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
48735      # get's added conditionally on whether we produce debug symbols or not.
48736      # This is most likely not really correct.
48737
48738      # Add runtime stack smashing and undefined behavior checks.
48739      # Not all versions of gcc support -fstack-protector
48740      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
48741
48742
48743
48744
48745
48746
48747
48748
48749
48750
48751
48752
48753
48754
48755
48756
48757
48758
48759
48760
48761
48762
48763
48764
48765
48766
48767
48768
48769
48770
48771
48772
48773
48774
48775
48776
48777
48778
48779
48780
48781
48782
48783    # Execute function body
48784
48785
48786
48787
48788
48789
48790
48791
48792
48793
48794
48795
48796
48797
48798
48799
48800
48801
48802
48803
48804
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    # Execute function body
48833
48834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48835$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48836  supports=yes
48837
48838  saved_cflags="$CFLAGS"
48839  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48840  ac_ext=c
48841ac_cpp='$CPP $CPPFLAGS'
48842ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48843ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48844ac_compiler_gnu=$ac_cv_c_compiler_gnu
48845
48846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48847/* end confdefs.h.  */
48848int i;
48849_ACEOF
48850if ac_fn_c_try_compile "$LINENO"; then :
48851
48852else
48853  supports=no
48854fi
48855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48856  ac_ext=cpp
48857ac_cpp='$CXXCPP $CPPFLAGS'
48858ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48859ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48860ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48861
48862  CFLAGS="$saved_cflags"
48863
48864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48865$as_echo "$supports" >&6; }
48866  if test "x$supports" = "xyes" ; then
48867    :
48868    C_COMP_SUPPORTS="yes"
48869  else
48870    :
48871    C_COMP_SUPPORTS="no"
48872  fi
48873
48874
48875
48876
48877
48878
48879
48880
48881
48882
48883
48884
48885
48886
48887
48888
48889
48890
48891
48892
48893
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    # Execute function body
48933
48934  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48935$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48936  supports=yes
48937
48938  saved_cxxflags="$CXXFLAGS"
48939  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48940  ac_ext=cpp
48941ac_cpp='$CXXCPP $CPPFLAGS'
48942ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48943ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48944ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48945
48946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48947/* end confdefs.h.  */
48948int i;
48949_ACEOF
48950if ac_fn_cxx_try_compile "$LINENO"; then :
48951
48952else
48953  supports=no
48954fi
48955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48956  ac_ext=cpp
48957ac_cpp='$CXXCPP $CPPFLAGS'
48958ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48959ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48960ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48961
48962  CXXFLAGS="$saved_cxxflags"
48963
48964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48965$as_echo "$supports" >&6; }
48966  if test "x$supports" = "xyes" ; then
48967    :
48968    CXX_COMP_SUPPORTS="yes"
48969  else
48970    :
48971    CXX_COMP_SUPPORTS="no"
48972  fi
48973
48974
48975
48976
48977
48978
48979
48980
48981
48982
48983
48984
48985
48986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48987$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48988  supports=no
48989  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48990
48991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48992$as_echo "$supports" >&6; }
48993  if test "x$supports" = "xyes" ; then
48994    :
48995
48996  else
48997    :
48998    STACK_PROTECTOR_CFLAG=""
48999  fi
49000
49001
49002
49003
49004
49005
49006
49007      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49008      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49009      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49010        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49011      fi
49012      ;;
49013    esac
49014  fi
49015
49016  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49017    if test "x$DEBUG_LEVEL" != xrelease; then
49018      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49019        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49020      fi
49021    fi
49022  fi
49023
49024  # Optimization levels
49025  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49026    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49027
49028    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49029      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49030      C_O_FLAG_HIGHEST_JVM="-xO4"
49031      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49032      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49033      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49034      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49035      C_O_FLAG_DEBUG_JVM=""
49036      C_O_FLAG_NONE="-xregs=no%frameptr"
49037      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49038      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49039      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49040      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49041      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49042      CXX_O_FLAG_DEBUG_JVM=""
49043      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49044      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49045        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49046        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49047      fi
49048    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49049      C_O_FLAG_HIGHEST_JVM="-xO4"
49050      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49051      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49052      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49053      C_O_FLAG_DEBUG=""
49054      C_O_FLAG_DEBUG_JVM=""
49055      C_O_FLAG_NONE=""
49056      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49057      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49058      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49059      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49060      CXX_O_FLAG_DEBUG=""
49061      CXX_O_FLAG_DEBUG_JVM=""
49062      CXX_O_FLAG_NONE=""
49063    fi
49064  else
49065    # The remaining toolchains share opt flags between CC and CXX;
49066    # setup for C and duplicate afterwards.
49067    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49068      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49069        # On MacOSX we optimize for size, something
49070        # we should do for all platforms?
49071        C_O_FLAG_HIGHEST_JVM="-Os"
49072        C_O_FLAG_HIGHEST="-Os"
49073        C_O_FLAG_HI="-Os"
49074        C_O_FLAG_NORM="-Os"
49075        C_O_FLAG_SIZE="-Os"
49076      else
49077        C_O_FLAG_HIGHEST_JVM="-O3"
49078        C_O_FLAG_HIGHEST="-O3"
49079        C_O_FLAG_HI="-O3"
49080        C_O_FLAG_NORM="-O2"
49081        C_O_FLAG_SIZE="-Os"
49082      fi
49083      C_O_FLAG_DEBUG="-O0"
49084      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49085        C_O_FLAG_DEBUG_JVM=""
49086      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49087        C_O_FLAG_DEBUG_JVM="-O0"
49088      fi
49089      C_O_FLAG_NONE="-O0"
49090    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49091      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49092        # On MacOSX we optimize for size, something
49093        # we should do for all platforms?
49094        C_O_FLAG_HIGHEST_JVM="-Os"
49095        C_O_FLAG_HIGHEST="-Os"
49096        C_O_FLAG_HI="-Os"
49097        C_O_FLAG_NORM="-Os"
49098        C_O_FLAG_SIZE="-Os"
49099      else
49100        C_O_FLAG_HIGHEST_JVM="-O3"
49101        C_O_FLAG_HIGHEST="-O3"
49102        C_O_FLAG_HI="-O3"
49103        C_O_FLAG_NORM="-O2"
49104        C_O_FLAG_SIZE="-Os"
49105      fi
49106      C_O_FLAG_DEBUG="-O0"
49107      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49108        C_O_FLAG_DEBUG_JVM=""
49109      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49110        C_O_FLAG_DEBUG_JVM="-O0"
49111      fi
49112      C_O_FLAG_NONE="-O0"
49113    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49114      C_O_FLAG_HIGHEST_JVM="-O3"
49115      C_O_FLAG_HIGHEST="-O3"
49116      C_O_FLAG_HI="-O3 -qstrict"
49117      C_O_FLAG_NORM="-O2"
49118      C_O_FLAG_DEBUG="-qnoopt"
49119      # FIXME: Value below not verified.
49120      C_O_FLAG_DEBUG_JVM=""
49121      C_O_FLAG_NONE="-qnoopt"
49122    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49123      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49124      C_O_FLAG_HIGHEST="-O2"
49125      C_O_FLAG_HI="-O1"
49126      C_O_FLAG_NORM="-O1"
49127      C_O_FLAG_DEBUG="-Od"
49128      C_O_FLAG_DEBUG_JVM=""
49129      C_O_FLAG_NONE="-Od"
49130      C_O_FLAG_SIZE="-Os"
49131    fi
49132    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49133    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49134    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49135    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49136    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49137    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49138    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49139    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49140  fi
49141
49142  # Adjust optimization flags according to debug level.
49143  case $DEBUG_LEVEL in
49144    release )
49145      # no adjustment
49146      ;;
49147    fastdebug )
49148      # Not quite so much optimization
49149      C_O_FLAG_HI="$C_O_FLAG_NORM"
49150      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49151      ;;
49152    slowdebug )
49153      # Disable optimization
49154      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49155      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49156      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49157      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49158      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49159      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49160      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49161      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49162      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49163      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49164      ;;
49165  esac
49166
49167
49168
49169
49170
49171
49172
49173
49174
49175
49176
49177
49178
49179
49180
49181
49182
49183
49184
49185  # Special extras...
49186  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49187    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49188      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49189      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49190    fi
49191    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49192    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49193  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49194    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49195    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49196  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49197    CXXSTD_CXXFLAG="-std=gnu++98"
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240    # Execute function body
49241
49242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49243$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49244  supports=yes
49245
49246  saved_cxxflags="$CXXFLAGS"
49247  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49248  ac_ext=cpp
49249ac_cpp='$CXXCPP $CPPFLAGS'
49250ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49251ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49252ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49253
49254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49255/* end confdefs.h.  */
49256int i;
49257_ACEOF
49258if ac_fn_cxx_try_compile "$LINENO"; then :
49259
49260else
49261  supports=no
49262fi
49263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49264  ac_ext=cpp
49265ac_cpp='$CXXCPP $CPPFLAGS'
49266ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49267ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49268ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49269
49270  CXXFLAGS="$saved_cxxflags"
49271
49272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49273$as_echo "$supports" >&6; }
49274  if test "x$supports" = "xyes" ; then
49275    :
49276
49277  else
49278    :
49279    CXXSTD_CXXFLAG=""
49280  fi
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49294
49295  fi
49296  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49297    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49298    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49299    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49300    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49301    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49302  fi
49303
49304  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49305    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49306    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49307    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49308  fi
49309
49310  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49311  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49312  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49313
49314  ###############################################################################
49315  #
49316  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49317  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49318  #
49319
49320  # Setup compiler/platform specific flags into
49321  #    CFLAGS_JDK    - C Compiler flags
49322  #    CXXFLAGS_JDK  - C++ Compiler flags
49323  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49324  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49325    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49326    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49327    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49328    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49329      # Force compatibility with i586 on 32 bit intel platforms.
49330      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49331      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49332    fi
49333    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49334        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49335    case $OPENJDK_TARGET_CPU_ARCH in
49336      arm )
49337        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49338        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49339        ;;
49340      ppc )
49341        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49342        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49343        ;;
49344      * )
49345        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49346        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49347        ;;
49348    esac
49349
49350
49351
49352
49353
49354
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
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    # Execute function body
49404
49405  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49406  REFERENCE_VERSION=6
49407
49408  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49409    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49410  fi
49411
49412  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49413    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49414  fi
49415
49416  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49417  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49418
49419  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49420    :
49421
49422  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49423  # runs afoul of the more aggressive versions of these optimisations.
49424  # Notably, value range propagation now assumes that the this pointer of C++
49425  # member functions is non-null.
49426  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468
49469    # Execute function body
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
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    # Execute function body
49519
49520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49521$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49522  supports=yes
49523
49524  saved_cflags="$CFLAGS"
49525  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49526  ac_ext=c
49527ac_cpp='$CPP $CPPFLAGS'
49528ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49529ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49530ac_compiler_gnu=$ac_cv_c_compiler_gnu
49531
49532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49533/* end confdefs.h.  */
49534int i;
49535_ACEOF
49536if ac_fn_c_try_compile "$LINENO"; then :
49537
49538else
49539  supports=no
49540fi
49541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49542  ac_ext=cpp
49543ac_cpp='$CXXCPP $CPPFLAGS'
49544ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49545ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49546ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49547
49548  CFLAGS="$saved_cflags"
49549
49550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49551$as_echo "$supports" >&6; }
49552  if test "x$supports" = "xyes" ; then
49553    :
49554    C_COMP_SUPPORTS="yes"
49555  else
49556    :
49557    C_COMP_SUPPORTS="no"
49558  fi
49559
49560
49561
49562
49563
49564
49565
49566
49567
49568
49569
49570
49571
49572
49573
49574
49575
49576
49577
49578
49579
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    # Execute function body
49619
49620  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49621$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49622  supports=yes
49623
49624  saved_cxxflags="$CXXFLAGS"
49625  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49626  ac_ext=cpp
49627ac_cpp='$CXXCPP $CPPFLAGS'
49628ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49629ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49630ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49631
49632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49633/* end confdefs.h.  */
49634int i;
49635_ACEOF
49636if ac_fn_cxx_try_compile "$LINENO"; then :
49637
49638else
49639  supports=no
49640fi
49641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49642  ac_ext=cpp
49643ac_cpp='$CXXCPP $CPPFLAGS'
49644ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49645ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49646ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49647
49648  CXXFLAGS="$saved_cxxflags"
49649
49650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49651$as_echo "$supports" >&6; }
49652  if test "x$supports" = "xyes" ; then
49653    :
49654    CXX_COMP_SUPPORTS="yes"
49655  else
49656    :
49657    CXX_COMP_SUPPORTS="no"
49658  fi
49659
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49673$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49674  supports=no
49675  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49676
49677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49678$as_echo "$supports" >&6; }
49679  if test "x$supports" = "xyes" ; then
49680    :
49681
49682  else
49683    :
49684    NO_NULL_POINTER_CHECK_CFLAG=""
49685  fi
49686
49687
49688
49689
49690
49691
49692
49693  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736    # Execute function body
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750
49751
49752
49753
49754
49755
49756
49757
49758
49759
49760
49761
49762
49763
49764
49765
49766
49767
49768
49769
49770
49771
49772
49773
49774
49775
49776
49777
49778
49779
49780
49781
49782
49783
49784
49785    # Execute function body
49786
49787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49788$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49789  supports=yes
49790
49791  saved_cflags="$CFLAGS"
49792  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49793  ac_ext=c
49794ac_cpp='$CPP $CPPFLAGS'
49795ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49796ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49797ac_compiler_gnu=$ac_cv_c_compiler_gnu
49798
49799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49800/* end confdefs.h.  */
49801int i;
49802_ACEOF
49803if ac_fn_c_try_compile "$LINENO"; then :
49804
49805else
49806  supports=no
49807fi
49808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49809  ac_ext=cpp
49810ac_cpp='$CXXCPP $CPPFLAGS'
49811ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49812ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49813ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49814
49815  CFLAGS="$saved_cflags"
49816
49817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49818$as_echo "$supports" >&6; }
49819  if test "x$supports" = "xyes" ; then
49820    :
49821    C_COMP_SUPPORTS="yes"
49822  else
49823    :
49824    C_COMP_SUPPORTS="no"
49825  fi
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885    # Execute function body
49886
49887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49888$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49889  supports=yes
49890
49891  saved_cxxflags="$CXXFLAGS"
49892  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49893  ac_ext=cpp
49894ac_cpp='$CXXCPP $CPPFLAGS'
49895ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49896ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49897ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49898
49899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49900/* end confdefs.h.  */
49901int i;
49902_ACEOF
49903if ac_fn_cxx_try_compile "$LINENO"; then :
49904
49905else
49906  supports=no
49907fi
49908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49909  ac_ext=cpp
49910ac_cpp='$CXXCPP $CPPFLAGS'
49911ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49912ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49913ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49914
49915  CXXFLAGS="$saved_cxxflags"
49916
49917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49918$as_echo "$supports" >&6; }
49919  if test "x$supports" = "xyes" ; then
49920    :
49921    CXX_COMP_SUPPORTS="yes"
49922  else
49923    :
49924    CXX_COMP_SUPPORTS="no"
49925  fi
49926
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49940$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49941  supports=no
49942  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49943
49944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49945$as_echo "$supports" >&6; }
49946  if test "x$supports" = "xyes" ; then
49947    :
49948
49949  else
49950    :
49951    NO_LIFETIME_DSE_CFLAG=""
49952  fi
49953
49954
49955
49956
49957
49958
49959  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49960
49961
49962
49963  else
49964    :
49965
49966  fi
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49982    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49983
49984    # Restrict the debug information created by Clang to avoid
49985    # too big object files and speed the build up a little bit
49986    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49987    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49988    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49989      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49990        # Force compatibility with i586 on 32 bit intel platforms.
49991        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49992        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49993      fi
49994      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49995      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49996          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49997      case $OPENJDK_TARGET_CPU_ARCH in
49998        ppc )
49999          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50000          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50001          ;;
50002        * )
50003          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50004          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50005          ;;
50006      esac
50007    fi
50008  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50009    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50010    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50011    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50012      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50013    fi
50014
50015    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50016    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50017  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50018    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50019    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50020    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50021  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50022    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50023        -MD -Zc:wchar_t- -W3 -wd4800 \
50024        -DWIN32_LEAN_AND_MEAN \
50025        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50026        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50027        -DWIN32 -DIAL"
50028    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50029      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50030    else
50031      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50032    fi
50033    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50034    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50035    # studio.
50036    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50037      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50038      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50039      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50040    fi
50041  fi
50042
50043  ###############################################################################
50044
50045  # Adjust flags according to debug level.
50046  case $DEBUG_LEVEL in
50047    fastdebug | slowdebug )
50048      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50049      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50050      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50051      ;;
50052    release )
50053      ;;
50054    * )
50055      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50056      ;;
50057  esac
50058
50059  # Set some common defines. These works for all compilers, but assume
50060  # -D is universally accepted.
50061
50062  # Setup endianness
50063  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50064    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50065    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50066    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50067    #   Note: -Dmacro         is the same as    #define macro 1
50068    #         -Dmacro=        is the same as    #define macro
50069    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50070      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50071    else
50072      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50073    fi
50074  else
50075    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50076    # are defined in the system?
50077    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50078      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50079    else
50080      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50081    fi
50082  fi
50083
50084  # Setup target OS define. Use OS target name but in upper case.
50085  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50086  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50087
50088  # Setup target CPU
50089  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50090      $OPENJDK_TARGET_ADD_LP64 \
50091      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50092
50093  # Setup debug/release defines
50094  if test "x$DEBUG_LEVEL" = xrelease; then
50095    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50096    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50097      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50098    fi
50099  else
50100    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50101  fi
50102
50103  # Set some additional per-OS defines.
50104  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50105    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50106    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50107        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50108  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50109    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50110    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50111        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50112  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50113    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50114    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50115    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50116    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50117        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50118        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50119        -fno-omit-frame-pointer"
50120  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50121    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50122    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50123    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50124        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50125        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50126  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50127    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50128  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50129    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50130    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50131  fi
50132
50133  # Set some additional per-CPU defines.
50134  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50135    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50136  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50137    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50138  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50139    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50140      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50141      # fixes `relocation truncated to fit' error for gcc 4.1.
50142      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50143      # Use ppc64 instructions, but schedule for power5
50144      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50145    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50146      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50147    fi
50148  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50149    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50150      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50151      # Little endian machine uses ELFv2 ABI.
50152      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50153      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50154      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50155    fi
50156  fi
50157
50158  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50159    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50160  fi
50161
50162  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50163    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50164      # Solaris does not have _LP64=1 in the old build.
50165      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50166      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50167    fi
50168  fi
50169
50170  # Set JVM_CFLAGS warning handling
50171  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50172    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50173        -Wunused-value -Woverloaded-virtual"
50174
50175    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
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    # Execute function body
50231
50232  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50233  REFERENCE_VERSION=4.8
50234
50235  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50236    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50237  fi
50238
50239  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50240    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50241  fi
50242
50243  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50244  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50245
50246  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50247    :
50248
50249            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50250            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50251
50252
50253  else
50254    :
50255
50256  fi
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271    fi
50272    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50273      # Non-zero builds have stricter warnings
50274      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50275    else
50276      if test "x$TOOLCHAIN_TYPE" = xclang; then
50277        # Some versions of llvm do not like -Wundef
50278        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50279      fi
50280    fi
50281  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50282    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50283        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50284  fi
50285
50286  # Additional macosx handling
50287  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50288    # Setting these parameters makes it an error to link to macosx APIs that are
50289    # newer than the given OS version and makes the linked binaries compatible
50290    # even if built on a newer version of the OS.
50291    # The expected format is X.Y.Z
50292    MACOSX_VERSION_MIN=10.7.0
50293
50294
50295    # The macro takes the version with no dots, ex: 1070
50296    # Let the flags variables get resolved in make for easier override on make
50297    # command line.
50298    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50299    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50300  fi
50301
50302  # Setup some hard coded includes
50303  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50304      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50305      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50306      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50307      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50308      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50309
50310  # The shared libraries are compiled using the picflag.
50311  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50312      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50313  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50314      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50315
50316  # Executable flags
50317  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50318  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50319
50320
50321
50322
50323
50324
50325  # Setup LDFLAGS et al.
50326  #
50327
50328  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50329    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50330    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50331    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50332    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50333      LDFLAGS_SAFESH="-safeseh"
50334      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50335      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50336      # NOTE: Old build added -machine. Probably not needed.
50337      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50338    else
50339      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50340    fi
50341  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50342      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50343      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50344        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50345        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50346    fi
50347  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50348    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50349    # We have previously set HAS_GNU_HASH if this is the case
50350    if test -n "$HAS_GNU_HASH"; then
50351      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50352      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50353      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50354    fi
50355      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50356        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50357    fi
50358    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50359      # And since we now know that the linker is gnu, then add -z defs, to forbid
50360      # undefined symbols in object files.
50361      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50362      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50363      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50364      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50365      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50366      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50367        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50368      fi
50369      case $DEBUG_LEVEL in
50370        release )
50371          # tell linker to optimize libraries.
50372          # Should this be supplied to the OSS linker as well?
50373          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50374          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50375          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50376          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50377            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50378          fi
50379          ;;
50380        slowdebug )
50381          # Hotspot always let the linker optimize
50382          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50383          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50384            # do relocations at load
50385            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50386            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50387            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50388          fi
50389          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50390            # mark relocations read only
50391            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50392            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50393            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50394          fi
50395          ;;
50396        fastdebug )
50397          # Hotspot always let the linker optimize
50398          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50399          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50400            # mark relocations read only
50401            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50402            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50403            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50404          fi
50405          ;;
50406        * )
50407          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50408          ;;
50409        esac
50410    fi
50411  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50412    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50413    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50414    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50415    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50416    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50417    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50418      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50419    fi
50420  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50421    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50422    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50423    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50424  fi
50425
50426  # Customize LDFLAGS for executables
50427
50428  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50429
50430  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50431    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50432      LDFLAGS_STACK_SIZE=1048576
50433    else
50434      LDFLAGS_STACK_SIZE=327680
50435    fi
50436    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50437  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50438    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50439  fi
50440
50441  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50442
50443  # Customize LDFLAGS for libs
50444  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50445
50446  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50447  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50448    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50449        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50450    JDKLIB_LIBS=""
50451  else
50452    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50453        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50454
50455    if test "xTARGET" = "xTARGET"; then
50456    # On some platforms (mac) the linker warns about non existing -L dirs.
50457    # Add server first if available. Linking aginst client does not always produce the same results.
50458      # Only add client/minimal dir if client/minimal is being built.
50459    # Default to server for other variants.
50460      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50461        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50462      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50463        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50464      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50465        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50466    else
50467        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50468    fi
50469    elif test "xTARGET" = "xBUILD"; then
50470      # When building a buildjdk, it's always only the server variant
50471      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50472          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50473    fi
50474
50475    JDKLIB_LIBS="-ljava -ljvm"
50476    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50477      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50478    fi
50479
50480  fi
50481
50482  # Set JVM_LIBS (per os)
50483  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50484    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50485  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50486    # FIXME: This hard-coded path is not really proper.
50487    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50488      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50489    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50490      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50491    fi
50492    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50493        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50494  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50495    JVM_LIBS="$JVM_LIBS -lm"
50496  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50497    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50498  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50499    JVM_LIBS="$JVM_LIBS -lm"
50500  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50501    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50502        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50503        wsock32.lib winmm.lib version.lib psapi.lib"
50504    fi
50505
50506  # Set JVM_ASFLAGS
50507  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50508    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50509      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50510    fi
50511  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50512    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50513  fi
50514
50515  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50516
50517
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531  # Special extras...
50532  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50533    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50534      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50535      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50536    fi
50537    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50538    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50539  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50540    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50541    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50542  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50543    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576
50577
50578
50579
50580
50581
50582
50583
50584
50585
50586    # Execute function body
50587
50588  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50589$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50590  supports=yes
50591
50592  saved_cxxflags="$CXXFLAGS"
50593  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50594  ac_ext=cpp
50595ac_cpp='$CXXCPP $CPPFLAGS'
50596ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50597ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50598ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50599
50600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50601/* end confdefs.h.  */
50602int i;
50603_ACEOF
50604if ac_fn_cxx_try_compile "$LINENO"; then :
50605
50606else
50607  supports=no
50608fi
50609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50610  ac_ext=cpp
50611ac_cpp='$CXXCPP $CPPFLAGS'
50612ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50613ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50614ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50615
50616  CXXFLAGS="$saved_cxxflags"
50617
50618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50619$as_echo "$supports" >&6; }
50620  if test "x$supports" = "xyes" ; then
50621    :
50622
50623  else
50624    :
50625    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50626  fi
50627
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50640
50641  fi
50642  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50643    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50644    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50645    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50646    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50647    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50648  fi
50649
50650  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50651    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50652    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50653    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50654  fi
50655
50656  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50657  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50658  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50659
50660  ###############################################################################
50661  #
50662  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50663  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50664  #
50665
50666  # Setup compiler/platform specific flags into
50667  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50668  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50669  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50670  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50671    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50672    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50673    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50674    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50675      # Force compatibility with i586 on 32 bit intel platforms.
50676      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50677      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50678    fi
50679    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50680        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50681    case $OPENJDK_BUILD_CPU_ARCH in
50682      arm )
50683        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50684        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50685        ;;
50686      ppc )
50687        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50688        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50689        ;;
50690      * )
50691        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50692        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50693        ;;
50694    esac
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736
50737
50738
50739
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749    # Execute function body
50750
50751  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50752  REFERENCE_VERSION=6
50753
50754  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50755    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50756  fi
50757
50758  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50759    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50760  fi
50761
50762  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50763  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50764
50765  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50766    :
50767
50768  else
50769    :
50770
50771  fi
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50787    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50788
50789    # Restrict the debug information created by Clang to avoid
50790    # too big object files and speed the build up a little bit
50791    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50792    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50793    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50794      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50795        # Force compatibility with i586 on 32 bit intel platforms.
50796        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50797        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50798      fi
50799      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50800      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50801          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50802      case $OPENJDK_BUILD_CPU_ARCH in
50803        ppc )
50804          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50805          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50806          ;;
50807        * )
50808          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50809          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50810          ;;
50811      esac
50812    fi
50813  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50814    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50815    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50816    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50817      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50818    fi
50819
50820    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50821    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50822  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50823    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50824    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50825    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50826  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50827    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50828        -MD -Zc:wchar_t- -W3 -wd4800 \
50829        -DWIN32_LEAN_AND_MEAN \
50830        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50831        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50832        -DWIN32 -DIAL"
50833    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50834      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50835    else
50836      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50837    fi
50838    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50839    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50840    # studio.
50841    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50842      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50843      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50844      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50845    fi
50846  fi
50847
50848  ###############################################################################
50849
50850  # Adjust flags according to debug level.
50851  case $DEBUG_LEVEL in
50852    fastdebug | slowdebug )
50853      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50854      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50855      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50856      ;;
50857    release )
50858      ;;
50859    * )
50860      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50861      ;;
50862  esac
50863
50864  # Set some common defines. These works for all compilers, but assume
50865  # -D is universally accepted.
50866
50867  # Setup endianness
50868  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50869    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50870    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50871    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50872    #   Note: -Dmacro         is the same as    #define macro 1
50873    #         -Dmacro=        is the same as    #define macro
50874    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50875      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50876    else
50877      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50878    fi
50879  else
50880    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50881    # are defined in the system?
50882    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50883      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50884    else
50885      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50886    fi
50887  fi
50888
50889  # Setup target OS define. Use OS target name but in upper case.
50890  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50891  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50892
50893  # Setup target CPU
50894  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50895      $OPENJDK_BUILD_ADD_LP64 \
50896      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50897
50898  # Setup debug/release defines
50899  if test "x$DEBUG_LEVEL" = xrelease; then
50900    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50901    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50902      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50903    fi
50904  else
50905    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50906  fi
50907
50908  # Set some additional per-OS defines.
50909  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50910    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50911    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50912        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50913  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50914    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50915    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50916        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50917  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50918    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50919    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50920    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50921    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50922        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50923        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50924        -fno-omit-frame-pointer"
50925  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50926    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50927    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50928    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50929        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50930        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50931  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50932    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50933  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50934    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50935    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50936  fi
50937
50938  # Set some additional per-CPU defines.
50939  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50940    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50941  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50942    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50943  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50944    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50945      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50946      # fixes `relocation truncated to fit' error for gcc 4.1.
50947      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50948      # Use ppc64 instructions, but schedule for power5
50949      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50950    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50951      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50952    fi
50953  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50954    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50955      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50956      # Little endian machine uses ELFv2 ABI.
50957      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50958      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50959      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50960    fi
50961  fi
50962
50963  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50964    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50965  fi
50966
50967  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50968    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50969      # Solaris does not have _LP64=1 in the old build.
50970      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50971      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50972    fi
50973  fi
50974
50975  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50976  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50977    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50978        -Wunused-value -Woverloaded-virtual"
50979
50980    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
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    # Execute function body
51036
51037  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51038  REFERENCE_VERSION=4.8
51039
51040  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51041    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51042  fi
51043
51044  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51045    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51046  fi
51047
51048  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51049  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51050
51051  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51052    :
51053
51054            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51055            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51056
51057
51058  else
51059    :
51060
51061  fi
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076    fi
51077    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51078      # Non-zero builds have stricter warnings
51079      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51080    else
51081      if test "x$TOOLCHAIN_TYPE" = xclang; then
51082        # Some versions of llvm do not like -Wundef
51083        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51084      fi
51085    fi
51086  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51087    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51088        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51089  fi
51090
51091  # Additional macosx handling
51092  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51093    # Setting these parameters makes it an error to link to macosx APIs that are
51094    # newer than the given OS version and makes the linked binaries compatible
51095    # even if built on a newer version of the OS.
51096    # The expected format is X.Y.Z
51097    MACOSX_VERSION_MIN=10.7.0
51098
51099
51100    # The macro takes the version with no dots, ex: 1070
51101    # Let the flags variables get resolved in make for easier override on make
51102    # command line.
51103    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)"
51104    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51105  fi
51106
51107  # Setup some hard coded includes
51108  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51109      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51110      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51111      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51112      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51113      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51114
51115  # The shared libraries are compiled using the picflag.
51116  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51117      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51118  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51119      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51120
51121  # Executable flags
51122  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51123  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51124
51125
51126
51127
51128
51129
51130  # Setup LDFLAGS et al.
51131  #
51132
51133  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51134    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51135    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51136    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51137    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51138      LDFLAGS_SAFESH="-safeseh"
51139      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51140      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51141      # NOTE: Old build added -machine. Probably not needed.
51142      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51143    else
51144      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51145    fi
51146  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51147      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51148      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51149        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51150        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51151    fi
51152  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51153    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51154    # We have previously set HAS_GNU_HASH if this is the case
51155    if test -n "$HAS_GNU_HASH"; then
51156      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51157      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51158      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51159    fi
51160      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51161        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51162    fi
51163    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51164      # And since we now know that the linker is gnu, then add -z defs, to forbid
51165      # undefined symbols in object files.
51166      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51167      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51168      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51169      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51170      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51171      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51172        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51173      fi
51174      case $DEBUG_LEVEL in
51175        release )
51176          # tell linker to optimize libraries.
51177          # Should this be supplied to the OSS linker as well?
51178          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51179          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51180          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51181          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51182            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51183          fi
51184          ;;
51185        slowdebug )
51186          # Hotspot always let the linker optimize
51187          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51188          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51189            # do relocations at load
51190            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51191            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51192            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51193          fi
51194          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51195            # mark relocations read only
51196            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51197            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51198            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51199          fi
51200          ;;
51201        fastdebug )
51202          # Hotspot always let the linker optimize
51203          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51204          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51205            # mark relocations read only
51206            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51207            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51208            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51209          fi
51210          ;;
51211        * )
51212          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51213          ;;
51214        esac
51215    fi
51216  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51217    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51218    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
51219    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51220    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51221    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51222    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51223      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51224    fi
51225  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51226    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51227    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51228    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51229  fi
51230
51231  # Customize LDFLAGS for executables
51232
51233  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51234
51235  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51236    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51237      LDFLAGS_STACK_SIZE=1048576
51238    else
51239      LDFLAGS_STACK_SIZE=327680
51240    fi
51241    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51242  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51243    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51244  fi
51245
51246  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51247
51248  # Customize LDFLAGS for libs
51249  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51250
51251  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51252  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51253    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51254        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51255    OPENJDK_BUILD_JDKLIB_LIBS=""
51256  else
51257    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51258        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51259
51260    if test "xBUILD" = "xTARGET"; then
51261    # On some platforms (mac) the linker warns about non existing -L dirs.
51262    # Add server first if available. Linking aginst client does not always produce the same results.
51263      # Only add client/minimal dir if client/minimal is being built.
51264    # Default to server for other variants.
51265      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51266        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51267      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51268        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51269      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51270        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51271    else
51272        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51273    fi
51274    elif test "xBUILD" = "xBUILD"; then
51275      # When building a buildjdk, it's always only the server variant
51276      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51277          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51278    fi
51279
51280    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51281    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51282      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51283    fi
51284
51285  fi
51286
51287  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51288  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51289    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51290  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51291    # FIXME: This hard-coded path is not really proper.
51292    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51293      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51294    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51295      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51296    fi
51297    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51298        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51299  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51300    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51301  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51302    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51303  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51304    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51305  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51306    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51307        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51308        wsock32.lib winmm.lib version.lib psapi.lib"
51309    fi
51310
51311  # Set OPENJDK_BUILD_JVM_ASFLAGS
51312  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51313    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51314      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51315    fi
51316  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51317    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51318  fi
51319
51320  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336  # Tests are only ever compiled for TARGET
51337  # Flags for compiling test libraries
51338  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51339  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51340
51341  # Flags for compiling test executables
51342  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51343  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51344
51345
51346
51347
51348
51349
51350  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51351  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51352
51353
51354
51355
51356
51357
51358  # Some Zero and Shark settings.
51359  # ZERO_ARCHFLAG tells the compiler which mode to build for
51360  case "${OPENJDK_TARGET_CPU}" in
51361    s390)
51362      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51363      ;;
51364    *)
51365      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51366  esac
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409    # Execute function body
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458    # Execute function body
51459
51460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51461$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51462  supports=yes
51463
51464  saved_cflags="$CFLAGS"
51465  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51466  ac_ext=c
51467ac_cpp='$CPP $CPPFLAGS'
51468ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51469ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51470ac_compiler_gnu=$ac_cv_c_compiler_gnu
51471
51472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51473/* end confdefs.h.  */
51474int i;
51475_ACEOF
51476if ac_fn_c_try_compile "$LINENO"; then :
51477
51478else
51479  supports=no
51480fi
51481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51482  ac_ext=cpp
51483ac_cpp='$CXXCPP $CPPFLAGS'
51484ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51485ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51486ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51487
51488  CFLAGS="$saved_cflags"
51489
51490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51491$as_echo "$supports" >&6; }
51492  if test "x$supports" = "xyes" ; then
51493    :
51494    C_COMP_SUPPORTS="yes"
51495  else
51496    :
51497    C_COMP_SUPPORTS="no"
51498  fi
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558    # Execute function body
51559
51560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51561$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51562  supports=yes
51563
51564  saved_cxxflags="$CXXFLAGS"
51565  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51566  ac_ext=cpp
51567ac_cpp='$CXXCPP $CPPFLAGS'
51568ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51569ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51570ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51571
51572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51573/* end confdefs.h.  */
51574int i;
51575_ACEOF
51576if ac_fn_cxx_try_compile "$LINENO"; then :
51577
51578else
51579  supports=no
51580fi
51581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51582  ac_ext=cpp
51583ac_cpp='$CXXCPP $CPPFLAGS'
51584ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51585ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51586ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51587
51588  CXXFLAGS="$saved_cxxflags"
51589
51590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51591$as_echo "$supports" >&6; }
51592  if test "x$supports" = "xyes" ; then
51593    :
51594    CXX_COMP_SUPPORTS="yes"
51595  else
51596    :
51597    CXX_COMP_SUPPORTS="no"
51598  fi
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51613$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51614  supports=no
51615  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51616
51617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51618$as_echo "$supports" >&6; }
51619  if test "x$supports" = "xyes" ; then
51620    :
51621
51622  else
51623    :
51624    ZERO_ARCHFLAG=""
51625  fi
51626
51627
51628
51629
51630
51631
51632
51633
51634  # Check that the compiler supports -mX (or -qX on AIX) flags
51635  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
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    # Execute function body
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732    # Execute function body
51733
51734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51735$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51736  supports=yes
51737
51738  saved_cflags="$CFLAGS"
51739  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51740  ac_ext=c
51741ac_cpp='$CPP $CPPFLAGS'
51742ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51743ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51744ac_compiler_gnu=$ac_cv_c_compiler_gnu
51745
51746  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51747/* end confdefs.h.  */
51748int i;
51749_ACEOF
51750if ac_fn_c_try_compile "$LINENO"; then :
51751
51752else
51753  supports=no
51754fi
51755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51756  ac_ext=cpp
51757ac_cpp='$CXXCPP $CPPFLAGS'
51758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51761
51762  CFLAGS="$saved_cflags"
51763
51764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51765$as_echo "$supports" >&6; }
51766  if test "x$supports" = "xyes" ; then
51767    :
51768    C_COMP_SUPPORTS="yes"
51769  else
51770    :
51771    C_COMP_SUPPORTS="no"
51772  fi
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
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    # Execute function body
51833
51834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51835$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51836  supports=yes
51837
51838  saved_cxxflags="$CXXFLAGS"
51839  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51840  ac_ext=cpp
51841ac_cpp='$CXXCPP $CPPFLAGS'
51842ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51843ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51844ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51845
51846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51847/* end confdefs.h.  */
51848int i;
51849_ACEOF
51850if ac_fn_cxx_try_compile "$LINENO"; then :
51851
51852else
51853  supports=no
51854fi
51855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51856  ac_ext=cpp
51857ac_cpp='$CXXCPP $CPPFLAGS'
51858ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51859ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51860ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51861
51862  CXXFLAGS="$saved_cxxflags"
51863
51864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51865$as_echo "$supports" >&6; }
51866  if test "x$supports" = "xyes" ; then
51867    :
51868    CXX_COMP_SUPPORTS="yes"
51869  else
51870    :
51871    CXX_COMP_SUPPORTS="no"
51872  fi
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51887$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51888  supports=no
51889  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51890
51891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51892$as_echo "$supports" >&6; }
51893  if test "x$supports" = "xyes" ; then
51894    :
51895    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51896  else
51897    :
51898    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51899  fi
51900
51901
51902
51903
51904
51905
51906
51907
51908  # Check whether --enable-warnings-as-errors was given.
51909if test "${enable_warnings_as_errors+set}" = set; then :
51910  enableval=$enable_warnings_as_errors;
51911fi
51912
51913
51914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51915$as_echo_n "checking if native warnings are errors... " >&6; }
51916  if test "x$enable_warnings_as_errors" = "xyes"; then
51917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51918$as_echo "yes (explicitely set)" >&6; }
51919    WARNINGS_AS_ERRORS=true
51920  elif test "x$enable_warnings_as_errors" = "xno"; then
51921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51922$as_echo "no" >&6; }
51923    WARNINGS_AS_ERRORS=false
51924  elif test "x$enable_warnings_as_errors" = "x"; then
51925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51926$as_echo "yes (default)" >&6; }
51927    WARNINGS_AS_ERRORS=true
51928  else
51929    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51930  fi
51931
51932  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51933    # Set legacy hotspot variable
51934    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51935  else
51936    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51937  fi
51938
51939
51940
51941
51942  case "${TOOLCHAIN_TYPE}" in
51943    microsoft)
51944      DISABLE_WARNING_PREFIX="-wd"
51945      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51946      ;;
51947    solstudio)
51948      DISABLE_WARNING_PREFIX="-erroff="
51949      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51950      ;;
51951    gcc)
51952      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000    # Execute function body
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049    # Execute function body
52050
52051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52052$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52053  supports=yes
52054
52055  saved_cflags="$CFLAGS"
52056  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52057  ac_ext=c
52058ac_cpp='$CPP $CPPFLAGS'
52059ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52060ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52061ac_compiler_gnu=$ac_cv_c_compiler_gnu
52062
52063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52064/* end confdefs.h.  */
52065int i;
52066_ACEOF
52067if ac_fn_c_try_compile "$LINENO"; then :
52068
52069else
52070  supports=no
52071fi
52072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52073  ac_ext=cpp
52074ac_cpp='$CXXCPP $CPPFLAGS'
52075ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52076ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52077ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52078
52079  CFLAGS="$saved_cflags"
52080
52081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52082$as_echo "$supports" >&6; }
52083  if test "x$supports" = "xyes" ; then
52084    :
52085    C_COMP_SUPPORTS="yes"
52086  else
52087    :
52088    C_COMP_SUPPORTS="no"
52089  fi
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149    # Execute function body
52150
52151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52152$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52153  supports=yes
52154
52155  saved_cxxflags="$CXXFLAGS"
52156  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52157  ac_ext=cpp
52158ac_cpp='$CXXCPP $CPPFLAGS'
52159ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52160ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52161ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52162
52163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52164/* end confdefs.h.  */
52165int i;
52166_ACEOF
52167if ac_fn_cxx_try_compile "$LINENO"; then :
52168
52169else
52170  supports=no
52171fi
52172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52173  ac_ext=cpp
52174ac_cpp='$CXXCPP $CPPFLAGS'
52175ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52176ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52177ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52178
52179  CXXFLAGS="$saved_cxxflags"
52180
52181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52182$as_echo "$supports" >&6; }
52183  if test "x$supports" = "xyes" ; then
52184    :
52185    CXX_COMP_SUPPORTS="yes"
52186  else
52187    :
52188    CXX_COMP_SUPPORTS="no"
52189  fi
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52204$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52205  supports=no
52206  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52207
52208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52209$as_echo "$supports" >&6; }
52210  if test "x$supports" = "xyes" ; then
52211    :
52212    GCC_CAN_DISABLE_WARNINGS=true
52213  else
52214    :
52215    GCC_CAN_DISABLE_WARNINGS=false
52216
52217  fi
52218
52219
52220
52221
52222
52223
52224      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52225        DISABLE_WARNING_PREFIX="-Wno-"
52226      else
52227        DISABLE_WARNING_PREFIX=
52228      fi
52229      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52230      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52231      # CFLAGS since any target specific flags will likely not work with the
52232      # build compiler
52233      CC_OLD="$CC"
52234      CXX_OLD="$CXX"
52235      CC="$BUILD_CC"
52236      CXX="$BUILD_CXX"
52237      CFLAGS_OLD="$CFLAGS"
52238      CFLAGS=""
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286    # Execute function body
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335    # Execute function body
52336
52337  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52338$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52339  supports=yes
52340
52341  saved_cflags="$CFLAGS"
52342  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52343  ac_ext=c
52344ac_cpp='$CPP $CPPFLAGS'
52345ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52346ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52347ac_compiler_gnu=$ac_cv_c_compiler_gnu
52348
52349  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52350/* end confdefs.h.  */
52351int i;
52352_ACEOF
52353if ac_fn_c_try_compile "$LINENO"; then :
52354
52355else
52356  supports=no
52357fi
52358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52359  ac_ext=cpp
52360ac_cpp='$CXXCPP $CPPFLAGS'
52361ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52362ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52363ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52364
52365  CFLAGS="$saved_cflags"
52366
52367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52368$as_echo "$supports" >&6; }
52369  if test "x$supports" = "xyes" ; then
52370    :
52371    C_COMP_SUPPORTS="yes"
52372  else
52373    :
52374    C_COMP_SUPPORTS="no"
52375  fi
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
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    # Execute function body
52436
52437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52438$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52439  supports=yes
52440
52441  saved_cxxflags="$CXXFLAGS"
52442  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52443  ac_ext=cpp
52444ac_cpp='$CXXCPP $CPPFLAGS'
52445ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52446ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52447ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52448
52449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52450/* end confdefs.h.  */
52451int i;
52452_ACEOF
52453if ac_fn_cxx_try_compile "$LINENO"; then :
52454
52455else
52456  supports=no
52457fi
52458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52459  ac_ext=cpp
52460ac_cpp='$CXXCPP $CPPFLAGS'
52461ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52462ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52463ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52464
52465  CXXFLAGS="$saved_cxxflags"
52466
52467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52468$as_echo "$supports" >&6; }
52469  if test "x$supports" = "xyes" ; then
52470    :
52471    CXX_COMP_SUPPORTS="yes"
52472  else
52473    :
52474    CXX_COMP_SUPPORTS="no"
52475  fi
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52490$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52491  supports=no
52492  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52493
52494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52495$as_echo "$supports" >&6; }
52496  if test "x$supports" = "xyes" ; then
52497    :
52498    BUILD_CC_CAN_DISABLE_WARNINGS=true
52499  else
52500    :
52501    BUILD_CC_CAN_DISABLE_WARNINGS=false
52502
52503  fi
52504
52505
52506
52507
52508
52509
52510      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52511        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52512      else
52513        BUILD_CC_DISABLE_WARNING_PREFIX=
52514      fi
52515      CC="$CC_OLD"
52516      CXX="$CXX_OLD"
52517      CFLAGS="$CFLAGS_OLD"
52518      ;;
52519    clang)
52520      DISABLE_WARNING_PREFIX="-Wno-"
52521      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52522      ;;
52523    xlc)
52524      DISABLE_WARNING_PREFIX="-qsuppress="
52525      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52526      ;;
52527  esac
52528
52529
52530
52531
52532
52533# Setup debug symbols (need objcopy from the toolchain for that)
52534
52535  #
52536  # NATIVE_DEBUG_SYMBOLS
52537  # This must be done after the toolchain is setup, since we're looking at objcopy.
52538  #
52539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52540$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52541
52542# Check whether --with-native-debug-symbols was given.
52543if test "${with_native_debug_symbols+set}" = set; then :
52544  withval=$with_native_debug_symbols;
52545        if test "x$OPENJDK_TARGET_OS" = xaix; then
52546          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52547            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52548          fi
52549        fi
52550
52551else
52552
52553        if test "x$OPENJDK_TARGET_OS" = xaix; then
52554          # AIX doesn't support 'zipped' so use 'internal' as default
52555          with_native_debug_symbols="internal"
52556        else
52557          if test "x$STATIC_BUILD" = xtrue; then
52558            with_native_debug_symbols="none"
52559          else
52560            with_native_debug_symbols="zipped"
52561          fi
52562        fi
52563
52564fi
52565
52566  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52568$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52569
52570  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52571
52572    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52573      if test "x$OBJCOPY" = x; then
52574        # enabling of enable-debug-symbols and can't find objcopy
52575        # this is an error
52576        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52577      fi
52578    fi
52579
52580    COMPILE_WITH_DEBUG_SYMBOLS=true
52581    COPY_DEBUG_SYMBOLS=true
52582    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52583
52584    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52585    DEBUG_BINARIES=false
52586    STRIP_POLICY=min_strip
52587
52588  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52589    COMPILE_WITH_DEBUG_SYMBOLS=false
52590    COPY_DEBUG_SYMBOLS=false
52591    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52592
52593    DEBUG_BINARIES=false
52594    STRIP_POLICY=no_strip
52595  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52596    COMPILE_WITH_DEBUG_SYMBOLS=true
52597    COPY_DEBUG_SYMBOLS=false
52598    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52599
52600    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52601    DEBUG_BINARIES=true
52602    STRIP_POLICY=no_strip
52603    STRIP=""
52604
52605  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52606
52607    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52608      if test "x$OBJCOPY" = x; then
52609        # enabling of enable-debug-symbols and can't find objcopy
52610        # this is an error
52611        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52612      fi
52613    fi
52614
52615    COMPILE_WITH_DEBUG_SYMBOLS=true
52616    COPY_DEBUG_SYMBOLS=true
52617    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52618
52619    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52620    DEBUG_BINARIES=false
52621    STRIP_POLICY=min_strip
52622  else
52623    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52624  fi
52625
52626  # --enable-debug-symbols is deprecated.
52627  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52628
52629  # Check whether --enable-debug-symbols was given.
52630if test "${enable_debug_symbols+set}" = set; then :
52631  enableval=$enable_debug_symbols;
52632fi
52633
52634  if test "x$enable_debug_symbols" != x; then
52635    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52636$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52637
52638    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52639      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52640$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52641    fi
52642
52643  fi
52644
52645
52646  # --enable-zip-debug-info is deprecated.
52647  # Please use --with-native-debug-symbols=zipped .
52648
52649  # Check whether --enable-zip-debug-info was given.
52650if test "${enable_zip_debug_info+set}" = set; then :
52651  enableval=$enable_zip_debug_info;
52652fi
52653
52654  if test "x$enable_zip_debug_info" != x; then
52655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52656$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52657
52658    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52659      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52660$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52661    fi
52662
52663  fi
52664
52665
52666
52667
52668
52669
52670  # Legacy values
52671
52672
52673
52674
52675  # Check whether --enable-native-coverage was given.
52676if test "${enable_native_coverage+set}" = set; then :
52677  enableval=$enable_native_coverage;
52678fi
52679
52680  GCOV_ENABLED="false"
52681  if test "x$enable_native_coverage" = "xyes"; then
52682    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52684$as_echo_n "checking if native coverage is enabled... " >&6; }
52685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52686$as_echo "yes" >&6; }
52687      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52688      GCOV_LDFLAGS="-fprofile-arcs"
52689      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52690      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52691      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52692      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52693      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52694      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52695      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52696      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52697      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52698      GCOV_ENABLED="true"
52699    else
52700      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52701    fi
52702  elif test "x$enable_native_coverage" = "xno"; then
52703    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52704$as_echo_n "checking if native coverage is enabled... " >&6; }
52705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52706$as_echo "no" >&6; }
52707  elif test "x$enable_native_coverage" != "x"; then
52708    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52709  fi
52710
52711
52712
52713
52714# Need toolchain to setup dtrace
52715
52716  # Test for dtrace dependencies
52717  # Check whether --enable-dtrace was given.
52718if test "${enable_dtrace+set}" = set; then :
52719  enableval=$enable_dtrace;
52720fi
52721
52722
52723  DTRACE_DEP_MISSING=false
52724
52725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52726$as_echo_n "checking for dtrace tool... " >&6; }
52727  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52729$as_echo "$DTRACE" >&6; }
52730  else
52731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52732$as_echo "not found, cannot build dtrace" >&6; }
52733    DTRACE_DEP_MISSING=true
52734  fi
52735
52736  for ac_header in sys/sdt.h
52737do :
52738  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52739if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52740  cat >>confdefs.h <<_ACEOF
52741#define HAVE_SYS_SDT_H 1
52742_ACEOF
52743 DTRACE_HEADERS_OK=yes
52744else
52745  DTRACE_HEADERS_OK=no
52746fi
52747
52748done
52749
52750  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52751    DTRACE_DEP_MISSING=true
52752  fi
52753
52754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52755$as_echo_n "checking if dtrace should be built... " >&6; }
52756  if test "x$enable_dtrace" = "xyes"; then
52757    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52759$as_echo "no, missing dependencies" >&6; }
52760
52761  # Print a helpful message on how to acquire the necessary build dependency.
52762  # dtrace is the help tag: freetype, cups, alsa etc
52763  MISSING_DEPENDENCY=dtrace
52764
52765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52766    cygwin_help $MISSING_DEPENDENCY
52767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52768    msys_help $MISSING_DEPENDENCY
52769  else
52770    PKGHANDLER_COMMAND=
52771
52772    case $PKGHANDLER in
52773      apt-get)
52774        apt_help     $MISSING_DEPENDENCY ;;
52775      yum)
52776        yum_help     $MISSING_DEPENDENCY ;;
52777      port)
52778        port_help    $MISSING_DEPENDENCY ;;
52779      pkgutil)
52780        pkgutil_help $MISSING_DEPENDENCY ;;
52781      pkgadd)
52782        pkgadd_help  $MISSING_DEPENDENCY ;;
52783    esac
52784
52785    if test "x$PKGHANDLER_COMMAND" != x; then
52786      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52787    fi
52788  fi
52789
52790      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52791    else
52792      INCLUDE_DTRACE=true
52793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52794$as_echo "yes, forced" >&6; }
52795    fi
52796  elif test "x$enable_dtrace" = "xno"; then
52797    INCLUDE_DTRACE=false
52798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52799$as_echo "no, forced" >&6; }
52800  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52801    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
52802      INCLUDE_DTRACE=false
52803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
52804$as_echo "no, non-open linux build" >&6; }
52805    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52806      INCLUDE_DTRACE=false
52807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52808$as_echo "no, missing dependencies" >&6; }
52809    else
52810      INCLUDE_DTRACE=true
52811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52812$as_echo "yes, dependencies present" >&6; }
52813    fi
52814  else
52815    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52816  fi
52817
52818
52819
52820  # The user can in some cases supply additional jvm features. For the custom
52821  # variant, this defines the entire variant.
52822
52823# Check whether --with-jvm-features was given.
52824if test "${with_jvm_features+set}" = set; then :
52825  withval=$with_jvm_features;
52826fi
52827
52828  if test "x$with_jvm_features" != x; then
52829    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52830$as_echo_n "checking additional JVM features... " >&6; }
52831    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52833$as_echo "$JVM_FEATURES" >&6; }
52834  fi
52835
52836  # Verify that dependencies are met for explicitly set features.
52837  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52838    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52839  fi
52840
52841  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52842    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52843  fi
52844
52845  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52846    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52847  fi
52848
52849  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52850    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52851  fi
52852
52853  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52854    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52855  fi
52856
52857  # Turn on additional features based on other parts of configure
52858  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52859    JVM_FEATURES="$JVM_FEATURES dtrace"
52860  else
52861    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52862      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52863    fi
52864  fi
52865
52866  if test "x$STATIC_BUILD" = "xtrue"; then
52867    JVM_FEATURES="$JVM_FEATURES static-build"
52868  else
52869    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52870      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52871    fi
52872  fi
52873
52874  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52875    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52876      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52877    fi
52878  fi
52879
52880  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52881    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52882      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52883    fi
52884  fi
52885
52886  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52887  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52888      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52889      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52890    JVM_FEATURES_jvmci="jvmci"
52891  else
52892    JVM_FEATURES_jvmci=""
52893  fi
52894
52895  # All variants but minimal (and custom) get these features
52896  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52897
52898  # Enable features depending on variant.
52899  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52900  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52901  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52902  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52903  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52904  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52905  JVM_FEATURES_custom="$JVM_FEATURES"
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915  # Used for verification of Makefiles by check-jvm-feature
52916
52917
52918  # We don't support --with-jvm-interpreter anymore, use zero instead.
52919
52920
52921# Check whether --with-jvm-interpreter was given.
52922if test "${with_jvm_interpreter+set}" = set; then :
52923  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52924$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52925fi
52926
52927
52928
52929
52930###############################################################################
52931#
52932# Check dependencies for external and internal libraries.
52933#
52934###############################################################################
52935
52936# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52937
52938  # When using cygwin or msys, we need a wrapper binary that renames
52939  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52940  # @files and rewrites these too! This wrapper binary is
52941  # called fixpath.
52942  FIXPATH=
52943  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52945$as_echo_n "checking if fixpath can be created... " >&6; }
52946    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52947    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52948    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52949    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52950      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52951      FIXPATH="$FIXPATH_BIN -c"
52952    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52953      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52954      # @ was chosen as separator to minimize risk of other tools messing around with it
52955      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52956          | tr ' ' '\n' | grep '^/./' | sort | uniq`
52957      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52958      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52959    fi
52960    FIXPATH_SRC_W="$FIXPATH_SRC"
52961    FIXPATH_BIN_W="$FIXPATH_BIN"
52962
52963  unix_path="$FIXPATH_SRC_W"
52964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52965    windows_path=`$CYGPATH -m "$unix_path"`
52966    FIXPATH_SRC_W="$windows_path"
52967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52968    windows_path=`cmd //c echo $unix_path`
52969    FIXPATH_SRC_W="$windows_path"
52970  fi
52971
52972
52973  unix_path="$FIXPATH_BIN_W"
52974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52975    windows_path=`$CYGPATH -m "$unix_path"`
52976    FIXPATH_BIN_W="$windows_path"
52977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52978    windows_path=`cmd //c echo $unix_path`
52979    FIXPATH_BIN_W="$windows_path"
52980  fi
52981
52982    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52983    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52984    cd $FIXPATH_DIR
52985    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52986    cd $CURDIR
52987
52988    if test ! -x $FIXPATH_BIN; then
52989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52990$as_echo "no" >&6; }
52991      cat $FIXPATH_DIR/fixpath1.log
52992      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52993    fi
52994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52995$as_echo "yes" >&6; }
52996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52997$as_echo_n "checking if fixpath.exe works... " >&6; }
52998    cd $FIXPATH_DIR
52999    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53000        > $FIXPATH_DIR/fixpath2.log 2>&1
53001    cd $CURDIR
53002    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53004$as_echo "no" >&6; }
53005      cat $FIXPATH_DIR/fixpath2.log
53006      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53007    fi
53008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53009$as_echo "yes" >&6; }
53010
53011    FIXPATH_DETACH_FLAG="--detach"
53012  fi
53013
53014
53015
53016
53017
53018
53019  # Check if X11 is needed
53020  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53021    # No X11 support on windows or macosx
53022    NEEDS_LIB_X11=false
53023  else
53024    if test "x$SUPPORT_HEADFUL" = xno; then
53025      # No X11 support if building headless-only
53026      NEEDS_LIB_X11=false
53027    else
53028      # All other instances need X11
53029      NEEDS_LIB_X11=true
53030    fi
53031  fi
53032
53033  # Check if cups is needed
53034  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53035    # Windows have a separate print system
53036    NEEDS_LIB_CUPS=false
53037  else
53038    NEEDS_LIB_CUPS=true
53039  fi
53040
53041  # Check if freetype is needed
53042  if test "x$OPENJDK" = "xtrue"; then
53043    NEEDS_LIB_FREETYPE=true
53044  else
53045    NEEDS_LIB_FREETYPE=false
53046  fi
53047
53048  # Check if alsa is needed
53049  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53050    NEEDS_LIB_ALSA=true
53051  else
53052    NEEDS_LIB_ALSA=false
53053  fi
53054
53055  # Check if ffi is needed
53056  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53057    NEEDS_LIB_FFI=true
53058  else
53059    NEEDS_LIB_FFI=false
53060  fi
53061
53062
53063  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53064  # dynamic build is configured on command line.
53065
53066# Check whether --with-stdc++lib was given.
53067if test "${with_stdc__lib+set}" = set; then :
53068  withval=$with_stdc__lib;
53069        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53070                && test "x$with_stdc__lib" != xdefault; then
53071          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53072        fi
53073
53074else
53075  with_stdc__lib=default
53076
53077fi
53078
53079
53080  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53081    # Test if -lstdc++ works.
53082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53083$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53084    ac_ext=cpp
53085ac_cpp='$CXXCPP $CPPFLAGS'
53086ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53087ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53088ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53089
53090    OLD_CXXFLAGS="$CXXFLAGS"
53091    CXXFLAGS="$CXXFLAGS -lstdc++"
53092    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53093/* end confdefs.h.  */
53094
53095int
53096main ()
53097{
53098return 0;
53099  ;
53100  return 0;
53101}
53102_ACEOF
53103if ac_fn_cxx_try_link "$LINENO"; then :
53104  has_dynamic_libstdcxx=yes
53105else
53106  has_dynamic_libstdcxx=no
53107fi
53108rm -f core conftest.err conftest.$ac_objext \
53109    conftest$ac_exeext conftest.$ac_ext
53110    CXXFLAGS="$OLD_CXXFLAGS"
53111    ac_ext=cpp
53112ac_cpp='$CXXCPP $CPPFLAGS'
53113ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53114ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53115ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53116
53117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53118$as_echo "$has_dynamic_libstdcxx" >&6; }
53119
53120    # Test if stdc++ can be linked statically.
53121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53122$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53123    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53124    ac_ext=cpp
53125ac_cpp='$CXXCPP $CPPFLAGS'
53126ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53127ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53128ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53129
53130    OLD_LIBS="$LIBS"
53131    OLD_CXX="$CXX"
53132    LIBS="$STATIC_STDCXX_FLAGS"
53133    CXX="$CC"
53134    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53135/* end confdefs.h.  */
53136
53137int
53138main ()
53139{
53140return 0;
53141  ;
53142  return 0;
53143}
53144_ACEOF
53145if ac_fn_cxx_try_link "$LINENO"; then :
53146  has_static_libstdcxx=yes
53147else
53148  has_static_libstdcxx=no
53149fi
53150rm -f core conftest.err conftest.$ac_objext \
53151    conftest$ac_exeext conftest.$ac_ext
53152    LIBS="$OLD_LIBS"
53153    CXX="$OLD_CXX"
53154    ac_ext=cpp
53155ac_cpp='$CXXCPP $CPPFLAGS'
53156ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53157ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53158ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53159
53160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53161$as_echo "$has_static_libstdcxx" >&6; }
53162
53163    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53164      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53165    fi
53166
53167    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53168      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53169    fi
53170
53171    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53172      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53173    fi
53174
53175    # If dynamic was requested, it's available since it would fail above otherwise.
53176    # If dynamic wasn't requested, go with static unless it isn't available.
53177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53178$as_echo_n "checking how to link with libstdc++... " >&6; }
53179    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53180      LIBCXX="$LIBCXX -lstdc++"
53181      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53182      JVM_LIBS="-lstdc++ $JVM_LIBS"
53183      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53184      # just use the same setting as for the TARGET toolchain.
53185      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53186      LDCXX="$CXX"
53187      STATIC_CXX_SETTING="STATIC_CXX=false"
53188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53189$as_echo "dynamic" >&6; }
53190    else
53191      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53192      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53193      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53194      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53195      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53196      # just use the same setting as for the TARGET toolchain.
53197      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53198      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53199      LDCXX="$CC"
53200      STATIC_CXX_SETTING="STATIC_CXX=true"
53201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53202$as_echo "static" >&6; }
53203    fi
53204  fi
53205
53206
53207  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53208  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53209    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53210  fi
53211
53212  # TODO better (platform agnostic) test
53213  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53214    LIBCXX="-lstdc++"
53215  fi
53216
53217
53218  # Setup Windows runtime dlls
53219  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53220
53221
53222# Check whether --with-msvcr-dll was given.
53223if test "${with_msvcr_dll+set}" = set; then :
53224  withval=$with_msvcr_dll;
53225fi
53226
53227
53228  if test "x$with_msvcr_dll" != x; then
53229    # If given explicitely by user, do not probe. If not present, fail directly.
53230
53231  DLL_NAME="$MSVCR_NAME"
53232  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53233  METHOD="--with-msvcr-dll"
53234  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53235    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53236$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53237
53238    # Need to check if the found msvcr is correct architecture
53239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53240$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53241    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53243      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53244      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53245      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53246        CORRECT_MSVCR_ARCH="PE32 executable"
53247      else
53248        CORRECT_MSVCR_ARCH="PE32+ executable"
53249      fi
53250    else
53251      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53252        CORRECT_MSVCR_ARCH=386
53253      else
53254        CORRECT_MSVCR_ARCH=x86-64
53255      fi
53256    fi
53257    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53259$as_echo "ok" >&6; }
53260      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53261
53262  # Only process if variable expands to non-empty
53263
53264  if test "x$MSVC_DLL" != x; then
53265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53266
53267  # Input might be given as Windows format, start by converting to
53268  # unix format.
53269  path="$MSVC_DLL"
53270  new_path=`$CYGPATH -u "$path"`
53271
53272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53275  # "foo.exe" is OK but "foo" is an error.
53276  #
53277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53278  # It is also a way to make sure we got the proper file name for the real test later on.
53279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53280  if test "x$test_shortpath" = x; then
53281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53282$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53283    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53284  fi
53285
53286  # Call helper function which possibly converts this using DOS-style short mode.
53287  # If so, the updated path is stored in $new_path.
53288
53289  input_path="$new_path"
53290  # Check if we need to convert this using DOS-style short mode. If the path
53291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53292  # take no chances and rewrite it.
53293  # Note: m4 eats our [], so we need to use [ and ] instead.
53294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53295  if test "x$has_forbidden_chars" != x; then
53296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53300      # Going to short mode and back again did indeed matter. Since short mode is
53301      # case insensitive, let's make it lowercase to improve readability.
53302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53303      # Now convert it back to Unix-style (cygpath)
53304      input_path=`$CYGPATH -u "$shortmode_path"`
53305      new_path="$input_path"
53306    fi
53307  fi
53308
53309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53310  if test "x$test_cygdrive_prefix" = x; then
53311    # As a simple fix, exclude /usr/bin since it's not a real path.
53312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53314      # a path prefixed by /cygdrive for fixpath to work.
53315      new_path="$CYGWIN_ROOT_PATH$input_path"
53316    fi
53317  fi
53318
53319
53320  if test "x$path" != "x$new_path"; then
53321    MSVC_DLL="$new_path"
53322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53323$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53324  fi
53325
53326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53327
53328  path="$MSVC_DLL"
53329  has_colon=`$ECHO $path | $GREP ^.:`
53330  new_path="$path"
53331  if test "x$has_colon" = x; then
53332    # Not in mixed or Windows style, start by that.
53333    new_path=`cmd //c echo $path`
53334  fi
53335
53336
53337  input_path="$new_path"
53338  # Check if we need to convert this using DOS-style short mode. If the path
53339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53340  # take no chances and rewrite it.
53341  # Note: m4 eats our [], so we need to use [ and ] instead.
53342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53343  if test "x$has_forbidden_chars" != x; then
53344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53346  fi
53347
53348
53349  windows_path="$new_path"
53350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53351    unix_path=`$CYGPATH -u "$windows_path"`
53352    new_path="$unix_path"
53353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53355    new_path="$unix_path"
53356  fi
53357
53358  if test "x$path" != "x$new_path"; then
53359    MSVC_DLL="$new_path"
53360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53361$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53362  fi
53363
53364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53366
53367    else
53368      # We're on a unix platform. Hooray! :)
53369      path="$MSVC_DLL"
53370      has_space=`$ECHO "$path" | $GREP " "`
53371      if test "x$has_space" != x; then
53372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53373$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53375      fi
53376
53377      # Use eval to expand a potential ~
53378      eval path="$path"
53379      if test ! -f "$path" && test ! -d "$path"; then
53380        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53381      fi
53382
53383      if test -d "$path"; then
53384        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53385      else
53386        dir="`$DIRNAME "$path"`"
53387        base="`$BASENAME "$path"`"
53388        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53389      fi
53390    fi
53391  fi
53392
53393      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53394$as_echo_n "checking for $DLL_NAME... " >&6; }
53395      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53396$as_echo "$MSVC_DLL" >&6; }
53397    else
53398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53399$as_echo "incorrect, ignoring" >&6; }
53400      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53401$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53402    fi
53403  fi
53404
53405    if test "x$MSVC_DLL" = x; then
53406      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53407    fi
53408    MSVCR_DLL="$MSVC_DLL"
53409  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53410
53411  DLL_NAME="$MSVCR_NAME"
53412  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53413  METHOD="devkit"
53414  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53415    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53416$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53417
53418    # Need to check if the found msvcr is correct architecture
53419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53420$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53421    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53422    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53423      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53424      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53425      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53426        CORRECT_MSVCR_ARCH="PE32 executable"
53427      else
53428        CORRECT_MSVCR_ARCH="PE32+ executable"
53429      fi
53430    else
53431      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53432        CORRECT_MSVCR_ARCH=386
53433      else
53434        CORRECT_MSVCR_ARCH=x86-64
53435      fi
53436    fi
53437    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53439$as_echo "ok" >&6; }
53440      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53441
53442  # Only process if variable expands to non-empty
53443
53444  if test "x$MSVC_DLL" != x; then
53445    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53446
53447  # Input might be given as Windows format, start by converting to
53448  # unix format.
53449  path="$MSVC_DLL"
53450  new_path=`$CYGPATH -u "$path"`
53451
53452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53455  # "foo.exe" is OK but "foo" is an error.
53456  #
53457  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53458  # It is also a way to make sure we got the proper file name for the real test later on.
53459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53460  if test "x$test_shortpath" = x; then
53461    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53462$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53463    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53464  fi
53465
53466  # Call helper function which possibly converts this using DOS-style short mode.
53467  # If so, the updated path is stored in $new_path.
53468
53469  input_path="$new_path"
53470  # Check if we need to convert this using DOS-style short mode. If the path
53471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53472  # take no chances and rewrite it.
53473  # Note: m4 eats our [], so we need to use [ and ] instead.
53474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53475  if test "x$has_forbidden_chars" != x; then
53476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53480      # Going to short mode and back again did indeed matter. Since short mode is
53481      # case insensitive, let's make it lowercase to improve readability.
53482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53483      # Now convert it back to Unix-style (cygpath)
53484      input_path=`$CYGPATH -u "$shortmode_path"`
53485      new_path="$input_path"
53486    fi
53487  fi
53488
53489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53490  if test "x$test_cygdrive_prefix" = x; then
53491    # As a simple fix, exclude /usr/bin since it's not a real path.
53492    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53494      # a path prefixed by /cygdrive for fixpath to work.
53495      new_path="$CYGWIN_ROOT_PATH$input_path"
53496    fi
53497  fi
53498
53499
53500  if test "x$path" != "x$new_path"; then
53501    MSVC_DLL="$new_path"
53502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53503$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53504  fi
53505
53506    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53507
53508  path="$MSVC_DLL"
53509  has_colon=`$ECHO $path | $GREP ^.:`
53510  new_path="$path"
53511  if test "x$has_colon" = x; then
53512    # Not in mixed or Windows style, start by that.
53513    new_path=`cmd //c echo $path`
53514  fi
53515
53516
53517  input_path="$new_path"
53518  # Check if we need to convert this using DOS-style short mode. If the path
53519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53520  # take no chances and rewrite it.
53521  # Note: m4 eats our [], so we need to use [ and ] instead.
53522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53523  if test "x$has_forbidden_chars" != x; then
53524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53526  fi
53527
53528
53529  windows_path="$new_path"
53530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53531    unix_path=`$CYGPATH -u "$windows_path"`
53532    new_path="$unix_path"
53533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53535    new_path="$unix_path"
53536  fi
53537
53538  if test "x$path" != "x$new_path"; then
53539    MSVC_DLL="$new_path"
53540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53541$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53542  fi
53543
53544  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53545  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53546
53547    else
53548      # We're on a unix platform. Hooray! :)
53549      path="$MSVC_DLL"
53550      has_space=`$ECHO "$path" | $GREP " "`
53551      if test "x$has_space" != x; then
53552        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53553$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53554        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53555      fi
53556
53557      # Use eval to expand a potential ~
53558      eval path="$path"
53559      if test ! -f "$path" && test ! -d "$path"; then
53560        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53561      fi
53562
53563      if test -d "$path"; then
53564        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53565      else
53566        dir="`$DIRNAME "$path"`"
53567        base="`$BASENAME "$path"`"
53568        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53569      fi
53570    fi
53571  fi
53572
53573      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53574$as_echo_n "checking for $DLL_NAME... " >&6; }
53575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53576$as_echo "$MSVC_DLL" >&6; }
53577    else
53578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53579$as_echo "incorrect, ignoring" >&6; }
53580      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53581$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53582    fi
53583  fi
53584
53585    if test "x$MSVC_DLL" = x; then
53586      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53587    fi
53588    MSVCR_DLL="$MSVC_DLL"
53589  else
53590
53591  DLL_NAME="${MSVCR_NAME}"
53592  MSVC_DLL=
53593
53594  if test "x$MSVC_DLL" = x; then
53595    # Probe: Using well-known location from Visual Studio 10.0
53596    if test "x$VCINSTALLDIR" != x; then
53597      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53598
53599  windows_path="$CYGWIN_VC_INSTALL_DIR"
53600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53601    unix_path=`$CYGPATH -u "$windows_path"`
53602    CYGWIN_VC_INSTALL_DIR="$unix_path"
53603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53605    CYGWIN_VC_INSTALL_DIR="$unix_path"
53606  fi
53607
53608      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53609        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53610      else
53611        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53612      fi
53613      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53614
53615  DLL_NAME="$DLL_NAME"
53616  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53617  METHOD="well-known location in VCINSTALLDIR"
53618  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53619    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53620$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53621
53622    # Need to check if the found msvcr is correct architecture
53623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53624$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53625    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53627      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53628      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53629      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53630        CORRECT_MSVCR_ARCH="PE32 executable"
53631      else
53632        CORRECT_MSVCR_ARCH="PE32+ executable"
53633      fi
53634    else
53635      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53636        CORRECT_MSVCR_ARCH=386
53637      else
53638        CORRECT_MSVCR_ARCH=x86-64
53639      fi
53640    fi
53641    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53643$as_echo "ok" >&6; }
53644      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53645
53646  # Only process if variable expands to non-empty
53647
53648  if test "x$MSVC_DLL" != x; then
53649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53650
53651  # Input might be given as Windows format, start by converting to
53652  # unix format.
53653  path="$MSVC_DLL"
53654  new_path=`$CYGPATH -u "$path"`
53655
53656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53659  # "foo.exe" is OK but "foo" is an error.
53660  #
53661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53662  # It is also a way to make sure we got the proper file name for the real test later on.
53663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53664  if test "x$test_shortpath" = x; then
53665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53666$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53667    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53668  fi
53669
53670  # Call helper function which possibly converts this using DOS-style short mode.
53671  # If so, the updated path is stored in $new_path.
53672
53673  input_path="$new_path"
53674  # Check if we need to convert this using DOS-style short mode. If the path
53675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53676  # take no chances and rewrite it.
53677  # Note: m4 eats our [], so we need to use [ and ] instead.
53678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53679  if test "x$has_forbidden_chars" != x; then
53680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53684      # Going to short mode and back again did indeed matter. Since short mode is
53685      # case insensitive, let's make it lowercase to improve readability.
53686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53687      # Now convert it back to Unix-style (cygpath)
53688      input_path=`$CYGPATH -u "$shortmode_path"`
53689      new_path="$input_path"
53690    fi
53691  fi
53692
53693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53694  if test "x$test_cygdrive_prefix" = x; then
53695    # As a simple fix, exclude /usr/bin since it's not a real path.
53696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53698      # a path prefixed by /cygdrive for fixpath to work.
53699      new_path="$CYGWIN_ROOT_PATH$input_path"
53700    fi
53701  fi
53702
53703
53704  if test "x$path" != "x$new_path"; then
53705    MSVC_DLL="$new_path"
53706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53707$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53708  fi
53709
53710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53711
53712  path="$MSVC_DLL"
53713  has_colon=`$ECHO $path | $GREP ^.:`
53714  new_path="$path"
53715  if test "x$has_colon" = x; then
53716    # Not in mixed or Windows style, start by that.
53717    new_path=`cmd //c echo $path`
53718  fi
53719
53720
53721  input_path="$new_path"
53722  # Check if we need to convert this using DOS-style short mode. If the path
53723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53724  # take no chances and rewrite it.
53725  # Note: m4 eats our [], so we need to use [ and ] instead.
53726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53727  if test "x$has_forbidden_chars" != x; then
53728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53730  fi
53731
53732
53733  windows_path="$new_path"
53734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53735    unix_path=`$CYGPATH -u "$windows_path"`
53736    new_path="$unix_path"
53737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53739    new_path="$unix_path"
53740  fi
53741
53742  if test "x$path" != "x$new_path"; then
53743    MSVC_DLL="$new_path"
53744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53745$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53746  fi
53747
53748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53750
53751    else
53752      # We're on a unix platform. Hooray! :)
53753      path="$MSVC_DLL"
53754      has_space=`$ECHO "$path" | $GREP " "`
53755      if test "x$has_space" != x; then
53756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53757$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53759      fi
53760
53761      # Use eval to expand a potential ~
53762      eval path="$path"
53763      if test ! -f "$path" && test ! -d "$path"; then
53764        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53765      fi
53766
53767      if test -d "$path"; then
53768        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53769      else
53770        dir="`$DIRNAME "$path"`"
53771        base="`$BASENAME "$path"`"
53772        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53773      fi
53774    fi
53775  fi
53776
53777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53778$as_echo_n "checking for $DLL_NAME... " >&6; }
53779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53780$as_echo "$MSVC_DLL" >&6; }
53781    else
53782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53783$as_echo "incorrect, ignoring" >&6; }
53784      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53785$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53786    fi
53787  fi
53788
53789    fi
53790  fi
53791
53792  if test "x$MSVC_DLL" = x; then
53793    # Probe: Check in the Boot JDK directory.
53794    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53795
53796  DLL_NAME="$DLL_NAME"
53797  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53798  METHOD="well-known location in Boot JDK"
53799  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53800    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53801$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53802
53803    # Need to check if the found msvcr is correct architecture
53804    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53805$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53806    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53808      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53809      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53810      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53811        CORRECT_MSVCR_ARCH="PE32 executable"
53812      else
53813        CORRECT_MSVCR_ARCH="PE32+ executable"
53814      fi
53815    else
53816      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53817        CORRECT_MSVCR_ARCH=386
53818      else
53819        CORRECT_MSVCR_ARCH=x86-64
53820      fi
53821    fi
53822    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53824$as_echo "ok" >&6; }
53825      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53826
53827  # Only process if variable expands to non-empty
53828
53829  if test "x$MSVC_DLL" != x; then
53830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53831
53832  # Input might be given as Windows format, start by converting to
53833  # unix format.
53834  path="$MSVC_DLL"
53835  new_path=`$CYGPATH -u "$path"`
53836
53837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53840  # "foo.exe" is OK but "foo" is an error.
53841  #
53842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53843  # It is also a way to make sure we got the proper file name for the real test later on.
53844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53845  if test "x$test_shortpath" = x; then
53846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53847$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53848    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53849  fi
53850
53851  # Call helper function which possibly converts this using DOS-style short mode.
53852  # If so, the updated path is stored in $new_path.
53853
53854  input_path="$new_path"
53855  # Check if we need to convert this using DOS-style short mode. If the path
53856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53857  # take no chances and rewrite it.
53858  # Note: m4 eats our [], so we need to use [ and ] instead.
53859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53860  if test "x$has_forbidden_chars" != x; then
53861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53865      # Going to short mode and back again did indeed matter. Since short mode is
53866      # case insensitive, let's make it lowercase to improve readability.
53867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53868      # Now convert it back to Unix-style (cygpath)
53869      input_path=`$CYGPATH -u "$shortmode_path"`
53870      new_path="$input_path"
53871    fi
53872  fi
53873
53874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53875  if test "x$test_cygdrive_prefix" = x; then
53876    # As a simple fix, exclude /usr/bin since it's not a real path.
53877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53879      # a path prefixed by /cygdrive for fixpath to work.
53880      new_path="$CYGWIN_ROOT_PATH$input_path"
53881    fi
53882  fi
53883
53884
53885  if test "x$path" != "x$new_path"; then
53886    MSVC_DLL="$new_path"
53887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53888$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53889  fi
53890
53891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53892
53893  path="$MSVC_DLL"
53894  has_colon=`$ECHO $path | $GREP ^.:`
53895  new_path="$path"
53896  if test "x$has_colon" = x; then
53897    # Not in mixed or Windows style, start by that.
53898    new_path=`cmd //c echo $path`
53899  fi
53900
53901
53902  input_path="$new_path"
53903  # Check if we need to convert this using DOS-style short mode. If the path
53904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53905  # take no chances and rewrite it.
53906  # Note: m4 eats our [], so we need to use [ and ] instead.
53907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53908  if test "x$has_forbidden_chars" != x; then
53909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53911  fi
53912
53913
53914  windows_path="$new_path"
53915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53916    unix_path=`$CYGPATH -u "$windows_path"`
53917    new_path="$unix_path"
53918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53920    new_path="$unix_path"
53921  fi
53922
53923  if test "x$path" != "x$new_path"; then
53924    MSVC_DLL="$new_path"
53925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53926$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53927  fi
53928
53929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53931
53932    else
53933      # We're on a unix platform. Hooray! :)
53934      path="$MSVC_DLL"
53935      has_space=`$ECHO "$path" | $GREP " "`
53936      if test "x$has_space" != x; then
53937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53938$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53939        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53940      fi
53941
53942      # Use eval to expand a potential ~
53943      eval path="$path"
53944      if test ! -f "$path" && test ! -d "$path"; then
53945        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53946      fi
53947
53948      if test -d "$path"; then
53949        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53950      else
53951        dir="`$DIRNAME "$path"`"
53952        base="`$BASENAME "$path"`"
53953        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53954      fi
53955    fi
53956  fi
53957
53958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53959$as_echo_n "checking for $DLL_NAME... " >&6; }
53960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53961$as_echo "$MSVC_DLL" >&6; }
53962    else
53963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53964$as_echo "incorrect, ignoring" >&6; }
53965      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53966$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53967    fi
53968  fi
53969
53970  fi
53971
53972  if test "x$MSVC_DLL" = x; then
53973    # Probe: Look in the Windows system32 directory
53974    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53975
53976  windows_path="$CYGWIN_SYSTEMROOT"
53977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53978    unix_path=`$CYGPATH -u "$windows_path"`
53979    CYGWIN_SYSTEMROOT="$unix_path"
53980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53982    CYGWIN_SYSTEMROOT="$unix_path"
53983  fi
53984
53985    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53986
53987  DLL_NAME="$DLL_NAME"
53988  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53989  METHOD="well-known location in SYSTEMROOT"
53990  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53991    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53992$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53993
53994    # Need to check if the found msvcr is correct architecture
53995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53996$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53997    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53999      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54000      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54001      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54002        CORRECT_MSVCR_ARCH="PE32 executable"
54003      else
54004        CORRECT_MSVCR_ARCH="PE32+ executable"
54005      fi
54006    else
54007      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54008        CORRECT_MSVCR_ARCH=386
54009      else
54010        CORRECT_MSVCR_ARCH=x86-64
54011      fi
54012    fi
54013    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54015$as_echo "ok" >&6; }
54016      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54017
54018  # Only process if variable expands to non-empty
54019
54020  if test "x$MSVC_DLL" != x; then
54021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54022
54023  # Input might be given as Windows format, start by converting to
54024  # unix format.
54025  path="$MSVC_DLL"
54026  new_path=`$CYGPATH -u "$path"`
54027
54028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54031  # "foo.exe" is OK but "foo" is an error.
54032  #
54033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54034  # It is also a way to make sure we got the proper file name for the real test later on.
54035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54036  if test "x$test_shortpath" = x; then
54037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54038$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54039    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54040  fi
54041
54042  # Call helper function which possibly converts this using DOS-style short mode.
54043  # If so, the updated path is stored in $new_path.
54044
54045  input_path="$new_path"
54046  # Check if we need to convert this using DOS-style short mode. If the path
54047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54048  # take no chances and rewrite it.
54049  # Note: m4 eats our [], so we need to use [ and ] instead.
54050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54051  if test "x$has_forbidden_chars" != x; then
54052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54056      # Going to short mode and back again did indeed matter. Since short mode is
54057      # case insensitive, let's make it lowercase to improve readability.
54058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54059      # Now convert it back to Unix-style (cygpath)
54060      input_path=`$CYGPATH -u "$shortmode_path"`
54061      new_path="$input_path"
54062    fi
54063  fi
54064
54065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54066  if test "x$test_cygdrive_prefix" = x; then
54067    # As a simple fix, exclude /usr/bin since it's not a real path.
54068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54070      # a path prefixed by /cygdrive for fixpath to work.
54071      new_path="$CYGWIN_ROOT_PATH$input_path"
54072    fi
54073  fi
54074
54075
54076  if test "x$path" != "x$new_path"; then
54077    MSVC_DLL="$new_path"
54078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54079$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54080  fi
54081
54082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54083
54084  path="$MSVC_DLL"
54085  has_colon=`$ECHO $path | $GREP ^.:`
54086  new_path="$path"
54087  if test "x$has_colon" = x; then
54088    # Not in mixed or Windows style, start by that.
54089    new_path=`cmd //c echo $path`
54090  fi
54091
54092
54093  input_path="$new_path"
54094  # Check if we need to convert this using DOS-style short mode. If the path
54095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54096  # take no chances and rewrite it.
54097  # Note: m4 eats our [], so we need to use [ and ] instead.
54098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54099  if test "x$has_forbidden_chars" != x; then
54100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54102  fi
54103
54104
54105  windows_path="$new_path"
54106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54107    unix_path=`$CYGPATH -u "$windows_path"`
54108    new_path="$unix_path"
54109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54111    new_path="$unix_path"
54112  fi
54113
54114  if test "x$path" != "x$new_path"; then
54115    MSVC_DLL="$new_path"
54116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54117$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54118  fi
54119
54120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54122
54123    else
54124      # We're on a unix platform. Hooray! :)
54125      path="$MSVC_DLL"
54126      has_space=`$ECHO "$path" | $GREP " "`
54127      if test "x$has_space" != x; then
54128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54129$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54130        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54131      fi
54132
54133      # Use eval to expand a potential ~
54134      eval path="$path"
54135      if test ! -f "$path" && test ! -d "$path"; then
54136        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54137      fi
54138
54139      if test -d "$path"; then
54140        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54141      else
54142        dir="`$DIRNAME "$path"`"
54143        base="`$BASENAME "$path"`"
54144        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54145      fi
54146    fi
54147  fi
54148
54149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54150$as_echo_n "checking for $DLL_NAME... " >&6; }
54151      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54152$as_echo "$MSVC_DLL" >&6; }
54153    else
54154      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54155$as_echo "incorrect, ignoring" >&6; }
54156      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54157$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54158    fi
54159  fi
54160
54161  fi
54162
54163  if test "x$MSVC_DLL" = x; then
54164    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54165    if test "x$VS100COMNTOOLS" != x; then
54166      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54167
54168  windows_path="$CYGWIN_VS_TOOLS_DIR"
54169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54170    unix_path=`$CYGPATH -u "$windows_path"`
54171    CYGWIN_VS_TOOLS_DIR="$unix_path"
54172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54174    CYGWIN_VS_TOOLS_DIR="$unix_path"
54175  fi
54176
54177      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54178        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54179	    | $GREP -i /x64/ | $HEAD --lines 1`
54180      else
54181        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54182	    | $GREP -i /x86/ | $HEAD --lines 1`
54183      fi
54184
54185  DLL_NAME="$DLL_NAME"
54186  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54187  METHOD="search of VS100COMNTOOLS"
54188  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54189    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54190$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54191
54192    # Need to check if the found msvcr is correct architecture
54193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54194$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54195    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54197      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54198      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54199      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54200        CORRECT_MSVCR_ARCH="PE32 executable"
54201      else
54202        CORRECT_MSVCR_ARCH="PE32+ executable"
54203      fi
54204    else
54205      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54206        CORRECT_MSVCR_ARCH=386
54207      else
54208        CORRECT_MSVCR_ARCH=x86-64
54209      fi
54210    fi
54211    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54212      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54213$as_echo "ok" >&6; }
54214      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54215
54216  # Only process if variable expands to non-empty
54217
54218  if test "x$MSVC_DLL" != x; then
54219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54220
54221  # Input might be given as Windows format, start by converting to
54222  # unix format.
54223  path="$MSVC_DLL"
54224  new_path=`$CYGPATH -u "$path"`
54225
54226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54229  # "foo.exe" is OK but "foo" is an error.
54230  #
54231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54232  # It is also a way to make sure we got the proper file name for the real test later on.
54233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54234  if test "x$test_shortpath" = x; then
54235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54236$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54237    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54238  fi
54239
54240  # Call helper function which possibly converts this using DOS-style short mode.
54241  # If so, the updated path is stored in $new_path.
54242
54243  input_path="$new_path"
54244  # Check if we need to convert this using DOS-style short mode. If the path
54245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54246  # take no chances and rewrite it.
54247  # Note: m4 eats our [], so we need to use [ and ] instead.
54248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54249  if test "x$has_forbidden_chars" != x; then
54250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54254      # Going to short mode and back again did indeed matter. Since short mode is
54255      # case insensitive, let's make it lowercase to improve readability.
54256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54257      # Now convert it back to Unix-style (cygpath)
54258      input_path=`$CYGPATH -u "$shortmode_path"`
54259      new_path="$input_path"
54260    fi
54261  fi
54262
54263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54264  if test "x$test_cygdrive_prefix" = x; then
54265    # As a simple fix, exclude /usr/bin since it's not a real path.
54266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54268      # a path prefixed by /cygdrive for fixpath to work.
54269      new_path="$CYGWIN_ROOT_PATH$input_path"
54270    fi
54271  fi
54272
54273
54274  if test "x$path" != "x$new_path"; then
54275    MSVC_DLL="$new_path"
54276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54277$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54278  fi
54279
54280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54281
54282  path="$MSVC_DLL"
54283  has_colon=`$ECHO $path | $GREP ^.:`
54284  new_path="$path"
54285  if test "x$has_colon" = x; then
54286    # Not in mixed or Windows style, start by that.
54287    new_path=`cmd //c echo $path`
54288  fi
54289
54290
54291  input_path="$new_path"
54292  # Check if we need to convert this using DOS-style short mode. If the path
54293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54294  # take no chances and rewrite it.
54295  # Note: m4 eats our [], so we need to use [ and ] instead.
54296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54297  if test "x$has_forbidden_chars" != x; then
54298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54300  fi
54301
54302
54303  windows_path="$new_path"
54304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54305    unix_path=`$CYGPATH -u "$windows_path"`
54306    new_path="$unix_path"
54307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54309    new_path="$unix_path"
54310  fi
54311
54312  if test "x$path" != "x$new_path"; then
54313    MSVC_DLL="$new_path"
54314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54315$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54316  fi
54317
54318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54320
54321    else
54322      # We're on a unix platform. Hooray! :)
54323      path="$MSVC_DLL"
54324      has_space=`$ECHO "$path" | $GREP " "`
54325      if test "x$has_space" != x; then
54326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54327$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54329      fi
54330
54331      # Use eval to expand a potential ~
54332      eval path="$path"
54333      if test ! -f "$path" && test ! -d "$path"; then
54334        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54335      fi
54336
54337      if test -d "$path"; then
54338        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54339      else
54340        dir="`$DIRNAME "$path"`"
54341        base="`$BASENAME "$path"`"
54342        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54343      fi
54344    fi
54345  fi
54346
54347      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54348$as_echo_n "checking for $DLL_NAME... " >&6; }
54349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54350$as_echo "$MSVC_DLL" >&6; }
54351    else
54352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54353$as_echo "incorrect, ignoring" >&6; }
54354      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54355$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54356    fi
54357  fi
54358
54359    fi
54360  fi
54361
54362  if test "x$MSVC_DLL" = x; then
54363    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54364    # (This was the original behaviour; kept since it might turn something up)
54365    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54366      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54367        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54368	    | $GREP x64 | $HEAD --lines 1`
54369      else
54370        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54371	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54372        if test "x$POSSIBLE_MSVC_DLL" = x; then
54373          # We're grasping at straws now...
54374          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54375	      | $HEAD --lines 1`
54376        fi
54377      fi
54378
54379
54380  DLL_NAME="$DLL_NAME"
54381  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54382  METHOD="search of VCINSTALLDIR"
54383  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54384    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54385$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54386
54387    # Need to check if the found msvcr is correct architecture
54388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54389$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54390    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54392      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54393      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54394      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54395        CORRECT_MSVCR_ARCH="PE32 executable"
54396      else
54397        CORRECT_MSVCR_ARCH="PE32+ executable"
54398      fi
54399    else
54400      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54401        CORRECT_MSVCR_ARCH=386
54402      else
54403        CORRECT_MSVCR_ARCH=x86-64
54404      fi
54405    fi
54406    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54408$as_echo "ok" >&6; }
54409      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54410
54411  # Only process if variable expands to non-empty
54412
54413  if test "x$MSVC_DLL" != x; then
54414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54415
54416  # Input might be given as Windows format, start by converting to
54417  # unix format.
54418  path="$MSVC_DLL"
54419  new_path=`$CYGPATH -u "$path"`
54420
54421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54424  # "foo.exe" is OK but "foo" is an error.
54425  #
54426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54427  # It is also a way to make sure we got the proper file name for the real test later on.
54428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54429  if test "x$test_shortpath" = x; then
54430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54431$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54432    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54433  fi
54434
54435  # Call helper function which possibly converts this using DOS-style short mode.
54436  # If so, the updated path is stored in $new_path.
54437
54438  input_path="$new_path"
54439  # Check if we need to convert this using DOS-style short mode. If the path
54440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54441  # take no chances and rewrite it.
54442  # Note: m4 eats our [], so we need to use [ and ] instead.
54443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54444  if test "x$has_forbidden_chars" != x; then
54445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54449      # Going to short mode and back again did indeed matter. Since short mode is
54450      # case insensitive, let's make it lowercase to improve readability.
54451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54452      # Now convert it back to Unix-style (cygpath)
54453      input_path=`$CYGPATH -u "$shortmode_path"`
54454      new_path="$input_path"
54455    fi
54456  fi
54457
54458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54459  if test "x$test_cygdrive_prefix" = x; then
54460    # As a simple fix, exclude /usr/bin since it's not a real path.
54461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54463      # a path prefixed by /cygdrive for fixpath to work.
54464      new_path="$CYGWIN_ROOT_PATH$input_path"
54465    fi
54466  fi
54467
54468
54469  if test "x$path" != "x$new_path"; then
54470    MSVC_DLL="$new_path"
54471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54472$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54473  fi
54474
54475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54476
54477  path="$MSVC_DLL"
54478  has_colon=`$ECHO $path | $GREP ^.:`
54479  new_path="$path"
54480  if test "x$has_colon" = x; then
54481    # Not in mixed or Windows style, start by that.
54482    new_path=`cmd //c echo $path`
54483  fi
54484
54485
54486  input_path="$new_path"
54487  # Check if we need to convert this using DOS-style short mode. If the path
54488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54489  # take no chances and rewrite it.
54490  # Note: m4 eats our [], so we need to use [ and ] instead.
54491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54492  if test "x$has_forbidden_chars" != x; then
54493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54495  fi
54496
54497
54498  windows_path="$new_path"
54499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54500    unix_path=`$CYGPATH -u "$windows_path"`
54501    new_path="$unix_path"
54502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54504    new_path="$unix_path"
54505  fi
54506
54507  if test "x$path" != "x$new_path"; then
54508    MSVC_DLL="$new_path"
54509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54510$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54511  fi
54512
54513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54515
54516    else
54517      # We're on a unix platform. Hooray! :)
54518      path="$MSVC_DLL"
54519      has_space=`$ECHO "$path" | $GREP " "`
54520      if test "x$has_space" != x; then
54521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54522$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54524      fi
54525
54526      # Use eval to expand a potential ~
54527      eval path="$path"
54528      if test ! -f "$path" && test ! -d "$path"; then
54529        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54530      fi
54531
54532      if test -d "$path"; then
54533        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54534      else
54535        dir="`$DIRNAME "$path"`"
54536        base="`$BASENAME "$path"`"
54537        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54538      fi
54539    fi
54540  fi
54541
54542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54543$as_echo_n "checking for $DLL_NAME... " >&6; }
54544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54545$as_echo "$MSVC_DLL" >&6; }
54546    else
54547      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54548$as_echo "incorrect, ignoring" >&6; }
54549      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54550$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54551    fi
54552  fi
54553
54554    fi
54555  fi
54556
54557  if test "x$MSVC_DLL" = x; then
54558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54559$as_echo_n "checking for $DLL_NAME... " >&6; }
54560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54561$as_echo "no" >&6; }
54562    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54563  fi
54564
54565    MSVCR_DLL="$MSVC_DLL"
54566  fi
54567
54568
54569
54570# Check whether --with-msvcp-dll was given.
54571if test "${with_msvcp_dll+set}" = set; then :
54572  withval=$with_msvcp_dll;
54573fi
54574
54575
54576  if test "x$MSVCP_NAME" != "x"; then
54577    if test "x$with_msvcp_dll" != x; then
54578      # If given explicitely by user, do not probe. If not present, fail directly.
54579
54580  DLL_NAME="$MSVCP_NAME"
54581  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54582  METHOD="--with-msvcp-dll"
54583  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54584    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54585$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54586
54587    # Need to check if the found msvcr is correct architecture
54588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54589$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54590    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54592      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54593      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54594      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54595        CORRECT_MSVCR_ARCH="PE32 executable"
54596      else
54597        CORRECT_MSVCR_ARCH="PE32+ executable"
54598      fi
54599    else
54600      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54601        CORRECT_MSVCR_ARCH=386
54602      else
54603        CORRECT_MSVCR_ARCH=x86-64
54604      fi
54605    fi
54606    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54608$as_echo "ok" >&6; }
54609      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54610
54611  # Only process if variable expands to non-empty
54612
54613  if test "x$MSVC_DLL" != x; then
54614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54615
54616  # Input might be given as Windows format, start by converting to
54617  # unix format.
54618  path="$MSVC_DLL"
54619  new_path=`$CYGPATH -u "$path"`
54620
54621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54624  # "foo.exe" is OK but "foo" is an error.
54625  #
54626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54627  # It is also a way to make sure we got the proper file name for the real test later on.
54628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54629  if test "x$test_shortpath" = x; then
54630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54631$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54632    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54633  fi
54634
54635  # Call helper function which possibly converts this using DOS-style short mode.
54636  # If so, the updated path is stored in $new_path.
54637
54638  input_path="$new_path"
54639  # Check if we need to convert this using DOS-style short mode. If the path
54640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54641  # take no chances and rewrite it.
54642  # Note: m4 eats our [], so we need to use [ and ] instead.
54643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54644  if test "x$has_forbidden_chars" != x; then
54645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54649      # Going to short mode and back again did indeed matter. Since short mode is
54650      # case insensitive, let's make it lowercase to improve readability.
54651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54652      # Now convert it back to Unix-style (cygpath)
54653      input_path=`$CYGPATH -u "$shortmode_path"`
54654      new_path="$input_path"
54655    fi
54656  fi
54657
54658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54659  if test "x$test_cygdrive_prefix" = x; then
54660    # As a simple fix, exclude /usr/bin since it's not a real path.
54661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54663      # a path prefixed by /cygdrive for fixpath to work.
54664      new_path="$CYGWIN_ROOT_PATH$input_path"
54665    fi
54666  fi
54667
54668
54669  if test "x$path" != "x$new_path"; then
54670    MSVC_DLL="$new_path"
54671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54672$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54673  fi
54674
54675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54676
54677  path="$MSVC_DLL"
54678  has_colon=`$ECHO $path | $GREP ^.:`
54679  new_path="$path"
54680  if test "x$has_colon" = x; then
54681    # Not in mixed or Windows style, start by that.
54682    new_path=`cmd //c echo $path`
54683  fi
54684
54685
54686  input_path="$new_path"
54687  # Check if we need to convert this using DOS-style short mode. If the path
54688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54689  # take no chances and rewrite it.
54690  # Note: m4 eats our [], so we need to use [ and ] instead.
54691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54692  if test "x$has_forbidden_chars" != x; then
54693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54695  fi
54696
54697
54698  windows_path="$new_path"
54699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54700    unix_path=`$CYGPATH -u "$windows_path"`
54701    new_path="$unix_path"
54702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54704    new_path="$unix_path"
54705  fi
54706
54707  if test "x$path" != "x$new_path"; then
54708    MSVC_DLL="$new_path"
54709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54710$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54711  fi
54712
54713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54715
54716    else
54717      # We're on a unix platform. Hooray! :)
54718      path="$MSVC_DLL"
54719      has_space=`$ECHO "$path" | $GREP " "`
54720      if test "x$has_space" != x; then
54721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54722$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54724      fi
54725
54726      # Use eval to expand a potential ~
54727      eval path="$path"
54728      if test ! -f "$path" && test ! -d "$path"; then
54729        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54730      fi
54731
54732      if test -d "$path"; then
54733        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54734      else
54735        dir="`$DIRNAME "$path"`"
54736        base="`$BASENAME "$path"`"
54737        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54738      fi
54739    fi
54740  fi
54741
54742      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54743$as_echo_n "checking for $DLL_NAME... " >&6; }
54744      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54745$as_echo "$MSVC_DLL" >&6; }
54746    else
54747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54748$as_echo "incorrect, ignoring" >&6; }
54749      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54750$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54751    fi
54752  fi
54753
54754      if test "x$MSVC_DLL" = x; then
54755        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54756      fi
54757      MSVCP_DLL="$MSVC_DLL"
54758    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54759
54760  DLL_NAME="$MSVCP_NAME"
54761  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54762  METHOD="devkit"
54763  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54764    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54765$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54766
54767    # Need to check if the found msvcr is correct architecture
54768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54769$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54770    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54772      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54773      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54774      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54775        CORRECT_MSVCR_ARCH="PE32 executable"
54776      else
54777        CORRECT_MSVCR_ARCH="PE32+ executable"
54778      fi
54779    else
54780      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54781        CORRECT_MSVCR_ARCH=386
54782      else
54783        CORRECT_MSVCR_ARCH=x86-64
54784      fi
54785    fi
54786    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54788$as_echo "ok" >&6; }
54789      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54790
54791  # Only process if variable expands to non-empty
54792
54793  if test "x$MSVC_DLL" != x; then
54794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54795
54796  # Input might be given as Windows format, start by converting to
54797  # unix format.
54798  path="$MSVC_DLL"
54799  new_path=`$CYGPATH -u "$path"`
54800
54801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54804  # "foo.exe" is OK but "foo" is an error.
54805  #
54806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54807  # It is also a way to make sure we got the proper file name for the real test later on.
54808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54809  if test "x$test_shortpath" = x; then
54810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54811$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54812    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54813  fi
54814
54815  # Call helper function which possibly converts this using DOS-style short mode.
54816  # If so, the updated path is stored in $new_path.
54817
54818  input_path="$new_path"
54819  # Check if we need to convert this using DOS-style short mode. If the path
54820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54821  # take no chances and rewrite it.
54822  # Note: m4 eats our [], so we need to use [ and ] instead.
54823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54824  if test "x$has_forbidden_chars" != x; then
54825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54829      # Going to short mode and back again did indeed matter. Since short mode is
54830      # case insensitive, let's make it lowercase to improve readability.
54831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54832      # Now convert it back to Unix-style (cygpath)
54833      input_path=`$CYGPATH -u "$shortmode_path"`
54834      new_path="$input_path"
54835    fi
54836  fi
54837
54838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54839  if test "x$test_cygdrive_prefix" = x; then
54840    # As a simple fix, exclude /usr/bin since it's not a real path.
54841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54843      # a path prefixed by /cygdrive for fixpath to work.
54844      new_path="$CYGWIN_ROOT_PATH$input_path"
54845    fi
54846  fi
54847
54848
54849  if test "x$path" != "x$new_path"; then
54850    MSVC_DLL="$new_path"
54851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54852$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54853  fi
54854
54855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54856
54857  path="$MSVC_DLL"
54858  has_colon=`$ECHO $path | $GREP ^.:`
54859  new_path="$path"
54860  if test "x$has_colon" = x; then
54861    # Not in mixed or Windows style, start by that.
54862    new_path=`cmd //c echo $path`
54863  fi
54864
54865
54866  input_path="$new_path"
54867  # Check if we need to convert this using DOS-style short mode. If the path
54868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54869  # take no chances and rewrite it.
54870  # Note: m4 eats our [], so we need to use [ and ] instead.
54871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54872  if test "x$has_forbidden_chars" != x; then
54873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54875  fi
54876
54877
54878  windows_path="$new_path"
54879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54880    unix_path=`$CYGPATH -u "$windows_path"`
54881    new_path="$unix_path"
54882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54884    new_path="$unix_path"
54885  fi
54886
54887  if test "x$path" != "x$new_path"; then
54888    MSVC_DLL="$new_path"
54889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54890$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54891  fi
54892
54893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54895
54896    else
54897      # We're on a unix platform. Hooray! :)
54898      path="$MSVC_DLL"
54899      has_space=`$ECHO "$path" | $GREP " "`
54900      if test "x$has_space" != x; then
54901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54902$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54904      fi
54905
54906      # Use eval to expand a potential ~
54907      eval path="$path"
54908      if test ! -f "$path" && test ! -d "$path"; then
54909        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54910      fi
54911
54912      if test -d "$path"; then
54913        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54914      else
54915        dir="`$DIRNAME "$path"`"
54916        base="`$BASENAME "$path"`"
54917        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54918      fi
54919    fi
54920  fi
54921
54922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54923$as_echo_n "checking for $DLL_NAME... " >&6; }
54924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54925$as_echo "$MSVC_DLL" >&6; }
54926    else
54927      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54928$as_echo "incorrect, ignoring" >&6; }
54929      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54930$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54931    fi
54932  fi
54933
54934      if test "x$MSVC_DLL" = x; then
54935        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54936      fi
54937      MSVCP_DLL="$MSVC_DLL"
54938    else
54939
54940  DLL_NAME="${MSVCP_NAME}"
54941  MSVC_DLL=
54942
54943  if test "x$MSVC_DLL" = x; then
54944    # Probe: Using well-known location from Visual Studio 10.0
54945    if test "x$VCINSTALLDIR" != x; then
54946      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54947
54948  windows_path="$CYGWIN_VC_INSTALL_DIR"
54949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54950    unix_path=`$CYGPATH -u "$windows_path"`
54951    CYGWIN_VC_INSTALL_DIR="$unix_path"
54952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54954    CYGWIN_VC_INSTALL_DIR="$unix_path"
54955  fi
54956
54957      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54958        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54959      else
54960        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54961      fi
54962      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54963
54964  DLL_NAME="$DLL_NAME"
54965  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54966  METHOD="well-known location in VCINSTALLDIR"
54967  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54968    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54969$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54970
54971    # Need to check if the found msvcr is correct architecture
54972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54973$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54974    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54976      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54977      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54978      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54979        CORRECT_MSVCR_ARCH="PE32 executable"
54980      else
54981        CORRECT_MSVCR_ARCH="PE32+ executable"
54982      fi
54983    else
54984      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54985        CORRECT_MSVCR_ARCH=386
54986      else
54987        CORRECT_MSVCR_ARCH=x86-64
54988      fi
54989    fi
54990    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54992$as_echo "ok" >&6; }
54993      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54994
54995  # Only process if variable expands to non-empty
54996
54997  if test "x$MSVC_DLL" != x; then
54998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54999
55000  # Input might be given as Windows format, start by converting to
55001  # unix format.
55002  path="$MSVC_DLL"
55003  new_path=`$CYGPATH -u "$path"`
55004
55005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55008  # "foo.exe" is OK but "foo" is an error.
55009  #
55010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55011  # It is also a way to make sure we got the proper file name for the real test later on.
55012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55013  if test "x$test_shortpath" = x; then
55014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55015$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55016    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55017  fi
55018
55019  # Call helper function which possibly converts this using DOS-style short mode.
55020  # If so, the updated path is stored in $new_path.
55021
55022  input_path="$new_path"
55023  # Check if we need to convert this using DOS-style short mode. If the path
55024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55025  # take no chances and rewrite it.
55026  # Note: m4 eats our [], so we need to use [ and ] instead.
55027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55028  if test "x$has_forbidden_chars" != x; then
55029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55033      # Going to short mode and back again did indeed matter. Since short mode is
55034      # case insensitive, let's make it lowercase to improve readability.
55035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55036      # Now convert it back to Unix-style (cygpath)
55037      input_path=`$CYGPATH -u "$shortmode_path"`
55038      new_path="$input_path"
55039    fi
55040  fi
55041
55042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55043  if test "x$test_cygdrive_prefix" = x; then
55044    # As a simple fix, exclude /usr/bin since it's not a real path.
55045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55047      # a path prefixed by /cygdrive for fixpath to work.
55048      new_path="$CYGWIN_ROOT_PATH$input_path"
55049    fi
55050  fi
55051
55052
55053  if test "x$path" != "x$new_path"; then
55054    MSVC_DLL="$new_path"
55055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55056$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55057  fi
55058
55059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55060
55061  path="$MSVC_DLL"
55062  has_colon=`$ECHO $path | $GREP ^.:`
55063  new_path="$path"
55064  if test "x$has_colon" = x; then
55065    # Not in mixed or Windows style, start by that.
55066    new_path=`cmd //c echo $path`
55067  fi
55068
55069
55070  input_path="$new_path"
55071  # Check if we need to convert this using DOS-style short mode. If the path
55072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55073  # take no chances and rewrite it.
55074  # Note: m4 eats our [], so we need to use [ and ] instead.
55075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55076  if test "x$has_forbidden_chars" != x; then
55077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55079  fi
55080
55081
55082  windows_path="$new_path"
55083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55084    unix_path=`$CYGPATH -u "$windows_path"`
55085    new_path="$unix_path"
55086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55088    new_path="$unix_path"
55089  fi
55090
55091  if test "x$path" != "x$new_path"; then
55092    MSVC_DLL="$new_path"
55093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55094$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55095  fi
55096
55097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55099
55100    else
55101      # We're on a unix platform. Hooray! :)
55102      path="$MSVC_DLL"
55103      has_space=`$ECHO "$path" | $GREP " "`
55104      if test "x$has_space" != x; then
55105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55106$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55107        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55108      fi
55109
55110      # Use eval to expand a potential ~
55111      eval path="$path"
55112      if test ! -f "$path" && test ! -d "$path"; then
55113        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55114      fi
55115
55116      if test -d "$path"; then
55117        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55118      else
55119        dir="`$DIRNAME "$path"`"
55120        base="`$BASENAME "$path"`"
55121        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55122      fi
55123    fi
55124  fi
55125
55126      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55127$as_echo_n "checking for $DLL_NAME... " >&6; }
55128      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55129$as_echo "$MSVC_DLL" >&6; }
55130    else
55131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55132$as_echo "incorrect, ignoring" >&6; }
55133      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55134$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55135    fi
55136  fi
55137
55138    fi
55139  fi
55140
55141  if test "x$MSVC_DLL" = x; then
55142    # Probe: Check in the Boot JDK directory.
55143    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55144
55145  DLL_NAME="$DLL_NAME"
55146  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55147  METHOD="well-known location in Boot JDK"
55148  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55149    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55150$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55151
55152    # Need to check if the found msvcr is correct architecture
55153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55154$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55155    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55157      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55158      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55159      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55160        CORRECT_MSVCR_ARCH="PE32 executable"
55161      else
55162        CORRECT_MSVCR_ARCH="PE32+ executable"
55163      fi
55164    else
55165      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55166        CORRECT_MSVCR_ARCH=386
55167      else
55168        CORRECT_MSVCR_ARCH=x86-64
55169      fi
55170    fi
55171    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55173$as_echo "ok" >&6; }
55174      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55175
55176  # Only process if variable expands to non-empty
55177
55178  if test "x$MSVC_DLL" != x; then
55179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55180
55181  # Input might be given as Windows format, start by converting to
55182  # unix format.
55183  path="$MSVC_DLL"
55184  new_path=`$CYGPATH -u "$path"`
55185
55186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55189  # "foo.exe" is OK but "foo" is an error.
55190  #
55191  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55192  # It is also a way to make sure we got the proper file name for the real test later on.
55193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55194  if test "x$test_shortpath" = x; then
55195    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55196$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55197    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55198  fi
55199
55200  # Call helper function which possibly converts this using DOS-style short mode.
55201  # If so, the updated path is stored in $new_path.
55202
55203  input_path="$new_path"
55204  # Check if we need to convert this using DOS-style short mode. If the path
55205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55206  # take no chances and rewrite it.
55207  # Note: m4 eats our [], so we need to use [ and ] instead.
55208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55209  if test "x$has_forbidden_chars" != x; then
55210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55214      # Going to short mode and back again did indeed matter. Since short mode is
55215      # case insensitive, let's make it lowercase to improve readability.
55216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55217      # Now convert it back to Unix-style (cygpath)
55218      input_path=`$CYGPATH -u "$shortmode_path"`
55219      new_path="$input_path"
55220    fi
55221  fi
55222
55223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55224  if test "x$test_cygdrive_prefix" = x; then
55225    # As a simple fix, exclude /usr/bin since it's not a real path.
55226    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55228      # a path prefixed by /cygdrive for fixpath to work.
55229      new_path="$CYGWIN_ROOT_PATH$input_path"
55230    fi
55231  fi
55232
55233
55234  if test "x$path" != "x$new_path"; then
55235    MSVC_DLL="$new_path"
55236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55237$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55238  fi
55239
55240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55241
55242  path="$MSVC_DLL"
55243  has_colon=`$ECHO $path | $GREP ^.:`
55244  new_path="$path"
55245  if test "x$has_colon" = x; then
55246    # Not in mixed or Windows style, start by that.
55247    new_path=`cmd //c echo $path`
55248  fi
55249
55250
55251  input_path="$new_path"
55252  # Check if we need to convert this using DOS-style short mode. If the path
55253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55254  # take no chances and rewrite it.
55255  # Note: m4 eats our [], so we need to use [ and ] instead.
55256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55257  if test "x$has_forbidden_chars" != x; then
55258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55260  fi
55261
55262
55263  windows_path="$new_path"
55264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55265    unix_path=`$CYGPATH -u "$windows_path"`
55266    new_path="$unix_path"
55267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55269    new_path="$unix_path"
55270  fi
55271
55272  if test "x$path" != "x$new_path"; then
55273    MSVC_DLL="$new_path"
55274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55275$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55276  fi
55277
55278  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55279  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55280
55281    else
55282      # We're on a unix platform. Hooray! :)
55283      path="$MSVC_DLL"
55284      has_space=`$ECHO "$path" | $GREP " "`
55285      if test "x$has_space" != x; then
55286        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55287$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55288        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55289      fi
55290
55291      # Use eval to expand a potential ~
55292      eval path="$path"
55293      if test ! -f "$path" && test ! -d "$path"; then
55294        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55295      fi
55296
55297      if test -d "$path"; then
55298        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55299      else
55300        dir="`$DIRNAME "$path"`"
55301        base="`$BASENAME "$path"`"
55302        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55303      fi
55304    fi
55305  fi
55306
55307      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55308$as_echo_n "checking for $DLL_NAME... " >&6; }
55309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55310$as_echo "$MSVC_DLL" >&6; }
55311    else
55312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55313$as_echo "incorrect, ignoring" >&6; }
55314      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55315$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55316    fi
55317  fi
55318
55319  fi
55320
55321  if test "x$MSVC_DLL" = x; then
55322    # Probe: Look in the Windows system32 directory
55323    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55324
55325  windows_path="$CYGWIN_SYSTEMROOT"
55326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55327    unix_path=`$CYGPATH -u "$windows_path"`
55328    CYGWIN_SYSTEMROOT="$unix_path"
55329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55331    CYGWIN_SYSTEMROOT="$unix_path"
55332  fi
55333
55334    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55335
55336  DLL_NAME="$DLL_NAME"
55337  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55338  METHOD="well-known location in SYSTEMROOT"
55339  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55340    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55341$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55342
55343    # Need to check if the found msvcr is correct architecture
55344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55345$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55346    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55348      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55349      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55350      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55351        CORRECT_MSVCR_ARCH="PE32 executable"
55352      else
55353        CORRECT_MSVCR_ARCH="PE32+ executable"
55354      fi
55355    else
55356      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55357        CORRECT_MSVCR_ARCH=386
55358      else
55359        CORRECT_MSVCR_ARCH=x86-64
55360      fi
55361    fi
55362    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55364$as_echo "ok" >&6; }
55365      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55366
55367  # Only process if variable expands to non-empty
55368
55369  if test "x$MSVC_DLL" != x; then
55370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55371
55372  # Input might be given as Windows format, start by converting to
55373  # unix format.
55374  path="$MSVC_DLL"
55375  new_path=`$CYGPATH -u "$path"`
55376
55377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55380  # "foo.exe" is OK but "foo" is an error.
55381  #
55382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55383  # It is also a way to make sure we got the proper file name for the real test later on.
55384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55385  if test "x$test_shortpath" = x; then
55386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55387$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55388    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55389  fi
55390
55391  # Call helper function which possibly converts this using DOS-style short mode.
55392  # If so, the updated path is stored in $new_path.
55393
55394  input_path="$new_path"
55395  # Check if we need to convert this using DOS-style short mode. If the path
55396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55397  # take no chances and rewrite it.
55398  # Note: m4 eats our [], so we need to use [ and ] instead.
55399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55400  if test "x$has_forbidden_chars" != x; then
55401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55405      # Going to short mode and back again did indeed matter. Since short mode is
55406      # case insensitive, let's make it lowercase to improve readability.
55407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55408      # Now convert it back to Unix-style (cygpath)
55409      input_path=`$CYGPATH -u "$shortmode_path"`
55410      new_path="$input_path"
55411    fi
55412  fi
55413
55414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55415  if test "x$test_cygdrive_prefix" = x; then
55416    # As a simple fix, exclude /usr/bin since it's not a real path.
55417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55419      # a path prefixed by /cygdrive for fixpath to work.
55420      new_path="$CYGWIN_ROOT_PATH$input_path"
55421    fi
55422  fi
55423
55424
55425  if test "x$path" != "x$new_path"; then
55426    MSVC_DLL="$new_path"
55427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55428$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55429  fi
55430
55431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55432
55433  path="$MSVC_DLL"
55434  has_colon=`$ECHO $path | $GREP ^.:`
55435  new_path="$path"
55436  if test "x$has_colon" = x; then
55437    # Not in mixed or Windows style, start by that.
55438    new_path=`cmd //c echo $path`
55439  fi
55440
55441
55442  input_path="$new_path"
55443  # Check if we need to convert this using DOS-style short mode. If the path
55444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55445  # take no chances and rewrite it.
55446  # Note: m4 eats our [], so we need to use [ and ] instead.
55447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55448  if test "x$has_forbidden_chars" != x; then
55449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55451  fi
55452
55453
55454  windows_path="$new_path"
55455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55456    unix_path=`$CYGPATH -u "$windows_path"`
55457    new_path="$unix_path"
55458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55460    new_path="$unix_path"
55461  fi
55462
55463  if test "x$path" != "x$new_path"; then
55464    MSVC_DLL="$new_path"
55465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55466$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55467  fi
55468
55469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55471
55472    else
55473      # We're on a unix platform. Hooray! :)
55474      path="$MSVC_DLL"
55475      has_space=`$ECHO "$path" | $GREP " "`
55476      if test "x$has_space" != x; then
55477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55478$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55480      fi
55481
55482      # Use eval to expand a potential ~
55483      eval path="$path"
55484      if test ! -f "$path" && test ! -d "$path"; then
55485        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55486      fi
55487
55488      if test -d "$path"; then
55489        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55490      else
55491        dir="`$DIRNAME "$path"`"
55492        base="`$BASENAME "$path"`"
55493        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55494      fi
55495    fi
55496  fi
55497
55498      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55499$as_echo_n "checking for $DLL_NAME... " >&6; }
55500      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55501$as_echo "$MSVC_DLL" >&6; }
55502    else
55503      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55504$as_echo "incorrect, ignoring" >&6; }
55505      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55506$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55507    fi
55508  fi
55509
55510  fi
55511
55512  if test "x$MSVC_DLL" = x; then
55513    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55514    if test "x$VS100COMNTOOLS" != x; then
55515      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55516
55517  windows_path="$CYGWIN_VS_TOOLS_DIR"
55518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55519    unix_path=`$CYGPATH -u "$windows_path"`
55520    CYGWIN_VS_TOOLS_DIR="$unix_path"
55521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55523    CYGWIN_VS_TOOLS_DIR="$unix_path"
55524  fi
55525
55526      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55527        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55528	    | $GREP -i /x64/ | $HEAD --lines 1`
55529      else
55530        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55531	    | $GREP -i /x86/ | $HEAD --lines 1`
55532      fi
55533
55534  DLL_NAME="$DLL_NAME"
55535  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55536  METHOD="search of VS100COMNTOOLS"
55537  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55538    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55539$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55540
55541    # Need to check if the found msvcr is correct architecture
55542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55543$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55544    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55546      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55547      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55548      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55549        CORRECT_MSVCR_ARCH="PE32 executable"
55550      else
55551        CORRECT_MSVCR_ARCH="PE32+ executable"
55552      fi
55553    else
55554      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55555        CORRECT_MSVCR_ARCH=386
55556      else
55557        CORRECT_MSVCR_ARCH=x86-64
55558      fi
55559    fi
55560    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55562$as_echo "ok" >&6; }
55563      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55564
55565  # Only process if variable expands to non-empty
55566
55567  if test "x$MSVC_DLL" != x; then
55568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55569
55570  # Input might be given as Windows format, start by converting to
55571  # unix format.
55572  path="$MSVC_DLL"
55573  new_path=`$CYGPATH -u "$path"`
55574
55575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55578  # "foo.exe" is OK but "foo" is an error.
55579  #
55580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55581  # It is also a way to make sure we got the proper file name for the real test later on.
55582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55583  if test "x$test_shortpath" = x; then
55584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55585$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55586    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55587  fi
55588
55589  # Call helper function which possibly converts this using DOS-style short mode.
55590  # If so, the updated path is stored in $new_path.
55591
55592  input_path="$new_path"
55593  # Check if we need to convert this using DOS-style short mode. If the path
55594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55595  # take no chances and rewrite it.
55596  # Note: m4 eats our [], so we need to use [ and ] instead.
55597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55598  if test "x$has_forbidden_chars" != x; then
55599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55603      # Going to short mode and back again did indeed matter. Since short mode is
55604      # case insensitive, let's make it lowercase to improve readability.
55605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55606      # Now convert it back to Unix-style (cygpath)
55607      input_path=`$CYGPATH -u "$shortmode_path"`
55608      new_path="$input_path"
55609    fi
55610  fi
55611
55612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55613  if test "x$test_cygdrive_prefix" = x; then
55614    # As a simple fix, exclude /usr/bin since it's not a real path.
55615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55617      # a path prefixed by /cygdrive for fixpath to work.
55618      new_path="$CYGWIN_ROOT_PATH$input_path"
55619    fi
55620  fi
55621
55622
55623  if test "x$path" != "x$new_path"; then
55624    MSVC_DLL="$new_path"
55625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55626$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55627  fi
55628
55629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55630
55631  path="$MSVC_DLL"
55632  has_colon=`$ECHO $path | $GREP ^.:`
55633  new_path="$path"
55634  if test "x$has_colon" = x; then
55635    # Not in mixed or Windows style, start by that.
55636    new_path=`cmd //c echo $path`
55637  fi
55638
55639
55640  input_path="$new_path"
55641  # Check if we need to convert this using DOS-style short mode. If the path
55642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55643  # take no chances and rewrite it.
55644  # Note: m4 eats our [], so we need to use [ and ] instead.
55645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55646  if test "x$has_forbidden_chars" != x; then
55647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55649  fi
55650
55651
55652  windows_path="$new_path"
55653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55654    unix_path=`$CYGPATH -u "$windows_path"`
55655    new_path="$unix_path"
55656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55658    new_path="$unix_path"
55659  fi
55660
55661  if test "x$path" != "x$new_path"; then
55662    MSVC_DLL="$new_path"
55663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55664$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55665  fi
55666
55667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55669
55670    else
55671      # We're on a unix platform. Hooray! :)
55672      path="$MSVC_DLL"
55673      has_space=`$ECHO "$path" | $GREP " "`
55674      if test "x$has_space" != x; then
55675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55676$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55677        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55678      fi
55679
55680      # Use eval to expand a potential ~
55681      eval path="$path"
55682      if test ! -f "$path" && test ! -d "$path"; then
55683        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55684      fi
55685
55686      if test -d "$path"; then
55687        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55688      else
55689        dir="`$DIRNAME "$path"`"
55690        base="`$BASENAME "$path"`"
55691        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55692      fi
55693    fi
55694  fi
55695
55696      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55697$as_echo_n "checking for $DLL_NAME... " >&6; }
55698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55699$as_echo "$MSVC_DLL" >&6; }
55700    else
55701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55702$as_echo "incorrect, ignoring" >&6; }
55703      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55704$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55705    fi
55706  fi
55707
55708    fi
55709  fi
55710
55711  if test "x$MSVC_DLL" = x; then
55712    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55713    # (This was the original behaviour; kept since it might turn something up)
55714    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55715      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55716        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55717	    | $GREP x64 | $HEAD --lines 1`
55718      else
55719        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55720	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55721        if test "x$POSSIBLE_MSVC_DLL" = x; then
55722          # We're grasping at straws now...
55723          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55724	      | $HEAD --lines 1`
55725        fi
55726      fi
55727
55728
55729  DLL_NAME="$DLL_NAME"
55730  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55731  METHOD="search of VCINSTALLDIR"
55732  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55733    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55734$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55735
55736    # Need to check if the found msvcr is correct architecture
55737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55738$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55739    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55741      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55742      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55743      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55744        CORRECT_MSVCR_ARCH="PE32 executable"
55745      else
55746        CORRECT_MSVCR_ARCH="PE32+ executable"
55747      fi
55748    else
55749      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55750        CORRECT_MSVCR_ARCH=386
55751      else
55752        CORRECT_MSVCR_ARCH=x86-64
55753      fi
55754    fi
55755    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55757$as_echo "ok" >&6; }
55758      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55759
55760  # Only process if variable expands to non-empty
55761
55762  if test "x$MSVC_DLL" != x; then
55763    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55764
55765  # Input might be given as Windows format, start by converting to
55766  # unix format.
55767  path="$MSVC_DLL"
55768  new_path=`$CYGPATH -u "$path"`
55769
55770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55773  # "foo.exe" is OK but "foo" is an error.
55774  #
55775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55776  # It is also a way to make sure we got the proper file name for the real test later on.
55777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55778  if test "x$test_shortpath" = x; then
55779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55780$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55781    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55782  fi
55783
55784  # Call helper function which possibly converts this using DOS-style short mode.
55785  # If so, the updated path is stored in $new_path.
55786
55787  input_path="$new_path"
55788  # Check if we need to convert this using DOS-style short mode. If the path
55789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55790  # take no chances and rewrite it.
55791  # Note: m4 eats our [], so we need to use [ and ] instead.
55792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55793  if test "x$has_forbidden_chars" != x; then
55794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55798      # Going to short mode and back again did indeed matter. Since short mode is
55799      # case insensitive, let's make it lowercase to improve readability.
55800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55801      # Now convert it back to Unix-style (cygpath)
55802      input_path=`$CYGPATH -u "$shortmode_path"`
55803      new_path="$input_path"
55804    fi
55805  fi
55806
55807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55808  if test "x$test_cygdrive_prefix" = x; then
55809    # As a simple fix, exclude /usr/bin since it's not a real path.
55810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55812      # a path prefixed by /cygdrive for fixpath to work.
55813      new_path="$CYGWIN_ROOT_PATH$input_path"
55814    fi
55815  fi
55816
55817
55818  if test "x$path" != "x$new_path"; then
55819    MSVC_DLL="$new_path"
55820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55821$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55822  fi
55823
55824    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55825
55826  path="$MSVC_DLL"
55827  has_colon=`$ECHO $path | $GREP ^.:`
55828  new_path="$path"
55829  if test "x$has_colon" = x; then
55830    # Not in mixed or Windows style, start by that.
55831    new_path=`cmd //c echo $path`
55832  fi
55833
55834
55835  input_path="$new_path"
55836  # Check if we need to convert this using DOS-style short mode. If the path
55837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55838  # take no chances and rewrite it.
55839  # Note: m4 eats our [], so we need to use [ and ] instead.
55840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55841  if test "x$has_forbidden_chars" != x; then
55842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55844  fi
55845
55846
55847  windows_path="$new_path"
55848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55849    unix_path=`$CYGPATH -u "$windows_path"`
55850    new_path="$unix_path"
55851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55853    new_path="$unix_path"
55854  fi
55855
55856  if test "x$path" != "x$new_path"; then
55857    MSVC_DLL="$new_path"
55858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55859$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55860  fi
55861
55862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55864
55865    else
55866      # We're on a unix platform. Hooray! :)
55867      path="$MSVC_DLL"
55868      has_space=`$ECHO "$path" | $GREP " "`
55869      if test "x$has_space" != x; then
55870        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55871$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55872        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55873      fi
55874
55875      # Use eval to expand a potential ~
55876      eval path="$path"
55877      if test ! -f "$path" && test ! -d "$path"; then
55878        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55879      fi
55880
55881      if test -d "$path"; then
55882        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55883      else
55884        dir="`$DIRNAME "$path"`"
55885        base="`$BASENAME "$path"`"
55886        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55887      fi
55888    fi
55889  fi
55890
55891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55892$as_echo_n "checking for $DLL_NAME... " >&6; }
55893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55894$as_echo "$MSVC_DLL" >&6; }
55895    else
55896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55897$as_echo "incorrect, ignoring" >&6; }
55898      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55899$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55900    fi
55901  fi
55902
55903    fi
55904  fi
55905
55906  if test "x$MSVC_DLL" = x; then
55907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55908$as_echo_n "checking for $DLL_NAME... " >&6; }
55909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55910$as_echo "no" >&6; }
55911    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55912  fi
55913
55914      MSVCP_DLL="$MSVC_DLL"
55915    fi
55916
55917  fi
55918
55919  fi
55920
55921
55922  if test "x$NEEDS_LIB_X11" = xfalse; then
55923    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55924      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55925$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55926    fi
55927    X_CFLAGS=
55928    X_LIBS=
55929  else
55930
55931    if test "x${with_x}" = xno; then
55932      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55933    fi
55934
55935    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55936      # The user has specified a X11 base directory. Use it for includes and
55937      # libraries, unless explicitely overridden.
55938      if test "x$x_includes" = xNONE; then
55939        x_includes="${with_x}/include"
55940      fi
55941      if test "x$x_libraries" = xNONE; then
55942        x_libraries="${with_x}/lib"
55943      fi
55944    else
55945      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55946      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55947      # --x-libraries for the sysroot, if that seems to be correct.
55948      if test "x$SYSROOT" != "x"; then
55949        if test "x$x_includes" = xNONE; then
55950          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55951            x_includes="$SYSROOT/usr/X11R6/include"
55952          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55953            x_includes="$SYSROOT/usr/include"
55954          fi
55955        fi
55956        if test "x$x_libraries" = xNONE; then
55957          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55958            x_libraries="$SYSROOT/usr/X11R6/lib"
55959          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55960            x_libraries="$SYSROOT/usr/lib64"
55961          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55962            x_libraries="$SYSROOT/usr/lib"
55963          fi
55964        fi
55965      fi
55966    fi
55967
55968    # Now let autoconf do it's magic
55969    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55970$as_echo_n "checking for X... " >&6; }
55971
55972
55973# Check whether --with-x was given.
55974if test "${with_x+set}" = set; then :
55975  withval=$with_x;
55976fi
55977
55978# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55979if test "x$with_x" = xno; then
55980  # The user explicitly disabled X.
55981  have_x=disabled
55982else
55983  case $x_includes,$x_libraries in #(
55984    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55985    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55986  $as_echo_n "(cached) " >&6
55987else
55988  # One or both of the vars are not set, and there is no cached value.
55989ac_x_includes=no ac_x_libraries=no
55990rm -f -r conftest.dir
55991if mkdir conftest.dir; then
55992  cd conftest.dir
55993  cat >Imakefile <<'_ACEOF'
55994incroot:
55995	@echo incroot='${INCROOT}'
55996usrlibdir:
55997	@echo usrlibdir='${USRLIBDIR}'
55998libdir:
55999	@echo libdir='${LIBDIR}'
56000_ACEOF
56001  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56002    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56003    for ac_var in incroot usrlibdir libdir; do
56004      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56005    done
56006    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56007    for ac_extension in a so sl dylib la dll; do
56008      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56009	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56010	ac_im_usrlibdir=$ac_im_libdir; break
56011      fi
56012    done
56013    # Screen out bogus values from the imake configuration.  They are
56014    # bogus both because they are the default anyway, and because
56015    # using them would break gcc on systems where it needs fixed includes.
56016    case $ac_im_incroot in
56017	/usr/include) ac_x_includes= ;;
56018	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56019    esac
56020    case $ac_im_usrlibdir in
56021	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56022	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56023    esac
56024  fi
56025  cd ..
56026  rm -f -r conftest.dir
56027fi
56028
56029# Standard set of common directories for X headers.
56030# Check X11 before X11Rn because it is often a symlink to the current release.
56031ac_x_header_dirs='
56032/usr/X11/include
56033/usr/X11R7/include
56034/usr/X11R6/include
56035/usr/X11R5/include
56036/usr/X11R4/include
56037
56038/usr/include/X11
56039/usr/include/X11R7
56040/usr/include/X11R6
56041/usr/include/X11R5
56042/usr/include/X11R4
56043
56044/usr/local/X11/include
56045/usr/local/X11R7/include
56046/usr/local/X11R6/include
56047/usr/local/X11R5/include
56048/usr/local/X11R4/include
56049
56050/usr/local/include/X11
56051/usr/local/include/X11R7
56052/usr/local/include/X11R6
56053/usr/local/include/X11R5
56054/usr/local/include/X11R4
56055
56056/usr/X386/include
56057/usr/x386/include
56058/usr/XFree86/include/X11
56059
56060/usr/include
56061/usr/local/include
56062/usr/unsupported/include
56063/usr/athena/include
56064/usr/local/x11r5/include
56065/usr/lpp/Xamples/include
56066
56067/usr/openwin/include
56068/usr/openwin/share/include'
56069
56070if test "$ac_x_includes" = no; then
56071  # Guess where to find include files, by looking for Xlib.h.
56072  # First, try using that file with no special directory specified.
56073  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56074/* end confdefs.h.  */
56075#include <X11/Xlib.h>
56076_ACEOF
56077if ac_fn_cxx_try_cpp "$LINENO"; then :
56078  # We can compile using X headers with no special include directory.
56079ac_x_includes=
56080else
56081  for ac_dir in $ac_x_header_dirs; do
56082  if test -r "$ac_dir/X11/Xlib.h"; then
56083    ac_x_includes=$ac_dir
56084    break
56085  fi
56086done
56087fi
56088rm -f conftest.err conftest.i conftest.$ac_ext
56089fi # $ac_x_includes = no
56090
56091if test "$ac_x_libraries" = no; then
56092  # Check for the libraries.
56093  # See if we find them without any special options.
56094  # Don't add to $LIBS permanently.
56095  ac_save_LIBS=$LIBS
56096  LIBS="-lX11 $LIBS"
56097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56098/* end confdefs.h.  */
56099#include <X11/Xlib.h>
56100int
56101main ()
56102{
56103XrmInitialize ()
56104  ;
56105  return 0;
56106}
56107_ACEOF
56108if ac_fn_cxx_try_link "$LINENO"; then :
56109  LIBS=$ac_save_LIBS
56110# We can link X programs with no special library path.
56111ac_x_libraries=
56112else
56113  LIBS=$ac_save_LIBS
56114for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56115do
56116  # Don't even attempt the hair of trying to link an X program!
56117  for ac_extension in a so sl dylib la dll; do
56118    if test -r "$ac_dir/libX11.$ac_extension"; then
56119      ac_x_libraries=$ac_dir
56120      break 2
56121    fi
56122  done
56123done
56124fi
56125rm -f core conftest.err conftest.$ac_objext \
56126    conftest$ac_exeext conftest.$ac_ext
56127fi # $ac_x_libraries = no
56128
56129case $ac_x_includes,$ac_x_libraries in #(
56130  no,* | *,no | *\'*)
56131    # Didn't find X, or a directory has "'" in its name.
56132    ac_cv_have_x="have_x=no";; #(
56133  *)
56134    # Record where we found X for the cache.
56135    ac_cv_have_x="have_x=yes\
56136	ac_x_includes='$ac_x_includes'\
56137	ac_x_libraries='$ac_x_libraries'"
56138esac
56139fi
56140;; #(
56141    *) have_x=yes;;
56142  esac
56143  eval "$ac_cv_have_x"
56144fi # $with_x != no
56145
56146if test "$have_x" != yes; then
56147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56148$as_echo "$have_x" >&6; }
56149  no_x=yes
56150else
56151  # If each of the values was on the command line, it overrides each guess.
56152  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56153  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56154  # Update the cache value to reflect the command line values.
56155  ac_cv_have_x="have_x=yes\
56156	ac_x_includes='$x_includes'\
56157	ac_x_libraries='$x_libraries'"
56158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56159$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56160fi
56161
56162    if test "$no_x" = yes; then
56163  # Not all programs may use this symbol, but it does not hurt to define it.
56164
56165$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56166
56167  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56168else
56169  if test -n "$x_includes"; then
56170    X_CFLAGS="$X_CFLAGS -I$x_includes"
56171  fi
56172
56173  # It would also be nice to do this for all -L options, not just this one.
56174  if test -n "$x_libraries"; then
56175    X_LIBS="$X_LIBS -L$x_libraries"
56176    # For Solaris; some versions of Sun CC require a space after -R and
56177    # others require no space.  Words are not sufficient . . . .
56178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56179$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56180    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56181    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56182    ac_cxx_werror_flag=yes
56183    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56184/* end confdefs.h.  */
56185
56186int
56187main ()
56188{
56189
56190  ;
56191  return 0;
56192}
56193_ACEOF
56194if ac_fn_cxx_try_link "$LINENO"; then :
56195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56196$as_echo "no" >&6; }
56197       X_LIBS="$X_LIBS -R$x_libraries"
56198else
56199  LIBS="$ac_xsave_LIBS -R $x_libraries"
56200       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56201/* end confdefs.h.  */
56202
56203int
56204main ()
56205{
56206
56207  ;
56208  return 0;
56209}
56210_ACEOF
56211if ac_fn_cxx_try_link "$LINENO"; then :
56212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56213$as_echo "yes" >&6; }
56214	  X_LIBS="$X_LIBS -R $x_libraries"
56215else
56216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56217$as_echo "neither works" >&6; }
56218fi
56219rm -f core conftest.err conftest.$ac_objext \
56220    conftest$ac_exeext conftest.$ac_ext
56221fi
56222rm -f core conftest.err conftest.$ac_objext \
56223    conftest$ac_exeext conftest.$ac_ext
56224    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56225    LIBS=$ac_xsave_LIBS
56226  fi
56227
56228  # Check for system-dependent libraries X programs must link with.
56229  # Do this before checking for the system-independent R6 libraries
56230  # (-lICE), since we may need -lsocket or whatever for X linking.
56231
56232  if test "$ISC" = yes; then
56233    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56234  else
56235    # Martyn Johnson says this is needed for Ultrix, if the X
56236    # libraries were built with DECnet support.  And Karl Berry says
56237    # the Alpha needs dnet_stub (dnet does not exist).
56238    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56239    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56240/* end confdefs.h.  */
56241
56242/* Override any GCC internal prototype to avoid an error.
56243   Use char because int might match the return type of a GCC
56244   builtin and then its argument prototype would still apply.  */
56245#ifdef __cplusplus
56246extern "C"
56247#endif
56248char XOpenDisplay ();
56249int
56250main ()
56251{
56252return XOpenDisplay ();
56253  ;
56254  return 0;
56255}
56256_ACEOF
56257if ac_fn_cxx_try_link "$LINENO"; then :
56258
56259else
56260  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56261$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56262if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56263  $as_echo_n "(cached) " >&6
56264else
56265  ac_check_lib_save_LIBS=$LIBS
56266LIBS="-ldnet  $LIBS"
56267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56268/* end confdefs.h.  */
56269
56270/* Override any GCC internal prototype to avoid an error.
56271   Use char because int might match the return type of a GCC
56272   builtin and then its argument prototype would still apply.  */
56273#ifdef __cplusplus
56274extern "C"
56275#endif
56276char dnet_ntoa ();
56277int
56278main ()
56279{
56280return dnet_ntoa ();
56281  ;
56282  return 0;
56283}
56284_ACEOF
56285if ac_fn_cxx_try_link "$LINENO"; then :
56286  ac_cv_lib_dnet_dnet_ntoa=yes
56287else
56288  ac_cv_lib_dnet_dnet_ntoa=no
56289fi
56290rm -f core conftest.err conftest.$ac_objext \
56291    conftest$ac_exeext conftest.$ac_ext
56292LIBS=$ac_check_lib_save_LIBS
56293fi
56294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56295$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56296if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56297  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56298fi
56299
56300    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56301      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56302$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56303if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56304  $as_echo_n "(cached) " >&6
56305else
56306  ac_check_lib_save_LIBS=$LIBS
56307LIBS="-ldnet_stub  $LIBS"
56308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56309/* end confdefs.h.  */
56310
56311/* Override any GCC internal prototype to avoid an error.
56312   Use char because int might match the return type of a GCC
56313   builtin and then its argument prototype would still apply.  */
56314#ifdef __cplusplus
56315extern "C"
56316#endif
56317char dnet_ntoa ();
56318int
56319main ()
56320{
56321return dnet_ntoa ();
56322  ;
56323  return 0;
56324}
56325_ACEOF
56326if ac_fn_cxx_try_link "$LINENO"; then :
56327  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56328else
56329  ac_cv_lib_dnet_stub_dnet_ntoa=no
56330fi
56331rm -f core conftest.err conftest.$ac_objext \
56332    conftest$ac_exeext conftest.$ac_ext
56333LIBS=$ac_check_lib_save_LIBS
56334fi
56335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56336$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56337if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56338  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56339fi
56340
56341    fi
56342fi
56343rm -f core conftest.err conftest.$ac_objext \
56344    conftest$ac_exeext conftest.$ac_ext
56345    LIBS="$ac_xsave_LIBS"
56346
56347    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56348    # to get the SysV transport functions.
56349    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56350    # needs -lnsl.
56351    # The nsl library prevents programs from opening the X display
56352    # on Irix 5.2, according to T.E. Dickey.
56353    # The functions gethostbyname, getservbyname, and inet_addr are
56354    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56355    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56356if test "x$ac_cv_func_gethostbyname" = xyes; then :
56357
56358fi
56359
56360    if test $ac_cv_func_gethostbyname = no; then
56361      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56362$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56363if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56364  $as_echo_n "(cached) " >&6
56365else
56366  ac_check_lib_save_LIBS=$LIBS
56367LIBS="-lnsl  $LIBS"
56368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56369/* end confdefs.h.  */
56370
56371/* Override any GCC internal prototype to avoid an error.
56372   Use char because int might match the return type of a GCC
56373   builtin and then its argument prototype would still apply.  */
56374#ifdef __cplusplus
56375extern "C"
56376#endif
56377char gethostbyname ();
56378int
56379main ()
56380{
56381return gethostbyname ();
56382  ;
56383  return 0;
56384}
56385_ACEOF
56386if ac_fn_cxx_try_link "$LINENO"; then :
56387  ac_cv_lib_nsl_gethostbyname=yes
56388else
56389  ac_cv_lib_nsl_gethostbyname=no
56390fi
56391rm -f core conftest.err conftest.$ac_objext \
56392    conftest$ac_exeext conftest.$ac_ext
56393LIBS=$ac_check_lib_save_LIBS
56394fi
56395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56396$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56397if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56398  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56399fi
56400
56401      if test $ac_cv_lib_nsl_gethostbyname = no; then
56402	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56403$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56404if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56405  $as_echo_n "(cached) " >&6
56406else
56407  ac_check_lib_save_LIBS=$LIBS
56408LIBS="-lbsd  $LIBS"
56409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56410/* end confdefs.h.  */
56411
56412/* Override any GCC internal prototype to avoid an error.
56413   Use char because int might match the return type of a GCC
56414   builtin and then its argument prototype would still apply.  */
56415#ifdef __cplusplus
56416extern "C"
56417#endif
56418char gethostbyname ();
56419int
56420main ()
56421{
56422return gethostbyname ();
56423  ;
56424  return 0;
56425}
56426_ACEOF
56427if ac_fn_cxx_try_link "$LINENO"; then :
56428  ac_cv_lib_bsd_gethostbyname=yes
56429else
56430  ac_cv_lib_bsd_gethostbyname=no
56431fi
56432rm -f core conftest.err conftest.$ac_objext \
56433    conftest$ac_exeext conftest.$ac_ext
56434LIBS=$ac_check_lib_save_LIBS
56435fi
56436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56437$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56438if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56439  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56440fi
56441
56442      fi
56443    fi
56444
56445    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56446    # socket/setsockopt and other routines are undefined under SCO ODT
56447    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56448    # on later versions), says Simon Leinen: it contains gethostby*
56449    # variants that don't use the name server (or something).  -lsocket
56450    # must be given before -lnsl if both are needed.  We assume that
56451    # if connect needs -lnsl, so does gethostbyname.
56452    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56453if test "x$ac_cv_func_connect" = xyes; then :
56454
56455fi
56456
56457    if test $ac_cv_func_connect = no; then
56458      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56459$as_echo_n "checking for connect in -lsocket... " >&6; }
56460if ${ac_cv_lib_socket_connect+:} false; then :
56461  $as_echo_n "(cached) " >&6
56462else
56463  ac_check_lib_save_LIBS=$LIBS
56464LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56466/* end confdefs.h.  */
56467
56468/* Override any GCC internal prototype to avoid an error.
56469   Use char because int might match the return type of a GCC
56470   builtin and then its argument prototype would still apply.  */
56471#ifdef __cplusplus
56472extern "C"
56473#endif
56474char connect ();
56475int
56476main ()
56477{
56478return connect ();
56479  ;
56480  return 0;
56481}
56482_ACEOF
56483if ac_fn_cxx_try_link "$LINENO"; then :
56484  ac_cv_lib_socket_connect=yes
56485else
56486  ac_cv_lib_socket_connect=no
56487fi
56488rm -f core conftest.err conftest.$ac_objext \
56489    conftest$ac_exeext conftest.$ac_ext
56490LIBS=$ac_check_lib_save_LIBS
56491fi
56492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56493$as_echo "$ac_cv_lib_socket_connect" >&6; }
56494if test "x$ac_cv_lib_socket_connect" = xyes; then :
56495  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56496fi
56497
56498    fi
56499
56500    # Guillermo Gomez says -lposix is necessary on A/UX.
56501    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56502if test "x$ac_cv_func_remove" = xyes; then :
56503
56504fi
56505
56506    if test $ac_cv_func_remove = no; then
56507      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56508$as_echo_n "checking for remove in -lposix... " >&6; }
56509if ${ac_cv_lib_posix_remove+:} false; then :
56510  $as_echo_n "(cached) " >&6
56511else
56512  ac_check_lib_save_LIBS=$LIBS
56513LIBS="-lposix  $LIBS"
56514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56515/* end confdefs.h.  */
56516
56517/* Override any GCC internal prototype to avoid an error.
56518   Use char because int might match the return type of a GCC
56519   builtin and then its argument prototype would still apply.  */
56520#ifdef __cplusplus
56521extern "C"
56522#endif
56523char remove ();
56524int
56525main ()
56526{
56527return remove ();
56528  ;
56529  return 0;
56530}
56531_ACEOF
56532if ac_fn_cxx_try_link "$LINENO"; then :
56533  ac_cv_lib_posix_remove=yes
56534else
56535  ac_cv_lib_posix_remove=no
56536fi
56537rm -f core conftest.err conftest.$ac_objext \
56538    conftest$ac_exeext conftest.$ac_ext
56539LIBS=$ac_check_lib_save_LIBS
56540fi
56541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56542$as_echo "$ac_cv_lib_posix_remove" >&6; }
56543if test "x$ac_cv_lib_posix_remove" = xyes; then :
56544  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56545fi
56546
56547    fi
56548
56549    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56550    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56551if test "x$ac_cv_func_shmat" = xyes; then :
56552
56553fi
56554
56555    if test $ac_cv_func_shmat = no; then
56556      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56557$as_echo_n "checking for shmat in -lipc... " >&6; }
56558if ${ac_cv_lib_ipc_shmat+:} false; then :
56559  $as_echo_n "(cached) " >&6
56560else
56561  ac_check_lib_save_LIBS=$LIBS
56562LIBS="-lipc  $LIBS"
56563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56564/* end confdefs.h.  */
56565
56566/* Override any GCC internal prototype to avoid an error.
56567   Use char because int might match the return type of a GCC
56568   builtin and then its argument prototype would still apply.  */
56569#ifdef __cplusplus
56570extern "C"
56571#endif
56572char shmat ();
56573int
56574main ()
56575{
56576return shmat ();
56577  ;
56578  return 0;
56579}
56580_ACEOF
56581if ac_fn_cxx_try_link "$LINENO"; then :
56582  ac_cv_lib_ipc_shmat=yes
56583else
56584  ac_cv_lib_ipc_shmat=no
56585fi
56586rm -f core conftest.err conftest.$ac_objext \
56587    conftest$ac_exeext conftest.$ac_ext
56588LIBS=$ac_check_lib_save_LIBS
56589fi
56590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56591$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56592if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56593  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56594fi
56595
56596    fi
56597  fi
56598
56599  # Check for libraries that X11R6 Xt/Xaw programs need.
56600  ac_save_LDFLAGS=$LDFLAGS
56601  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56602  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56603  # check for ICE first), but we must link in the order -lSM -lICE or
56604  # we get undefined symbols.  So assume we have SM if we have ICE.
56605  # These have to be linked with before -lX11, unlike the other
56606  # libraries we check for below, so use a different variable.
56607  # John Interrante, Karl Berry
56608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56609$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56610if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56611  $as_echo_n "(cached) " >&6
56612else
56613  ac_check_lib_save_LIBS=$LIBS
56614LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56616/* end confdefs.h.  */
56617
56618/* Override any GCC internal prototype to avoid an error.
56619   Use char because int might match the return type of a GCC
56620   builtin and then its argument prototype would still apply.  */
56621#ifdef __cplusplus
56622extern "C"
56623#endif
56624char IceConnectionNumber ();
56625int
56626main ()
56627{
56628return IceConnectionNumber ();
56629  ;
56630  return 0;
56631}
56632_ACEOF
56633if ac_fn_cxx_try_link "$LINENO"; then :
56634  ac_cv_lib_ICE_IceConnectionNumber=yes
56635else
56636  ac_cv_lib_ICE_IceConnectionNumber=no
56637fi
56638rm -f core conftest.err conftest.$ac_objext \
56639    conftest$ac_exeext conftest.$ac_ext
56640LIBS=$ac_check_lib_save_LIBS
56641fi
56642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56643$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56644if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56645  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56646fi
56647
56648  LDFLAGS=$ac_save_LDFLAGS
56649
56650fi
56651
56652
56653    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56654    # this doesn't make sense so we remove it.
56655    if test "x$COMPILE_TYPE" = xcross; then
56656      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56657    fi
56658
56659    if test "x$no_x" = xyes; then
56660
56661  # Print a helpful message on how to acquire the necessary build dependency.
56662  # x11 is the help tag: freetype, cups, alsa etc
56663  MISSING_DEPENDENCY=x11
56664
56665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56666    cygwin_help $MISSING_DEPENDENCY
56667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56668    msys_help $MISSING_DEPENDENCY
56669  else
56670    PKGHANDLER_COMMAND=
56671
56672    case $PKGHANDLER in
56673      apt-get)
56674        apt_help     $MISSING_DEPENDENCY ;;
56675      yum)
56676        yum_help     $MISSING_DEPENDENCY ;;
56677      port)
56678        port_help    $MISSING_DEPENDENCY ;;
56679      pkgutil)
56680        pkgutil_help $MISSING_DEPENDENCY ;;
56681      pkgadd)
56682        pkgadd_help  $MISSING_DEPENDENCY ;;
56683    esac
56684
56685    if test "x$PKGHANDLER_COMMAND" != x; then
56686      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56687    fi
56688  fi
56689
56690      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56691    fi
56692
56693    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56694      OPENWIN_HOME="/usr/openwin"
56695      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56696      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56697          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56698          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56699          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56700    fi
56701
56702    ac_ext=c
56703ac_cpp='$CPP $CPPFLAGS'
56704ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56705ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56706ac_compiler_gnu=$ac_cv_c_compiler_gnu
56707
56708    OLD_CFLAGS="$CFLAGS"
56709    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56710
56711    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56712    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56713do :
56714  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56715ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56716          # include <X11/Xlib.h>
56717          # include <X11/Xutil.h>
56718
56719
56720"
56721if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56722  cat >>confdefs.h <<_ACEOF
56723#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56724_ACEOF
56725 X11_HEADERS_OK=yes
56726else
56727  X11_HEADERS_OK=no; break
56728fi
56729
56730done
56731
56732
56733    if test "x$X11_HEADERS_OK" = xno; then
56734
56735  # Print a helpful message on how to acquire the necessary build dependency.
56736  # x11 is the help tag: freetype, cups, alsa etc
56737  MISSING_DEPENDENCY=x11
56738
56739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56740    cygwin_help $MISSING_DEPENDENCY
56741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56742    msys_help $MISSING_DEPENDENCY
56743  else
56744    PKGHANDLER_COMMAND=
56745
56746    case $PKGHANDLER in
56747      apt-get)
56748        apt_help     $MISSING_DEPENDENCY ;;
56749      yum)
56750        yum_help     $MISSING_DEPENDENCY ;;
56751      port)
56752        port_help    $MISSING_DEPENDENCY ;;
56753      pkgutil)
56754        pkgutil_help $MISSING_DEPENDENCY ;;
56755      pkgadd)
56756        pkgadd_help  $MISSING_DEPENDENCY ;;
56757    esac
56758
56759    if test "x$PKGHANDLER_COMMAND" != x; then
56760      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56761    fi
56762  fi
56763
56764      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56765    fi
56766
56767    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56768    # defined in libawt_xawt.
56769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56770$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56771    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56772/* end confdefs.h.  */
56773#include <X11/extensions/Xrender.h>
56774int
56775main ()
56776{
56777XLinearGradient x;
56778  ;
56779  return 0;
56780}
56781_ACEOF
56782if ac_fn_c_try_compile "$LINENO"; then :
56783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56784$as_echo "yes" >&6; }
56785else
56786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56787$as_echo "no" >&6; }
56788         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56789fi
56790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56791
56792    CFLAGS="$OLD_CFLAGS"
56793    ac_ext=cpp
56794ac_cpp='$CXXCPP $CPPFLAGS'
56795ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56796ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56797ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56798
56799  fi # NEEDS_LIB_X11
56800
56801
56802
56803
56804
56805
56806# Check whether --with-cups was given.
56807if test "${with_cups+set}" = set; then :
56808  withval=$with_cups;
56809fi
56810
56811
56812# Check whether --with-cups-include was given.
56813if test "${with_cups_include+set}" = set; then :
56814  withval=$with_cups_include;
56815fi
56816
56817
56818  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56819    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56820        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56821      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56822$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56823    fi
56824    CUPS_CFLAGS=
56825  else
56826    CUPS_FOUND=no
56827
56828    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56829      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56830    fi
56831
56832    if test "x${with_cups}" != x; then
56833      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56834$as_echo_n "checking for cups headers... " >&6; }
56835      if test -s "${with_cups}/include/cups/cups.h"; then
56836        CUPS_CFLAGS="-I${with_cups}/include"
56837        CUPS_FOUND=yes
56838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56839$as_echo "$CUPS_FOUND" >&6; }
56840      else
56841        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56842      fi
56843    fi
56844    if test "x${with_cups_include}" != x; then
56845      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56846$as_echo_n "checking for cups headers... " >&6; }
56847      if test -s "${with_cups_include}/cups/cups.h"; then
56848        CUPS_CFLAGS="-I${with_cups_include}"
56849        CUPS_FOUND=yes
56850        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56851$as_echo "$CUPS_FOUND" >&6; }
56852      else
56853        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56854      fi
56855    fi
56856    if test "x$CUPS_FOUND" = xno; then
56857      # Are the cups headers installed in the default /usr/include location?
56858      for ac_header in cups/cups.h cups/ppd.h
56859do :
56860  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56861ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56862if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56863  cat >>confdefs.h <<_ACEOF
56864#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56865_ACEOF
56866
56867          CUPS_FOUND=yes
56868          CUPS_CFLAGS=
56869          DEFAULT_CUPS=yes
56870
56871fi
56872
56873done
56874
56875    fi
56876    if test "x$CUPS_FOUND" = xno; then
56877      # Getting nervous now? Lets poke around for standard Solaris third-party
56878      # package installation locations.
56879      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56880$as_echo_n "checking for cups headers... " >&6; }
56881      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56882        # An SFW package seems to be installed!
56883        CUPS_FOUND=yes
56884        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56885      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56886        # A CSW package seems to be installed!
56887        CUPS_FOUND=yes
56888        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56889      fi
56890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56891$as_echo "$CUPS_FOUND" >&6; }
56892    fi
56893    if test "x$CUPS_FOUND" = xno; then
56894
56895  # Print a helpful message on how to acquire the necessary build dependency.
56896  # cups is the help tag: freetype, cups, alsa etc
56897  MISSING_DEPENDENCY=cups
56898
56899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56900    cygwin_help $MISSING_DEPENDENCY
56901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56902    msys_help $MISSING_DEPENDENCY
56903  else
56904    PKGHANDLER_COMMAND=
56905
56906    case $PKGHANDLER in
56907      apt-get)
56908        apt_help     $MISSING_DEPENDENCY ;;
56909      yum)
56910        yum_help     $MISSING_DEPENDENCY ;;
56911      port)
56912        port_help    $MISSING_DEPENDENCY ;;
56913      pkgutil)
56914        pkgutil_help $MISSING_DEPENDENCY ;;
56915      pkgadd)
56916        pkgadd_help  $MISSING_DEPENDENCY ;;
56917    esac
56918
56919    if test "x$PKGHANDLER_COMMAND" != x; then
56920      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56921    fi
56922  fi
56923
56924      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56925    fi
56926  fi
56927
56928
56929
56930
56931
56932# Check whether --with-freetype was given.
56933if test "${with_freetype+set}" = set; then :
56934  withval=$with_freetype;
56935fi
56936
56937
56938# Check whether --with-freetype-include was given.
56939if test "${with_freetype_include+set}" = set; then :
56940  withval=$with_freetype_include;
56941fi
56942
56943
56944# Check whether --with-freetype-lib was given.
56945if test "${with_freetype_lib+set}" = set; then :
56946  withval=$with_freetype_lib;
56947fi
56948
56949
56950# Check whether --with-freetype-src was given.
56951if test "${with_freetype_src+set}" = set; then :
56952  withval=$with_freetype_src;
56953fi
56954
56955  # Check whether --enable-freetype-bundling was given.
56956if test "${enable_freetype_bundling+set}" = set; then :
56957  enableval=$enable_freetype_bundling;
56958fi
56959
56960
56961  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56962  FREETYPE_BASE_NAME=freetype
56963  FREETYPE_CFLAGS=
56964  FREETYPE_LIBS=
56965  FREETYPE_BUNDLE_LIB_PATH=
56966
56967  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56968    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56969        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56970        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56971        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56972      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56973$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56974    fi
56975    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56976      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56977$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56978    fi
56979  else
56980    # freetype is needed to build; go get it!
56981
56982    BUNDLE_FREETYPE="$enable_freetype_bundling"
56983
56984    if  test "x$with_freetype_src" != x; then
56985      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56986        # Try to build freetype if --with-freetype-src was given on Windows
56987
56988  FREETYPE_SRC_PATH="$with_freetype_src"
56989  BUILD_FREETYPE=yes
56990
56991  # Check if the freetype sources are acessible..
56992  if ! test -d $FREETYPE_SRC_PATH; then
56993    { $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
56994$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56995    BUILD_FREETYPE=no
56996  fi
56997  # ..and contain a vc2010 project file
56998  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56999  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57000    { $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
57001$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57002    BUILD_FREETYPE=no
57003  fi
57004  # Now check if configure found a version of 'msbuild.exe'
57005  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57006    { $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
57007$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;}
57008    BUILD_FREETYPE=no
57009  fi
57010
57011  # Ready to go..
57012  if test "x$BUILD_FREETYPE" = xyes; then
57013    # msbuild requires trailing slashes for output directories
57014    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57015    freetype_lib_path_unix="$freetype_lib_path"
57016    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57017
57018  unix_path="$vcxproj_path"
57019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57020    windows_path=`$CYGPATH -m "$unix_path"`
57021    vcxproj_path="$windows_path"
57022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57023    windows_path=`cmd //c echo $unix_path`
57024    vcxproj_path="$windows_path"
57025  fi
57026
57027
57028  unix_path="$freetype_lib_path"
57029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57030    windows_path=`$CYGPATH -m "$unix_path"`
57031    freetype_lib_path="$windows_path"
57032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57033    windows_path=`cmd //c echo $unix_path`
57034    freetype_lib_path="$windows_path"
57035  fi
57036
57037
57038  unix_path="$freetype_obj_path"
57039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57040    windows_path=`$CYGPATH -m "$unix_path"`
57041    freetype_obj_path="$windows_path"
57042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57043    windows_path=`cmd //c echo $unix_path`
57044    freetype_obj_path="$windows_path"
57045  fi
57046
57047    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57048      freetype_platform=x64
57049    else
57050      freetype_platform=win32
57051    fi
57052
57053    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57054    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57055    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57056    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57057    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57058$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57059
57060    # First we try to build the freetype.dll
57061    $ECHO -e "@echo off\n"\
57062        "$MSBUILD $vcxproj_path "\
57063        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57064        "/p:Configuration=\"Release Multithreaded\" "\
57065        "/p:Platform=$freetype_platform "\
57066        "/p:ConfigurationType=DynamicLibrary "\
57067        "/p:TargetName=freetype "\
57068        "/p:OutDir=\"$freetype_lib_path\" "\
57069        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57070    cmd /c freetype.bat
57071
57072    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57073      # If that succeeds we also build freetype.lib
57074      $ECHO -e "@echo off\n"\
57075          "$MSBUILD $vcxproj_path "\
57076          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57077          "/p:Configuration=\"Release Multithreaded\" "\
57078          "/p:Platform=$freetype_platform "\
57079          "/p:ConfigurationType=StaticLibrary "\
57080          "/p:TargetName=freetype "\
57081          "/p:OutDir=\"$freetype_lib_path\" "\
57082          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57083      cmd /c freetype.bat
57084
57085      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57086        # Once we build both, lib and dll, set freetype lib and include path appropriately
57087        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57088        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57089        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57090$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57091      else
57092        BUILD_FREETYPE=no
57093      fi
57094    else
57095      BUILD_FREETYPE=no
57096    fi
57097  fi
57098
57099        if test "x$BUILD_FREETYPE" = xyes; then
57100          # Okay, we built it. Check that it works.
57101
57102  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57103  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57104  METHOD="--with-freetype-src"
57105
57106  # Let's start with an optimistic view of the world :-)
57107  FOUND_FREETYPE=yes
57108
57109  # First look for the canonical freetype main include file ft2build.h.
57110  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57111    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57112    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57113    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57114      # Fail.
57115      FOUND_FREETYPE=no
57116    fi
57117  fi
57118
57119  if test "x$FOUND_FREETYPE" = xyes; then
57120    # Include file found, let's continue the sanity check.
57121    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57122$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57123
57124    # Reset to default value
57125    FREETYPE_BASE_NAME=freetype
57126    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57127    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57128      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57129          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57130        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57131        # for the .6 version explicitly.
57132        FREETYPE_BASE_NAME=freetype.6
57133        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57134        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57135$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57136      else
57137        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57138$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57139        FOUND_FREETYPE=no
57140      fi
57141    else
57142      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57143        # On Windows, we will need both .lib and .dll file.
57144        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57145          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57146$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57147          FOUND_FREETYPE=no
57148        fi
57149      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57150          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57151        # Found lib in isa dir, use that instead.
57152        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57153        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57154$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57155      fi
57156    fi
57157  fi
57158
57159  if test "x$FOUND_FREETYPE" = xyes; then
57160
57161  # Only process if variable expands to non-empty
57162
57163  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57165
57166  # Input might be given as Windows format, start by converting to
57167  # unix format.
57168  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57169  new_path=`$CYGPATH -u "$path"`
57170
57171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57174  # "foo.exe" is OK but "foo" is an error.
57175  #
57176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57177  # It is also a way to make sure we got the proper file name for the real test later on.
57178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57179  if test "x$test_shortpath" = x; then
57180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57181$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57182    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57183  fi
57184
57185  # Call helper function which possibly converts this using DOS-style short mode.
57186  # If so, the updated path is stored in $new_path.
57187
57188  input_path="$new_path"
57189  # Check if we need to convert this using DOS-style short mode. If the path
57190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57191  # take no chances and rewrite it.
57192  # Note: m4 eats our [], so we need to use [ and ] instead.
57193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57194  if test "x$has_forbidden_chars" != x; then
57195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57199      # Going to short mode and back again did indeed matter. Since short mode is
57200      # case insensitive, let's make it lowercase to improve readability.
57201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57202      # Now convert it back to Unix-style (cygpath)
57203      input_path=`$CYGPATH -u "$shortmode_path"`
57204      new_path="$input_path"
57205    fi
57206  fi
57207
57208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57209  if test "x$test_cygdrive_prefix" = x; then
57210    # As a simple fix, exclude /usr/bin since it's not a real path.
57211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57213      # a path prefixed by /cygdrive for fixpath to work.
57214      new_path="$CYGWIN_ROOT_PATH$input_path"
57215    fi
57216  fi
57217
57218
57219  if test "x$path" != "x$new_path"; then
57220    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57222$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57223  fi
57224
57225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57226
57227  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57228  has_colon=`$ECHO $path | $GREP ^.:`
57229  new_path="$path"
57230  if test "x$has_colon" = x; then
57231    # Not in mixed or Windows style, start by that.
57232    new_path=`cmd //c echo $path`
57233  fi
57234
57235
57236  input_path="$new_path"
57237  # Check if we need to convert this using DOS-style short mode. If the path
57238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57239  # take no chances and rewrite it.
57240  # Note: m4 eats our [], so we need to use [ and ] instead.
57241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57242  if test "x$has_forbidden_chars" != x; then
57243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57245  fi
57246
57247
57248  windows_path="$new_path"
57249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57250    unix_path=`$CYGPATH -u "$windows_path"`
57251    new_path="$unix_path"
57252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57254    new_path="$unix_path"
57255  fi
57256
57257  if test "x$path" != "x$new_path"; then
57258    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57260$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57261  fi
57262
57263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57265
57266    else
57267      # We're on a unix platform. Hooray! :)
57268      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57269      has_space=`$ECHO "$path" | $GREP " "`
57270      if test "x$has_space" != x; then
57271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57272$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57274      fi
57275
57276      # Use eval to expand a potential ~
57277      eval path="$path"
57278      if test ! -f "$path" && test ! -d "$path"; then
57279        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57280      fi
57281
57282      if test -d "$path"; then
57283        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57284      else
57285        dir="`$DIRNAME "$path"`"
57286        base="`$BASENAME "$path"`"
57287        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57288      fi
57289    fi
57290  fi
57291
57292
57293  # Only process if variable expands to non-empty
57294
57295  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57297
57298  # Input might be given as Windows format, start by converting to
57299  # unix format.
57300  path="$POTENTIAL_FREETYPE_LIB_PATH"
57301  new_path=`$CYGPATH -u "$path"`
57302
57303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57306  # "foo.exe" is OK but "foo" is an error.
57307  #
57308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57309  # It is also a way to make sure we got the proper file name for the real test later on.
57310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57311  if test "x$test_shortpath" = x; then
57312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57313$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57314    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57315  fi
57316
57317  # Call helper function which possibly converts this using DOS-style short mode.
57318  # If so, the updated path is stored in $new_path.
57319
57320  input_path="$new_path"
57321  # Check if we need to convert this using DOS-style short mode. If the path
57322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57323  # take no chances and rewrite it.
57324  # Note: m4 eats our [], so we need to use [ and ] instead.
57325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57326  if test "x$has_forbidden_chars" != x; then
57327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57331      # Going to short mode and back again did indeed matter. Since short mode is
57332      # case insensitive, let's make it lowercase to improve readability.
57333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57334      # Now convert it back to Unix-style (cygpath)
57335      input_path=`$CYGPATH -u "$shortmode_path"`
57336      new_path="$input_path"
57337    fi
57338  fi
57339
57340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57341  if test "x$test_cygdrive_prefix" = x; then
57342    # As a simple fix, exclude /usr/bin since it's not a real path.
57343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57345      # a path prefixed by /cygdrive for fixpath to work.
57346      new_path="$CYGWIN_ROOT_PATH$input_path"
57347    fi
57348  fi
57349
57350
57351  if test "x$path" != "x$new_path"; then
57352    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57354$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57355  fi
57356
57357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57358
57359  path="$POTENTIAL_FREETYPE_LIB_PATH"
57360  has_colon=`$ECHO $path | $GREP ^.:`
57361  new_path="$path"
57362  if test "x$has_colon" = x; then
57363    # Not in mixed or Windows style, start by that.
57364    new_path=`cmd //c echo $path`
57365  fi
57366
57367
57368  input_path="$new_path"
57369  # Check if we need to convert this using DOS-style short mode. If the path
57370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57371  # take no chances and rewrite it.
57372  # Note: m4 eats our [], so we need to use [ and ] instead.
57373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57374  if test "x$has_forbidden_chars" != x; then
57375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57377  fi
57378
57379
57380  windows_path="$new_path"
57381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57382    unix_path=`$CYGPATH -u "$windows_path"`
57383    new_path="$unix_path"
57384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57386    new_path="$unix_path"
57387  fi
57388
57389  if test "x$path" != "x$new_path"; then
57390    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57392$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57393  fi
57394
57395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57397
57398    else
57399      # We're on a unix platform. Hooray! :)
57400      path="$POTENTIAL_FREETYPE_LIB_PATH"
57401      has_space=`$ECHO "$path" | $GREP " "`
57402      if test "x$has_space" != x; then
57403        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57404$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57405        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57406      fi
57407
57408      # Use eval to expand a potential ~
57409      eval path="$path"
57410      if test ! -f "$path" && test ! -d "$path"; then
57411        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57412      fi
57413
57414      if test -d "$path"; then
57415        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57416      else
57417        dir="`$DIRNAME "$path"`"
57418        base="`$BASENAME "$path"`"
57419        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57420      fi
57421    fi
57422  fi
57423
57424
57425    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57427$as_echo_n "checking for freetype includes... " >&6; }
57428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57429$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57430    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57432$as_echo_n "checking for freetype libraries... " >&6; }
57433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57434$as_echo "$FREETYPE_LIB_PATH" >&6; }
57435  fi
57436
57437          if test "x$FOUND_FREETYPE" != xyes; then
57438            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57439          fi
57440        else
57441          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57442$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57443          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57444        fi
57445      else
57446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57447$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57448      fi
57449    fi
57450
57451    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57452      # User has specified settings
57453
57454      if test "x$BUNDLE_FREETYPE" = x; then
57455        # If not specified, default is to bundle freetype
57456        BUNDLE_FREETYPE=yes
57457      fi
57458
57459      if test "x$with_freetype" != x; then
57460        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57461        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57462      fi
57463
57464      # Allow --with-freetype-lib and --with-freetype-include to override
57465      if test "x$with_freetype_include" != x; then
57466        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57467      fi
57468      if test "x$with_freetype_lib" != x; then
57469        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57470      fi
57471
57472      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57473        # Okay, we got it. Check that it works.
57474
57475  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57476  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57477  METHOD="--with-freetype"
57478
57479  # Let's start with an optimistic view of the world :-)
57480  FOUND_FREETYPE=yes
57481
57482  # First look for the canonical freetype main include file ft2build.h.
57483  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57484    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57485    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57486    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57487      # Fail.
57488      FOUND_FREETYPE=no
57489    fi
57490  fi
57491
57492  if test "x$FOUND_FREETYPE" = xyes; then
57493    # Include file found, let's continue the sanity check.
57494    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57495$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57496
57497    # Reset to default value
57498    FREETYPE_BASE_NAME=freetype
57499    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57500    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57501      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57502          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57503        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57504        # for the .6 version explicitly.
57505        FREETYPE_BASE_NAME=freetype.6
57506        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57507        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57508$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57509      else
57510        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57511$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57512        FOUND_FREETYPE=no
57513      fi
57514    else
57515      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57516        # On Windows, we will need both .lib and .dll file.
57517        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57518          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57519$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57520          FOUND_FREETYPE=no
57521        fi
57522      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57523          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57524        # Found lib in isa dir, use that instead.
57525        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57526        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57527$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57528      fi
57529    fi
57530  fi
57531
57532  if test "x$FOUND_FREETYPE" = xyes; then
57533
57534  # Only process if variable expands to non-empty
57535
57536  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57538
57539  # Input might be given as Windows format, start by converting to
57540  # unix format.
57541  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57542  new_path=`$CYGPATH -u "$path"`
57543
57544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57547  # "foo.exe" is OK but "foo" is an error.
57548  #
57549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57550  # It is also a way to make sure we got the proper file name for the real test later on.
57551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57552  if test "x$test_shortpath" = x; then
57553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57554$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57555    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57556  fi
57557
57558  # Call helper function which possibly converts this using DOS-style short mode.
57559  # If so, the updated path is stored in $new_path.
57560
57561  input_path="$new_path"
57562  # Check if we need to convert this using DOS-style short mode. If the path
57563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57564  # take no chances and rewrite it.
57565  # Note: m4 eats our [], so we need to use [ and ] instead.
57566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57567  if test "x$has_forbidden_chars" != x; then
57568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57572      # Going to short mode and back again did indeed matter. Since short mode is
57573      # case insensitive, let's make it lowercase to improve readability.
57574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57575      # Now convert it back to Unix-style (cygpath)
57576      input_path=`$CYGPATH -u "$shortmode_path"`
57577      new_path="$input_path"
57578    fi
57579  fi
57580
57581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57582  if test "x$test_cygdrive_prefix" = x; then
57583    # As a simple fix, exclude /usr/bin since it's not a real path.
57584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57586      # a path prefixed by /cygdrive for fixpath to work.
57587      new_path="$CYGWIN_ROOT_PATH$input_path"
57588    fi
57589  fi
57590
57591
57592  if test "x$path" != "x$new_path"; then
57593    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57595$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57596  fi
57597
57598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57599
57600  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57601  has_colon=`$ECHO $path | $GREP ^.:`
57602  new_path="$path"
57603  if test "x$has_colon" = x; then
57604    # Not in mixed or Windows style, start by that.
57605    new_path=`cmd //c echo $path`
57606  fi
57607
57608
57609  input_path="$new_path"
57610  # Check if we need to convert this using DOS-style short mode. If the path
57611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57612  # take no chances and rewrite it.
57613  # Note: m4 eats our [], so we need to use [ and ] instead.
57614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57615  if test "x$has_forbidden_chars" != x; then
57616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57618  fi
57619
57620
57621  windows_path="$new_path"
57622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57623    unix_path=`$CYGPATH -u "$windows_path"`
57624    new_path="$unix_path"
57625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57627    new_path="$unix_path"
57628  fi
57629
57630  if test "x$path" != "x$new_path"; then
57631    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57633$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57634  fi
57635
57636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57638
57639    else
57640      # We're on a unix platform. Hooray! :)
57641      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57642      has_space=`$ECHO "$path" | $GREP " "`
57643      if test "x$has_space" != x; then
57644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57645$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57647      fi
57648
57649      # Use eval to expand a potential ~
57650      eval path="$path"
57651      if test ! -f "$path" && test ! -d "$path"; then
57652        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57653      fi
57654
57655      if test -d "$path"; then
57656        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57657      else
57658        dir="`$DIRNAME "$path"`"
57659        base="`$BASENAME "$path"`"
57660        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57661      fi
57662    fi
57663  fi
57664
57665
57666  # Only process if variable expands to non-empty
57667
57668  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57669    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57670
57671  # Input might be given as Windows format, start by converting to
57672  # unix format.
57673  path="$POTENTIAL_FREETYPE_LIB_PATH"
57674  new_path=`$CYGPATH -u "$path"`
57675
57676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57679  # "foo.exe" is OK but "foo" is an error.
57680  #
57681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57682  # It is also a way to make sure we got the proper file name for the real test later on.
57683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57684  if test "x$test_shortpath" = x; then
57685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57686$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57687    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57688  fi
57689
57690  # Call helper function which possibly converts this using DOS-style short mode.
57691  # If so, the updated path is stored in $new_path.
57692
57693  input_path="$new_path"
57694  # Check if we need to convert this using DOS-style short mode. If the path
57695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57696  # take no chances and rewrite it.
57697  # Note: m4 eats our [], so we need to use [ and ] instead.
57698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57699  if test "x$has_forbidden_chars" != x; then
57700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57704      # Going to short mode and back again did indeed matter. Since short mode is
57705      # case insensitive, let's make it lowercase to improve readability.
57706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57707      # Now convert it back to Unix-style (cygpath)
57708      input_path=`$CYGPATH -u "$shortmode_path"`
57709      new_path="$input_path"
57710    fi
57711  fi
57712
57713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57714  if test "x$test_cygdrive_prefix" = x; then
57715    # As a simple fix, exclude /usr/bin since it's not a real path.
57716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57718      # a path prefixed by /cygdrive for fixpath to work.
57719      new_path="$CYGWIN_ROOT_PATH$input_path"
57720    fi
57721  fi
57722
57723
57724  if test "x$path" != "x$new_path"; then
57725    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57727$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57728  fi
57729
57730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57731
57732  path="$POTENTIAL_FREETYPE_LIB_PATH"
57733  has_colon=`$ECHO $path | $GREP ^.:`
57734  new_path="$path"
57735  if test "x$has_colon" = x; then
57736    # Not in mixed or Windows style, start by that.
57737    new_path=`cmd //c echo $path`
57738  fi
57739
57740
57741  input_path="$new_path"
57742  # Check if we need to convert this using DOS-style short mode. If the path
57743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57744  # take no chances and rewrite it.
57745  # Note: m4 eats our [], so we need to use [ and ] instead.
57746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57747  if test "x$has_forbidden_chars" != x; then
57748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57750  fi
57751
57752
57753  windows_path="$new_path"
57754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57755    unix_path=`$CYGPATH -u "$windows_path"`
57756    new_path="$unix_path"
57757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57759    new_path="$unix_path"
57760  fi
57761
57762  if test "x$path" != "x$new_path"; then
57763    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57765$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57766  fi
57767
57768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57770
57771    else
57772      # We're on a unix platform. Hooray! :)
57773      path="$POTENTIAL_FREETYPE_LIB_PATH"
57774      has_space=`$ECHO "$path" | $GREP " "`
57775      if test "x$has_space" != x; then
57776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57777$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57778        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57779      fi
57780
57781      # Use eval to expand a potential ~
57782      eval path="$path"
57783      if test ! -f "$path" && test ! -d "$path"; then
57784        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57785      fi
57786
57787      if test -d "$path"; then
57788        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57789      else
57790        dir="`$DIRNAME "$path"`"
57791        base="`$BASENAME "$path"`"
57792        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57793      fi
57794    fi
57795  fi
57796
57797
57798    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57800$as_echo_n "checking for freetype includes... " >&6; }
57801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57802$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57803    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57804    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57805$as_echo_n "checking for freetype libraries... " >&6; }
57806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57807$as_echo "$FREETYPE_LIB_PATH" >&6; }
57808  fi
57809
57810        if test "x$FOUND_FREETYPE" != xyes; then
57811          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57812        fi
57813      else
57814        # User specified only one of lib or include. This is an error.
57815        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57816          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57817$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57818          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57819        else
57820          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57821$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57822          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57823        fi
57824      fi
57825    else
57826      # User did not specify settings, but we need freetype. Try to locate it.
57827
57828      if test "x$BUNDLE_FREETYPE" = x; then
57829        # If not specified, default is to bundle freetype only on windows
57830        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57831          BUNDLE_FREETYPE=yes
57832        else
57833          BUNDLE_FREETYPE=no
57834        fi
57835      fi
57836
57837      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57838      if test "x$SYSROOT" = x; then
57839        if test "x$FOUND_FREETYPE" != xyes; then
57840          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57841          if test "x$PKG_CONFIG" != x; then
57842
57843pkg_failed=no
57844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57845$as_echo_n "checking for FREETYPE... " >&6; }
57846
57847if test -n "$FREETYPE_CFLAGS"; then
57848    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57849 elif test -n "$PKG_CONFIG"; then
57850    if test -n "$PKG_CONFIG" && \
57851    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57852  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57853  ac_status=$?
57854  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57855  test $ac_status = 0; }; then
57856  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57857else
57858  pkg_failed=yes
57859fi
57860 else
57861    pkg_failed=untried
57862fi
57863if test -n "$FREETYPE_LIBS"; then
57864    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57865 elif test -n "$PKG_CONFIG"; then
57866    if test -n "$PKG_CONFIG" && \
57867    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57868  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57869  ac_status=$?
57870  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57871  test $ac_status = 0; }; then
57872  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57873else
57874  pkg_failed=yes
57875fi
57876 else
57877    pkg_failed=untried
57878fi
57879
57880
57881
57882if test $pkg_failed = yes; then
57883
57884if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57885        _pkg_short_errors_supported=yes
57886else
57887        _pkg_short_errors_supported=no
57888fi
57889        if test $_pkg_short_errors_supported = yes; then
57890	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57891        else
57892	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57893        fi
57894	# Put the nasty error message in config.log where it belongs
57895	echo "$FREETYPE_PKG_ERRORS" >&5
57896
57897	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57898$as_echo "no" >&6; }
57899                FOUND_FREETYPE=no
57900elif test $pkg_failed = untried; then
57901	FOUND_FREETYPE=no
57902else
57903	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57904	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57906$as_echo "yes" >&6; }
57907	FOUND_FREETYPE=yes
57908fi
57909            if test "x$FOUND_FREETYPE" = xyes; then
57910              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57911              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57912              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57913              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57914                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57915              fi
57916              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57917              if test "x$BUNDLE_FREETYPE" = xyes; then
57918                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57919$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57920                FOUND_FREETYPE=no
57921              else
57922                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57923$as_echo_n "checking for freetype... " >&6; }
57924                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57925$as_echo "yes (using pkg-config)" >&6; }
57926              fi
57927            fi
57928          fi
57929        fi
57930      fi
57931
57932      if test "x$FOUND_FREETYPE" != xyes; then
57933        # Check in well-known locations
57934        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57935          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57936
57937  windows_path="$FREETYPE_BASE_DIR"
57938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57939    unix_path=`$CYGPATH -u "$windows_path"`
57940    FREETYPE_BASE_DIR="$unix_path"
57941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57943    FREETYPE_BASE_DIR="$unix_path"
57944  fi
57945
57946
57947  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57948  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57949  METHOD="well-known location"
57950
57951  # Let's start with an optimistic view of the world :-)
57952  FOUND_FREETYPE=yes
57953
57954  # First look for the canonical freetype main include file ft2build.h.
57955  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57956    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57957    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57958    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57959      # Fail.
57960      FOUND_FREETYPE=no
57961    fi
57962  fi
57963
57964  if test "x$FOUND_FREETYPE" = xyes; then
57965    # Include file found, let's continue the sanity check.
57966    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57967$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57968
57969    # Reset to default value
57970    FREETYPE_BASE_NAME=freetype
57971    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57972    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57973      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57974          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57975        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57976        # for the .6 version explicitly.
57977        FREETYPE_BASE_NAME=freetype.6
57978        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57979        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57980$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57981      else
57982        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57983$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57984        FOUND_FREETYPE=no
57985      fi
57986    else
57987      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57988        # On Windows, we will need both .lib and .dll file.
57989        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57990          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57991$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57992          FOUND_FREETYPE=no
57993        fi
57994      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57995          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57996        # Found lib in isa dir, use that instead.
57997        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57998        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57999$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58000      fi
58001    fi
58002  fi
58003
58004  if test "x$FOUND_FREETYPE" = xyes; then
58005
58006  # Only process if variable expands to non-empty
58007
58008  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58010
58011  # Input might be given as Windows format, start by converting to
58012  # unix format.
58013  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58014  new_path=`$CYGPATH -u "$path"`
58015
58016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58019  # "foo.exe" is OK but "foo" is an error.
58020  #
58021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58022  # It is also a way to make sure we got the proper file name for the real test later on.
58023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58024  if test "x$test_shortpath" = x; then
58025    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58026$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58027    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58028  fi
58029
58030  # Call helper function which possibly converts this using DOS-style short mode.
58031  # If so, the updated path is stored in $new_path.
58032
58033  input_path="$new_path"
58034  # Check if we need to convert this using DOS-style short mode. If the path
58035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58036  # take no chances and rewrite it.
58037  # Note: m4 eats our [], so we need to use [ and ] instead.
58038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58039  if test "x$has_forbidden_chars" != x; then
58040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58044      # Going to short mode and back again did indeed matter. Since short mode is
58045      # case insensitive, let's make it lowercase to improve readability.
58046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58047      # Now convert it back to Unix-style (cygpath)
58048      input_path=`$CYGPATH -u "$shortmode_path"`
58049      new_path="$input_path"
58050    fi
58051  fi
58052
58053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58054  if test "x$test_cygdrive_prefix" = x; then
58055    # As a simple fix, exclude /usr/bin since it's not a real path.
58056    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58058      # a path prefixed by /cygdrive for fixpath to work.
58059      new_path="$CYGWIN_ROOT_PATH$input_path"
58060    fi
58061  fi
58062
58063
58064  if test "x$path" != "x$new_path"; then
58065    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58067$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58068  fi
58069
58070    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58071
58072  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58073  has_colon=`$ECHO $path | $GREP ^.:`
58074  new_path="$path"
58075  if test "x$has_colon" = x; then
58076    # Not in mixed or Windows style, start by that.
58077    new_path=`cmd //c echo $path`
58078  fi
58079
58080
58081  input_path="$new_path"
58082  # Check if we need to convert this using DOS-style short mode. If the path
58083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58084  # take no chances and rewrite it.
58085  # Note: m4 eats our [], so we need to use [ and ] instead.
58086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58087  if test "x$has_forbidden_chars" != x; then
58088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58090  fi
58091
58092
58093  windows_path="$new_path"
58094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58095    unix_path=`$CYGPATH -u "$windows_path"`
58096    new_path="$unix_path"
58097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58099    new_path="$unix_path"
58100  fi
58101
58102  if test "x$path" != "x$new_path"; then
58103    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58105$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58106  fi
58107
58108  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58109  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58110
58111    else
58112      # We're on a unix platform. Hooray! :)
58113      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58114      has_space=`$ECHO "$path" | $GREP " "`
58115      if test "x$has_space" != x; then
58116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58117$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58118        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58119      fi
58120
58121      # Use eval to expand a potential ~
58122      eval path="$path"
58123      if test ! -f "$path" && test ! -d "$path"; then
58124        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58125      fi
58126
58127      if test -d "$path"; then
58128        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58129      else
58130        dir="`$DIRNAME "$path"`"
58131        base="`$BASENAME "$path"`"
58132        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58133      fi
58134    fi
58135  fi
58136
58137
58138  # Only process if variable expands to non-empty
58139
58140  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58142
58143  # Input might be given as Windows format, start by converting to
58144  # unix format.
58145  path="$POTENTIAL_FREETYPE_LIB_PATH"
58146  new_path=`$CYGPATH -u "$path"`
58147
58148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58151  # "foo.exe" is OK but "foo" is an error.
58152  #
58153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58154  # It is also a way to make sure we got the proper file name for the real test later on.
58155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58156  if test "x$test_shortpath" = x; then
58157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58158$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58159    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58160  fi
58161
58162  # Call helper function which possibly converts this using DOS-style short mode.
58163  # If so, the updated path is stored in $new_path.
58164
58165  input_path="$new_path"
58166  # Check if we need to convert this using DOS-style short mode. If the path
58167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58168  # take no chances and rewrite it.
58169  # Note: m4 eats our [], so we need to use [ and ] instead.
58170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58171  if test "x$has_forbidden_chars" != x; then
58172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58176      # Going to short mode and back again did indeed matter. Since short mode is
58177      # case insensitive, let's make it lowercase to improve readability.
58178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58179      # Now convert it back to Unix-style (cygpath)
58180      input_path=`$CYGPATH -u "$shortmode_path"`
58181      new_path="$input_path"
58182    fi
58183  fi
58184
58185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58186  if test "x$test_cygdrive_prefix" = x; then
58187    # As a simple fix, exclude /usr/bin since it's not a real path.
58188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58190      # a path prefixed by /cygdrive for fixpath to work.
58191      new_path="$CYGWIN_ROOT_PATH$input_path"
58192    fi
58193  fi
58194
58195
58196  if test "x$path" != "x$new_path"; then
58197    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58199$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58200  fi
58201
58202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58203
58204  path="$POTENTIAL_FREETYPE_LIB_PATH"
58205  has_colon=`$ECHO $path | $GREP ^.:`
58206  new_path="$path"
58207  if test "x$has_colon" = x; then
58208    # Not in mixed or Windows style, start by that.
58209    new_path=`cmd //c echo $path`
58210  fi
58211
58212
58213  input_path="$new_path"
58214  # Check if we need to convert this using DOS-style short mode. If the path
58215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58216  # take no chances and rewrite it.
58217  # Note: m4 eats our [], so we need to use [ and ] instead.
58218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58219  if test "x$has_forbidden_chars" != x; then
58220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58222  fi
58223
58224
58225  windows_path="$new_path"
58226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58227    unix_path=`$CYGPATH -u "$windows_path"`
58228    new_path="$unix_path"
58229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58231    new_path="$unix_path"
58232  fi
58233
58234  if test "x$path" != "x$new_path"; then
58235    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58237$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58238  fi
58239
58240  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58242
58243    else
58244      # We're on a unix platform. Hooray! :)
58245      path="$POTENTIAL_FREETYPE_LIB_PATH"
58246      has_space=`$ECHO "$path" | $GREP " "`
58247      if test "x$has_space" != x; then
58248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58249$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58250        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58251      fi
58252
58253      # Use eval to expand a potential ~
58254      eval path="$path"
58255      if test ! -f "$path" && test ! -d "$path"; then
58256        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58257      fi
58258
58259      if test -d "$path"; then
58260        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58261      else
58262        dir="`$DIRNAME "$path"`"
58263        base="`$BASENAME "$path"`"
58264        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58265      fi
58266    fi
58267  fi
58268
58269
58270    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58272$as_echo_n "checking for freetype includes... " >&6; }
58273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58274$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58275    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58277$as_echo_n "checking for freetype libraries... " >&6; }
58278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58279$as_echo "$FREETYPE_LIB_PATH" >&6; }
58280  fi
58281
58282          if test "x$FOUND_FREETYPE" != xyes; then
58283            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58284
58285  windows_path="$FREETYPE_BASE_DIR"
58286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58287    unix_path=`$CYGPATH -u "$windows_path"`
58288    FREETYPE_BASE_DIR="$unix_path"
58289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58291    FREETYPE_BASE_DIR="$unix_path"
58292  fi
58293
58294
58295  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58296  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58297  METHOD="well-known location"
58298
58299  # Let's start with an optimistic view of the world :-)
58300  FOUND_FREETYPE=yes
58301
58302  # First look for the canonical freetype main include file ft2build.h.
58303  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58304    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58305    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58306    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58307      # Fail.
58308      FOUND_FREETYPE=no
58309    fi
58310  fi
58311
58312  if test "x$FOUND_FREETYPE" = xyes; then
58313    # Include file found, let's continue the sanity check.
58314    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58315$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58316
58317    # Reset to default value
58318    FREETYPE_BASE_NAME=freetype
58319    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58320    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58321      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58322          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58323        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58324        # for the .6 version explicitly.
58325        FREETYPE_BASE_NAME=freetype.6
58326        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58327        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58328$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58329      else
58330        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58331$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58332        FOUND_FREETYPE=no
58333      fi
58334    else
58335      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58336        # On Windows, we will need both .lib and .dll file.
58337        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58338          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58339$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58340          FOUND_FREETYPE=no
58341        fi
58342      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58343          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58344        # Found lib in isa dir, use that instead.
58345        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58346        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58347$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58348      fi
58349    fi
58350  fi
58351
58352  if test "x$FOUND_FREETYPE" = xyes; then
58353
58354  # Only process if variable expands to non-empty
58355
58356  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58358
58359  # Input might be given as Windows format, start by converting to
58360  # unix format.
58361  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58362  new_path=`$CYGPATH -u "$path"`
58363
58364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58367  # "foo.exe" is OK but "foo" is an error.
58368  #
58369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58370  # It is also a way to make sure we got the proper file name for the real test later on.
58371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58372  if test "x$test_shortpath" = x; then
58373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58374$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58375    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58376  fi
58377
58378  # Call helper function which possibly converts this using DOS-style short mode.
58379  # If so, the updated path is stored in $new_path.
58380
58381  input_path="$new_path"
58382  # Check if we need to convert this using DOS-style short mode. If the path
58383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58384  # take no chances and rewrite it.
58385  # Note: m4 eats our [], so we need to use [ and ] instead.
58386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58387  if test "x$has_forbidden_chars" != x; then
58388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58392      # Going to short mode and back again did indeed matter. Since short mode is
58393      # case insensitive, let's make it lowercase to improve readability.
58394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58395      # Now convert it back to Unix-style (cygpath)
58396      input_path=`$CYGPATH -u "$shortmode_path"`
58397      new_path="$input_path"
58398    fi
58399  fi
58400
58401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58402  if test "x$test_cygdrive_prefix" = x; then
58403    # As a simple fix, exclude /usr/bin since it's not a real path.
58404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58406      # a path prefixed by /cygdrive for fixpath to work.
58407      new_path="$CYGWIN_ROOT_PATH$input_path"
58408    fi
58409  fi
58410
58411
58412  if test "x$path" != "x$new_path"; then
58413    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58416  fi
58417
58418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58419
58420  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58421  has_colon=`$ECHO $path | $GREP ^.:`
58422  new_path="$path"
58423  if test "x$has_colon" = x; then
58424    # Not in mixed or Windows style, start by that.
58425    new_path=`cmd //c echo $path`
58426  fi
58427
58428
58429  input_path="$new_path"
58430  # Check if we need to convert this using DOS-style short mode. If the path
58431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58432  # take no chances and rewrite it.
58433  # Note: m4 eats our [], so we need to use [ and ] instead.
58434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58435  if test "x$has_forbidden_chars" != x; then
58436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58438  fi
58439
58440
58441  windows_path="$new_path"
58442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58443    unix_path=`$CYGPATH -u "$windows_path"`
58444    new_path="$unix_path"
58445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58447    new_path="$unix_path"
58448  fi
58449
58450  if test "x$path" != "x$new_path"; then
58451    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58453$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58454  fi
58455
58456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58458
58459    else
58460      # We're on a unix platform. Hooray! :)
58461      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58462      has_space=`$ECHO "$path" | $GREP " "`
58463      if test "x$has_space" != x; then
58464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58465$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58467      fi
58468
58469      # Use eval to expand a potential ~
58470      eval path="$path"
58471      if test ! -f "$path" && test ! -d "$path"; then
58472        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58473      fi
58474
58475      if test -d "$path"; then
58476        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58477      else
58478        dir="`$DIRNAME "$path"`"
58479        base="`$BASENAME "$path"`"
58480        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58481      fi
58482    fi
58483  fi
58484
58485
58486  # Only process if variable expands to non-empty
58487
58488  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58490
58491  # Input might be given as Windows format, start by converting to
58492  # unix format.
58493  path="$POTENTIAL_FREETYPE_LIB_PATH"
58494  new_path=`$CYGPATH -u "$path"`
58495
58496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58499  # "foo.exe" is OK but "foo" is an error.
58500  #
58501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58502  # It is also a way to make sure we got the proper file name for the real test later on.
58503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58504  if test "x$test_shortpath" = x; then
58505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58507    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58508  fi
58509
58510  # Call helper function which possibly converts this using DOS-style short mode.
58511  # If so, the updated path is stored in $new_path.
58512
58513  input_path="$new_path"
58514  # Check if we need to convert this using DOS-style short mode. If the path
58515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58516  # take no chances and rewrite it.
58517  # Note: m4 eats our [], so we need to use [ and ] instead.
58518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58519  if test "x$has_forbidden_chars" != x; then
58520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58524      # Going to short mode and back again did indeed matter. Since short mode is
58525      # case insensitive, let's make it lowercase to improve readability.
58526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58527      # Now convert it back to Unix-style (cygpath)
58528      input_path=`$CYGPATH -u "$shortmode_path"`
58529      new_path="$input_path"
58530    fi
58531  fi
58532
58533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58534  if test "x$test_cygdrive_prefix" = x; then
58535    # As a simple fix, exclude /usr/bin since it's not a real path.
58536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58538      # a path prefixed by /cygdrive for fixpath to work.
58539      new_path="$CYGWIN_ROOT_PATH$input_path"
58540    fi
58541  fi
58542
58543
58544  if test "x$path" != "x$new_path"; then
58545    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58548  fi
58549
58550    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58551
58552  path="$POTENTIAL_FREETYPE_LIB_PATH"
58553  has_colon=`$ECHO $path | $GREP ^.:`
58554  new_path="$path"
58555  if test "x$has_colon" = x; then
58556    # Not in mixed or Windows style, start by that.
58557    new_path=`cmd //c echo $path`
58558  fi
58559
58560
58561  input_path="$new_path"
58562  # Check if we need to convert this using DOS-style short mode. If the path
58563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58564  # take no chances and rewrite it.
58565  # Note: m4 eats our [], so we need to use [ and ] instead.
58566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58567  if test "x$has_forbidden_chars" != x; then
58568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58570  fi
58571
58572
58573  windows_path="$new_path"
58574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58575    unix_path=`$CYGPATH -u "$windows_path"`
58576    new_path="$unix_path"
58577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58579    new_path="$unix_path"
58580  fi
58581
58582  if test "x$path" != "x$new_path"; then
58583    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58586  fi
58587
58588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58590
58591    else
58592      # We're on a unix platform. Hooray! :)
58593      path="$POTENTIAL_FREETYPE_LIB_PATH"
58594      has_space=`$ECHO "$path" | $GREP " "`
58595      if test "x$has_space" != x; then
58596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58598        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58599      fi
58600
58601      # Use eval to expand a potential ~
58602      eval path="$path"
58603      if test ! -f "$path" && test ! -d "$path"; then
58604        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58605      fi
58606
58607      if test -d "$path"; then
58608        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58609      else
58610        dir="`$DIRNAME "$path"`"
58611        base="`$BASENAME "$path"`"
58612        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58613      fi
58614    fi
58615  fi
58616
58617
58618    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58620$as_echo_n "checking for freetype includes... " >&6; }
58621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58622$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58623    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58625$as_echo_n "checking for freetype libraries... " >&6; }
58626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58627$as_echo "$FREETYPE_LIB_PATH" >&6; }
58628  fi
58629
58630          fi
58631          if test "x$FOUND_FREETYPE" != xyes; then
58632            FREETYPE_BASE_DIR="$HOME/freetype"
58633
58634  windows_path="$FREETYPE_BASE_DIR"
58635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58636    unix_path=`$CYGPATH -u "$windows_path"`
58637    FREETYPE_BASE_DIR="$unix_path"
58638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58640    FREETYPE_BASE_DIR="$unix_path"
58641  fi
58642
58643            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58644
58645  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58646  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58647  METHOD="well-known location"
58648
58649  # Let's start with an optimistic view of the world :-)
58650  FOUND_FREETYPE=yes
58651
58652  # First look for the canonical freetype main include file ft2build.h.
58653  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58654    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58655    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58656    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58657      # Fail.
58658      FOUND_FREETYPE=no
58659    fi
58660  fi
58661
58662  if test "x$FOUND_FREETYPE" = xyes; then
58663    # Include file found, let's continue the sanity check.
58664    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58665$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58666
58667    # Reset to default value
58668    FREETYPE_BASE_NAME=freetype
58669    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58670    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58671      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58672          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58673        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58674        # for the .6 version explicitly.
58675        FREETYPE_BASE_NAME=freetype.6
58676        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58677        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58678$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58679      else
58680        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58681$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58682        FOUND_FREETYPE=no
58683      fi
58684    else
58685      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58686        # On Windows, we will need both .lib and .dll file.
58687        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58688          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58689$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58690          FOUND_FREETYPE=no
58691        fi
58692      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58693          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58694        # Found lib in isa dir, use that instead.
58695        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58696        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58697$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58698      fi
58699    fi
58700  fi
58701
58702  if test "x$FOUND_FREETYPE" = xyes; then
58703
58704  # Only process if variable expands to non-empty
58705
58706  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58707    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58708
58709  # Input might be given as Windows format, start by converting to
58710  # unix format.
58711  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58712  new_path=`$CYGPATH -u "$path"`
58713
58714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58717  # "foo.exe" is OK but "foo" is an error.
58718  #
58719  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58720  # It is also a way to make sure we got the proper file name for the real test later on.
58721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58722  if test "x$test_shortpath" = x; then
58723    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58724$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58725    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58726  fi
58727
58728  # Call helper function which possibly converts this using DOS-style short mode.
58729  # If so, the updated path is stored in $new_path.
58730
58731  input_path="$new_path"
58732  # Check if we need to convert this using DOS-style short mode. If the path
58733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58734  # take no chances and rewrite it.
58735  # Note: m4 eats our [], so we need to use [ and ] instead.
58736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58737  if test "x$has_forbidden_chars" != x; then
58738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58742      # Going to short mode and back again did indeed matter. Since short mode is
58743      # case insensitive, let's make it lowercase to improve readability.
58744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58745      # Now convert it back to Unix-style (cygpath)
58746      input_path=`$CYGPATH -u "$shortmode_path"`
58747      new_path="$input_path"
58748    fi
58749  fi
58750
58751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58752  if test "x$test_cygdrive_prefix" = x; then
58753    # As a simple fix, exclude /usr/bin since it's not a real path.
58754    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58756      # a path prefixed by /cygdrive for fixpath to work.
58757      new_path="$CYGWIN_ROOT_PATH$input_path"
58758    fi
58759  fi
58760
58761
58762  if test "x$path" != "x$new_path"; then
58763    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58765$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58766  fi
58767
58768    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58769
58770  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58771  has_colon=`$ECHO $path | $GREP ^.:`
58772  new_path="$path"
58773  if test "x$has_colon" = x; then
58774    # Not in mixed or Windows style, start by that.
58775    new_path=`cmd //c echo $path`
58776  fi
58777
58778
58779  input_path="$new_path"
58780  # Check if we need to convert this using DOS-style short mode. If the path
58781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58782  # take no chances and rewrite it.
58783  # Note: m4 eats our [], so we need to use [ and ] instead.
58784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58785  if test "x$has_forbidden_chars" != x; then
58786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58788  fi
58789
58790
58791  windows_path="$new_path"
58792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58793    unix_path=`$CYGPATH -u "$windows_path"`
58794    new_path="$unix_path"
58795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58797    new_path="$unix_path"
58798  fi
58799
58800  if test "x$path" != "x$new_path"; then
58801    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58803$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58804  fi
58805
58806  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58807  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58808
58809    else
58810      # We're on a unix platform. Hooray! :)
58811      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58812      has_space=`$ECHO "$path" | $GREP " "`
58813      if test "x$has_space" != x; then
58814        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58815$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58816        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58817      fi
58818
58819      # Use eval to expand a potential ~
58820      eval path="$path"
58821      if test ! -f "$path" && test ! -d "$path"; then
58822        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58823      fi
58824
58825      if test -d "$path"; then
58826        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58827      else
58828        dir="`$DIRNAME "$path"`"
58829        base="`$BASENAME "$path"`"
58830        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58831      fi
58832    fi
58833  fi
58834
58835
58836  # Only process if variable expands to non-empty
58837
58838  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58840
58841  # Input might be given as Windows format, start by converting to
58842  # unix format.
58843  path="$POTENTIAL_FREETYPE_LIB_PATH"
58844  new_path=`$CYGPATH -u "$path"`
58845
58846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58849  # "foo.exe" is OK but "foo" is an error.
58850  #
58851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58852  # It is also a way to make sure we got the proper file name for the real test later on.
58853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58854  if test "x$test_shortpath" = x; then
58855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58856$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58857    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58858  fi
58859
58860  # Call helper function which possibly converts this using DOS-style short mode.
58861  # If so, the updated path is stored in $new_path.
58862
58863  input_path="$new_path"
58864  # Check if we need to convert this using DOS-style short mode. If the path
58865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58866  # take no chances and rewrite it.
58867  # Note: m4 eats our [], so we need to use [ and ] instead.
58868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58869  if test "x$has_forbidden_chars" != x; then
58870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58874      # Going to short mode and back again did indeed matter. Since short mode is
58875      # case insensitive, let's make it lowercase to improve readability.
58876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58877      # Now convert it back to Unix-style (cygpath)
58878      input_path=`$CYGPATH -u "$shortmode_path"`
58879      new_path="$input_path"
58880    fi
58881  fi
58882
58883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58884  if test "x$test_cygdrive_prefix" = x; then
58885    # As a simple fix, exclude /usr/bin since it's not a real path.
58886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58888      # a path prefixed by /cygdrive for fixpath to work.
58889      new_path="$CYGWIN_ROOT_PATH$input_path"
58890    fi
58891  fi
58892
58893
58894  if test "x$path" != "x$new_path"; then
58895    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58897$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58898  fi
58899
58900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58901
58902  path="$POTENTIAL_FREETYPE_LIB_PATH"
58903  has_colon=`$ECHO $path | $GREP ^.:`
58904  new_path="$path"
58905  if test "x$has_colon" = x; then
58906    # Not in mixed or Windows style, start by that.
58907    new_path=`cmd //c echo $path`
58908  fi
58909
58910
58911  input_path="$new_path"
58912  # Check if we need to convert this using DOS-style short mode. If the path
58913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58914  # take no chances and rewrite it.
58915  # Note: m4 eats our [], so we need to use [ and ] instead.
58916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58917  if test "x$has_forbidden_chars" != x; then
58918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58920  fi
58921
58922
58923  windows_path="$new_path"
58924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58925    unix_path=`$CYGPATH -u "$windows_path"`
58926    new_path="$unix_path"
58927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58929    new_path="$unix_path"
58930  fi
58931
58932  if test "x$path" != "x$new_path"; then
58933    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58936  fi
58937
58938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58940
58941    else
58942      # We're on a unix platform. Hooray! :)
58943      path="$POTENTIAL_FREETYPE_LIB_PATH"
58944      has_space=`$ECHO "$path" | $GREP " "`
58945      if test "x$has_space" != x; then
58946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58947$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58948        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58949      fi
58950
58951      # Use eval to expand a potential ~
58952      eval path="$path"
58953      if test ! -f "$path" && test ! -d "$path"; then
58954        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58955      fi
58956
58957      if test -d "$path"; then
58958        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58959      else
58960        dir="`$DIRNAME "$path"`"
58961        base="`$BASENAME "$path"`"
58962        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58963      fi
58964    fi
58965  fi
58966
58967
58968    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58969    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58970$as_echo_n "checking for freetype includes... " >&6; }
58971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58972$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58973    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58975$as_echo_n "checking for freetype libraries... " >&6; }
58976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58977$as_echo "$FREETYPE_LIB_PATH" >&6; }
58978  fi
58979
58980            else
58981
58982  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58983  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58984  METHOD="well-known location"
58985
58986  # Let's start with an optimistic view of the world :-)
58987  FOUND_FREETYPE=yes
58988
58989  # First look for the canonical freetype main include file ft2build.h.
58990  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58991    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58992    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58993    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58994      # Fail.
58995      FOUND_FREETYPE=no
58996    fi
58997  fi
58998
58999  if test "x$FOUND_FREETYPE" = xyes; then
59000    # Include file found, let's continue the sanity check.
59001    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59002$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59003
59004    # Reset to default value
59005    FREETYPE_BASE_NAME=freetype
59006    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59007    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59008      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59009          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59010        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59011        # for the .6 version explicitly.
59012        FREETYPE_BASE_NAME=freetype.6
59013        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59014        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59015$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59016      else
59017        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59018$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59019        FOUND_FREETYPE=no
59020      fi
59021    else
59022      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59023        # On Windows, we will need both .lib and .dll file.
59024        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59025          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59026$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59027          FOUND_FREETYPE=no
59028        fi
59029      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59030          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59031        # Found lib in isa dir, use that instead.
59032        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59033        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59034$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59035      fi
59036    fi
59037  fi
59038
59039  if test "x$FOUND_FREETYPE" = xyes; then
59040
59041  # Only process if variable expands to non-empty
59042
59043  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59045
59046  # Input might be given as Windows format, start by converting to
59047  # unix format.
59048  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59049  new_path=`$CYGPATH -u "$path"`
59050
59051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59054  # "foo.exe" is OK but "foo" is an error.
59055  #
59056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59057  # It is also a way to make sure we got the proper file name for the real test later on.
59058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59059  if test "x$test_shortpath" = x; then
59060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59062    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59063  fi
59064
59065  # Call helper function which possibly converts this using DOS-style short mode.
59066  # If so, the updated path is stored in $new_path.
59067
59068  input_path="$new_path"
59069  # Check if we need to convert this using DOS-style short mode. If the path
59070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59071  # take no chances and rewrite it.
59072  # Note: m4 eats our [], so we need to use [ and ] instead.
59073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59074  if test "x$has_forbidden_chars" != x; then
59075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59079      # Going to short mode and back again did indeed matter. Since short mode is
59080      # case insensitive, let's make it lowercase to improve readability.
59081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59082      # Now convert it back to Unix-style (cygpath)
59083      input_path=`$CYGPATH -u "$shortmode_path"`
59084      new_path="$input_path"
59085    fi
59086  fi
59087
59088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59089  if test "x$test_cygdrive_prefix" = x; then
59090    # As a simple fix, exclude /usr/bin since it's not a real path.
59091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59093      # a path prefixed by /cygdrive for fixpath to work.
59094      new_path="$CYGWIN_ROOT_PATH$input_path"
59095    fi
59096  fi
59097
59098
59099  if test "x$path" != "x$new_path"; then
59100    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59102$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59103  fi
59104
59105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59106
59107  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59108  has_colon=`$ECHO $path | $GREP ^.:`
59109  new_path="$path"
59110  if test "x$has_colon" = x; then
59111    # Not in mixed or Windows style, start by that.
59112    new_path=`cmd //c echo $path`
59113  fi
59114
59115
59116  input_path="$new_path"
59117  # Check if we need to convert this using DOS-style short mode. If the path
59118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59119  # take no chances and rewrite it.
59120  # Note: m4 eats our [], so we need to use [ and ] instead.
59121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59122  if test "x$has_forbidden_chars" != x; then
59123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59125  fi
59126
59127
59128  windows_path="$new_path"
59129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59130    unix_path=`$CYGPATH -u "$windows_path"`
59131    new_path="$unix_path"
59132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59134    new_path="$unix_path"
59135  fi
59136
59137  if test "x$path" != "x$new_path"; then
59138    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59140$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59141  fi
59142
59143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59145
59146    else
59147      # We're on a unix platform. Hooray! :)
59148      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59149      has_space=`$ECHO "$path" | $GREP " "`
59150      if test "x$has_space" != x; then
59151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59154      fi
59155
59156      # Use eval to expand a potential ~
59157      eval path="$path"
59158      if test ! -f "$path" && test ! -d "$path"; then
59159        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59160      fi
59161
59162      if test -d "$path"; then
59163        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59164      else
59165        dir="`$DIRNAME "$path"`"
59166        base="`$BASENAME "$path"`"
59167        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59168      fi
59169    fi
59170  fi
59171
59172
59173  # Only process if variable expands to non-empty
59174
59175  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59177
59178  # Input might be given as Windows format, start by converting to
59179  # unix format.
59180  path="$POTENTIAL_FREETYPE_LIB_PATH"
59181  new_path=`$CYGPATH -u "$path"`
59182
59183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59186  # "foo.exe" is OK but "foo" is an error.
59187  #
59188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59189  # It is also a way to make sure we got the proper file name for the real test later on.
59190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59191  if test "x$test_shortpath" = x; then
59192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59193$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59194    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59195  fi
59196
59197  # Call helper function which possibly converts this using DOS-style short mode.
59198  # If so, the updated path is stored in $new_path.
59199
59200  input_path="$new_path"
59201  # Check if we need to convert this using DOS-style short mode. If the path
59202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59203  # take no chances and rewrite it.
59204  # Note: m4 eats our [], so we need to use [ and ] instead.
59205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59206  if test "x$has_forbidden_chars" != x; then
59207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59211      # Going to short mode and back again did indeed matter. Since short mode is
59212      # case insensitive, let's make it lowercase to improve readability.
59213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59214      # Now convert it back to Unix-style (cygpath)
59215      input_path=`$CYGPATH -u "$shortmode_path"`
59216      new_path="$input_path"
59217    fi
59218  fi
59219
59220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59221  if test "x$test_cygdrive_prefix" = x; then
59222    # As a simple fix, exclude /usr/bin since it's not a real path.
59223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59225      # a path prefixed by /cygdrive for fixpath to work.
59226      new_path="$CYGWIN_ROOT_PATH$input_path"
59227    fi
59228  fi
59229
59230
59231  if test "x$path" != "x$new_path"; then
59232    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59234$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59235  fi
59236
59237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59238
59239  path="$POTENTIAL_FREETYPE_LIB_PATH"
59240  has_colon=`$ECHO $path | $GREP ^.:`
59241  new_path="$path"
59242  if test "x$has_colon" = x; then
59243    # Not in mixed or Windows style, start by that.
59244    new_path=`cmd //c echo $path`
59245  fi
59246
59247
59248  input_path="$new_path"
59249  # Check if we need to convert this using DOS-style short mode. If the path
59250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59251  # take no chances and rewrite it.
59252  # Note: m4 eats our [], so we need to use [ and ] instead.
59253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59254  if test "x$has_forbidden_chars" != x; then
59255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59257  fi
59258
59259
59260  windows_path="$new_path"
59261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59262    unix_path=`$CYGPATH -u "$windows_path"`
59263    new_path="$unix_path"
59264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59266    new_path="$unix_path"
59267  fi
59268
59269  if test "x$path" != "x$new_path"; then
59270    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59272$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59273  fi
59274
59275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59277
59278    else
59279      # We're on a unix platform. Hooray! :)
59280      path="$POTENTIAL_FREETYPE_LIB_PATH"
59281      has_space=`$ECHO "$path" | $GREP " "`
59282      if test "x$has_space" != x; then
59283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59284$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59286      fi
59287
59288      # Use eval to expand a potential ~
59289      eval path="$path"
59290      if test ! -f "$path" && test ! -d "$path"; then
59291        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59292      fi
59293
59294      if test -d "$path"; then
59295        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59296      else
59297        dir="`$DIRNAME "$path"`"
59298        base="`$BASENAME "$path"`"
59299        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59300      fi
59301    fi
59302  fi
59303
59304
59305    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59307$as_echo_n "checking for freetype includes... " >&6; }
59308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59309$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59310    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59312$as_echo_n "checking for freetype libraries... " >&6; }
59313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59314$as_echo "$FREETYPE_LIB_PATH" >&6; }
59315  fi
59316
59317            fi
59318            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59319                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59320              # Source is available, as a last resort try to build freetype in default location
59321
59322  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59323  BUILD_FREETYPE=yes
59324
59325  # Check if the freetype sources are acessible..
59326  if ! test -d $FREETYPE_SRC_PATH; then
59327    { $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
59328$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59329    BUILD_FREETYPE=no
59330  fi
59331  # ..and contain a vc2010 project file
59332  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59333  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59334    { $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
59335$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59336    BUILD_FREETYPE=no
59337  fi
59338  # Now check if configure found a version of 'msbuild.exe'
59339  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59340    { $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
59341$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;}
59342    BUILD_FREETYPE=no
59343  fi
59344
59345  # Ready to go..
59346  if test "x$BUILD_FREETYPE" = xyes; then
59347    # msbuild requires trailing slashes for output directories
59348    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59349    freetype_lib_path_unix="$freetype_lib_path"
59350    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59351
59352  unix_path="$vcxproj_path"
59353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59354    windows_path=`$CYGPATH -m "$unix_path"`
59355    vcxproj_path="$windows_path"
59356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59357    windows_path=`cmd //c echo $unix_path`
59358    vcxproj_path="$windows_path"
59359  fi
59360
59361
59362  unix_path="$freetype_lib_path"
59363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59364    windows_path=`$CYGPATH -m "$unix_path"`
59365    freetype_lib_path="$windows_path"
59366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59367    windows_path=`cmd //c echo $unix_path`
59368    freetype_lib_path="$windows_path"
59369  fi
59370
59371
59372  unix_path="$freetype_obj_path"
59373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59374    windows_path=`$CYGPATH -m "$unix_path"`
59375    freetype_obj_path="$windows_path"
59376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59377    windows_path=`cmd //c echo $unix_path`
59378    freetype_obj_path="$windows_path"
59379  fi
59380
59381    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59382      freetype_platform=x64
59383    else
59384      freetype_platform=win32
59385    fi
59386
59387    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59388    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59389    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59390    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59391    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59392$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59393
59394    # First we try to build the freetype.dll
59395    $ECHO -e "@echo off\n"\
59396        "$MSBUILD $vcxproj_path "\
59397        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59398        "/p:Configuration=\"Release Multithreaded\" "\
59399        "/p:Platform=$freetype_platform "\
59400        "/p:ConfigurationType=DynamicLibrary "\
59401        "/p:TargetName=freetype "\
59402        "/p:OutDir=\"$freetype_lib_path\" "\
59403        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59404    cmd /c freetype.bat
59405
59406    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59407      # If that succeeds we also build freetype.lib
59408      $ECHO -e "@echo off\n"\
59409          "$MSBUILD $vcxproj_path "\
59410          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59411          "/p:Configuration=\"Release Multithreaded\" "\
59412          "/p:Platform=$freetype_platform "\
59413          "/p:ConfigurationType=StaticLibrary "\
59414          "/p:TargetName=freetype "\
59415          "/p:OutDir=\"$freetype_lib_path\" "\
59416          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59417      cmd /c freetype.bat
59418
59419      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59420        # Once we build both, lib and dll, set freetype lib and include path appropriately
59421        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59422        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59423        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59424$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59425      else
59426        BUILD_FREETYPE=no
59427      fi
59428    else
59429      BUILD_FREETYPE=no
59430    fi
59431  fi
59432
59433              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59434
59435  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59436  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59437  METHOD="well-known location"
59438
59439  # Let's start with an optimistic view of the world :-)
59440  FOUND_FREETYPE=yes
59441
59442  # First look for the canonical freetype main include file ft2build.h.
59443  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59444    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59445    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59446    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59447      # Fail.
59448      FOUND_FREETYPE=no
59449    fi
59450  fi
59451
59452  if test "x$FOUND_FREETYPE" = xyes; then
59453    # Include file found, let's continue the sanity check.
59454    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59455$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59456
59457    # Reset to default value
59458    FREETYPE_BASE_NAME=freetype
59459    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59460    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59461      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59462          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59463        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59464        # for the .6 version explicitly.
59465        FREETYPE_BASE_NAME=freetype.6
59466        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59467        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59468$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59469      else
59470        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59471$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59472        FOUND_FREETYPE=no
59473      fi
59474    else
59475      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59476        # On Windows, we will need both .lib and .dll file.
59477        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59478          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59479$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59480          FOUND_FREETYPE=no
59481        fi
59482      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59483          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59484        # Found lib in isa dir, use that instead.
59485        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59486        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59487$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59488      fi
59489    fi
59490  fi
59491
59492  if test "x$FOUND_FREETYPE" = xyes; then
59493
59494  # Only process if variable expands to non-empty
59495
59496  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59498
59499  # Input might be given as Windows format, start by converting to
59500  # unix format.
59501  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59502  new_path=`$CYGPATH -u "$path"`
59503
59504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59507  # "foo.exe" is OK but "foo" is an error.
59508  #
59509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59510  # It is also a way to make sure we got the proper file name for the real test later on.
59511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59512  if test "x$test_shortpath" = x; then
59513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59514$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59515    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59516  fi
59517
59518  # Call helper function which possibly converts this using DOS-style short mode.
59519  # If so, the updated path is stored in $new_path.
59520
59521  input_path="$new_path"
59522  # Check if we need to convert this using DOS-style short mode. If the path
59523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59524  # take no chances and rewrite it.
59525  # Note: m4 eats our [], so we need to use [ and ] instead.
59526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59527  if test "x$has_forbidden_chars" != x; then
59528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59532      # Going to short mode and back again did indeed matter. Since short mode is
59533      # case insensitive, let's make it lowercase to improve readability.
59534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59535      # Now convert it back to Unix-style (cygpath)
59536      input_path=`$CYGPATH -u "$shortmode_path"`
59537      new_path="$input_path"
59538    fi
59539  fi
59540
59541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59542  if test "x$test_cygdrive_prefix" = x; then
59543    # As a simple fix, exclude /usr/bin since it's not a real path.
59544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59546      # a path prefixed by /cygdrive for fixpath to work.
59547      new_path="$CYGWIN_ROOT_PATH$input_path"
59548    fi
59549  fi
59550
59551
59552  if test "x$path" != "x$new_path"; then
59553    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59555$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59556  fi
59557
59558    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59559
59560  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59561  has_colon=`$ECHO $path | $GREP ^.:`
59562  new_path="$path"
59563  if test "x$has_colon" = x; then
59564    # Not in mixed or Windows style, start by that.
59565    new_path=`cmd //c echo $path`
59566  fi
59567
59568
59569  input_path="$new_path"
59570  # Check if we need to convert this using DOS-style short mode. If the path
59571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59572  # take no chances and rewrite it.
59573  # Note: m4 eats our [], so we need to use [ and ] instead.
59574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59575  if test "x$has_forbidden_chars" != x; then
59576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59578  fi
59579
59580
59581  windows_path="$new_path"
59582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59583    unix_path=`$CYGPATH -u "$windows_path"`
59584    new_path="$unix_path"
59585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59587    new_path="$unix_path"
59588  fi
59589
59590  if test "x$path" != "x$new_path"; then
59591    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59593$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59594  fi
59595
59596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59598
59599    else
59600      # We're on a unix platform. Hooray! :)
59601      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59602      has_space=`$ECHO "$path" | $GREP " "`
59603      if test "x$has_space" != x; then
59604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59605$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59606        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59607      fi
59608
59609      # Use eval to expand a potential ~
59610      eval path="$path"
59611      if test ! -f "$path" && test ! -d "$path"; then
59612        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59613      fi
59614
59615      if test -d "$path"; then
59616        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59617      else
59618        dir="`$DIRNAME "$path"`"
59619        base="`$BASENAME "$path"`"
59620        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59621      fi
59622    fi
59623  fi
59624
59625
59626  # Only process if variable expands to non-empty
59627
59628  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59630
59631  # Input might be given as Windows format, start by converting to
59632  # unix format.
59633  path="$POTENTIAL_FREETYPE_LIB_PATH"
59634  new_path=`$CYGPATH -u "$path"`
59635
59636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59639  # "foo.exe" is OK but "foo" is an error.
59640  #
59641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59642  # It is also a way to make sure we got the proper file name for the real test later on.
59643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59644  if test "x$test_shortpath" = x; then
59645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59646$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59647    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59648  fi
59649
59650  # Call helper function which possibly converts this using DOS-style short mode.
59651  # If so, the updated path is stored in $new_path.
59652
59653  input_path="$new_path"
59654  # Check if we need to convert this using DOS-style short mode. If the path
59655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59656  # take no chances and rewrite it.
59657  # Note: m4 eats our [], so we need to use [ and ] instead.
59658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59659  if test "x$has_forbidden_chars" != x; then
59660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59664      # Going to short mode and back again did indeed matter. Since short mode is
59665      # case insensitive, let's make it lowercase to improve readability.
59666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59667      # Now convert it back to Unix-style (cygpath)
59668      input_path=`$CYGPATH -u "$shortmode_path"`
59669      new_path="$input_path"
59670    fi
59671  fi
59672
59673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59674  if test "x$test_cygdrive_prefix" = x; then
59675    # As a simple fix, exclude /usr/bin since it's not a real path.
59676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59678      # a path prefixed by /cygdrive for fixpath to work.
59679      new_path="$CYGWIN_ROOT_PATH$input_path"
59680    fi
59681  fi
59682
59683
59684  if test "x$path" != "x$new_path"; then
59685    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59688  fi
59689
59690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59691
59692  path="$POTENTIAL_FREETYPE_LIB_PATH"
59693  has_colon=`$ECHO $path | $GREP ^.:`
59694  new_path="$path"
59695  if test "x$has_colon" = x; then
59696    # Not in mixed or Windows style, start by that.
59697    new_path=`cmd //c echo $path`
59698  fi
59699
59700
59701  input_path="$new_path"
59702  # Check if we need to convert this using DOS-style short mode. If the path
59703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59704  # take no chances and rewrite it.
59705  # Note: m4 eats our [], so we need to use [ and ] instead.
59706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59707  if test "x$has_forbidden_chars" != x; then
59708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59710  fi
59711
59712
59713  windows_path="$new_path"
59714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59715    unix_path=`$CYGPATH -u "$windows_path"`
59716    new_path="$unix_path"
59717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59719    new_path="$unix_path"
59720  fi
59721
59722  if test "x$path" != "x$new_path"; then
59723    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59726  fi
59727
59728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59730
59731    else
59732      # We're on a unix platform. Hooray! :)
59733      path="$POTENTIAL_FREETYPE_LIB_PATH"
59734      has_space=`$ECHO "$path" | $GREP " "`
59735      if test "x$has_space" != x; then
59736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59737$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59738        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59739      fi
59740
59741      # Use eval to expand a potential ~
59742      eval path="$path"
59743      if test ! -f "$path" && test ! -d "$path"; then
59744        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59745      fi
59746
59747      if test -d "$path"; then
59748        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59749      else
59750        dir="`$DIRNAME "$path"`"
59751        base="`$BASENAME "$path"`"
59752        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59753      fi
59754    fi
59755  fi
59756
59757
59758    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59760$as_echo_n "checking for freetype includes... " >&6; }
59761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59762$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59763    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59765$as_echo_n "checking for freetype libraries... " >&6; }
59766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59767$as_echo "$FREETYPE_LIB_PATH" >&6; }
59768  fi
59769
59770              else
59771
59772  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59773  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59774  METHOD="well-known location"
59775
59776  # Let's start with an optimistic view of the world :-)
59777  FOUND_FREETYPE=yes
59778
59779  # First look for the canonical freetype main include file ft2build.h.
59780  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59781    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59782    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59783    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59784      # Fail.
59785      FOUND_FREETYPE=no
59786    fi
59787  fi
59788
59789  if test "x$FOUND_FREETYPE" = xyes; then
59790    # Include file found, let's continue the sanity check.
59791    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59792$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59793
59794    # Reset to default value
59795    FREETYPE_BASE_NAME=freetype
59796    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59797    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59798      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59799          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59800        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59801        # for the .6 version explicitly.
59802        FREETYPE_BASE_NAME=freetype.6
59803        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59804        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59805$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59806      else
59807        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59808$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59809        FOUND_FREETYPE=no
59810      fi
59811    else
59812      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59813        # On Windows, we will need both .lib and .dll file.
59814        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59815          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59816$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59817          FOUND_FREETYPE=no
59818        fi
59819      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59820          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59821        # Found lib in isa dir, use that instead.
59822        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59823        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59824$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59825      fi
59826    fi
59827  fi
59828
59829  if test "x$FOUND_FREETYPE" = xyes; then
59830
59831  # Only process if variable expands to non-empty
59832
59833  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59835
59836  # Input might be given as Windows format, start by converting to
59837  # unix format.
59838  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59839  new_path=`$CYGPATH -u "$path"`
59840
59841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59844  # "foo.exe" is OK but "foo" is an error.
59845  #
59846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59847  # It is also a way to make sure we got the proper file name for the real test later on.
59848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59849  if test "x$test_shortpath" = x; then
59850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59851$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59852    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59853  fi
59854
59855  # Call helper function which possibly converts this using DOS-style short mode.
59856  # If so, the updated path is stored in $new_path.
59857
59858  input_path="$new_path"
59859  # Check if we need to convert this using DOS-style short mode. If the path
59860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59861  # take no chances and rewrite it.
59862  # Note: m4 eats our [], so we need to use [ and ] instead.
59863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59864  if test "x$has_forbidden_chars" != x; then
59865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59869      # Going to short mode and back again did indeed matter. Since short mode is
59870      # case insensitive, let's make it lowercase to improve readability.
59871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59872      # Now convert it back to Unix-style (cygpath)
59873      input_path=`$CYGPATH -u "$shortmode_path"`
59874      new_path="$input_path"
59875    fi
59876  fi
59877
59878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59879  if test "x$test_cygdrive_prefix" = x; then
59880    # As a simple fix, exclude /usr/bin since it's not a real path.
59881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59883      # a path prefixed by /cygdrive for fixpath to work.
59884      new_path="$CYGWIN_ROOT_PATH$input_path"
59885    fi
59886  fi
59887
59888
59889  if test "x$path" != "x$new_path"; then
59890    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59892$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59893  fi
59894
59895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59896
59897  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59898  has_colon=`$ECHO $path | $GREP ^.:`
59899  new_path="$path"
59900  if test "x$has_colon" = x; then
59901    # Not in mixed or Windows style, start by that.
59902    new_path=`cmd //c echo $path`
59903  fi
59904
59905
59906  input_path="$new_path"
59907  # Check if we need to convert this using DOS-style short mode. If the path
59908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59909  # take no chances and rewrite it.
59910  # Note: m4 eats our [], so we need to use [ and ] instead.
59911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59912  if test "x$has_forbidden_chars" != x; then
59913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59915  fi
59916
59917
59918  windows_path="$new_path"
59919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59920    unix_path=`$CYGPATH -u "$windows_path"`
59921    new_path="$unix_path"
59922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59924    new_path="$unix_path"
59925  fi
59926
59927  if test "x$path" != "x$new_path"; then
59928    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59930$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59931  fi
59932
59933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59935
59936    else
59937      # We're on a unix platform. Hooray! :)
59938      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59939      has_space=`$ECHO "$path" | $GREP " "`
59940      if test "x$has_space" != x; then
59941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59942$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59944      fi
59945
59946      # Use eval to expand a potential ~
59947      eval path="$path"
59948      if test ! -f "$path" && test ! -d "$path"; then
59949        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59950      fi
59951
59952      if test -d "$path"; then
59953        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59954      else
59955        dir="`$DIRNAME "$path"`"
59956        base="`$BASENAME "$path"`"
59957        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59958      fi
59959    fi
59960  fi
59961
59962
59963  # Only process if variable expands to non-empty
59964
59965  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59967
59968  # Input might be given as Windows format, start by converting to
59969  # unix format.
59970  path="$POTENTIAL_FREETYPE_LIB_PATH"
59971  new_path=`$CYGPATH -u "$path"`
59972
59973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59976  # "foo.exe" is OK but "foo" is an error.
59977  #
59978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59979  # It is also a way to make sure we got the proper file name for the real test later on.
59980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59981  if test "x$test_shortpath" = x; then
59982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59983$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59984    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59985  fi
59986
59987  # Call helper function which possibly converts this using DOS-style short mode.
59988  # If so, the updated path is stored in $new_path.
59989
59990  input_path="$new_path"
59991  # Check if we need to convert this using DOS-style short mode. If the path
59992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59993  # take no chances and rewrite it.
59994  # Note: m4 eats our [], so we need to use [ and ] instead.
59995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59996  if test "x$has_forbidden_chars" != x; then
59997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60001      # Going to short mode and back again did indeed matter. Since short mode is
60002      # case insensitive, let's make it lowercase to improve readability.
60003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60004      # Now convert it back to Unix-style (cygpath)
60005      input_path=`$CYGPATH -u "$shortmode_path"`
60006      new_path="$input_path"
60007    fi
60008  fi
60009
60010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60011  if test "x$test_cygdrive_prefix" = x; then
60012    # As a simple fix, exclude /usr/bin since it's not a real path.
60013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60015      # a path prefixed by /cygdrive for fixpath to work.
60016      new_path="$CYGWIN_ROOT_PATH$input_path"
60017    fi
60018  fi
60019
60020
60021  if test "x$path" != "x$new_path"; then
60022    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60024$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60025  fi
60026
60027    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60028
60029  path="$POTENTIAL_FREETYPE_LIB_PATH"
60030  has_colon=`$ECHO $path | $GREP ^.:`
60031  new_path="$path"
60032  if test "x$has_colon" = x; then
60033    # Not in mixed or Windows style, start by that.
60034    new_path=`cmd //c echo $path`
60035  fi
60036
60037
60038  input_path="$new_path"
60039  # Check if we need to convert this using DOS-style short mode. If the path
60040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60041  # take no chances and rewrite it.
60042  # Note: m4 eats our [], so we need to use [ and ] instead.
60043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60044  if test "x$has_forbidden_chars" != x; then
60045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60047  fi
60048
60049
60050  windows_path="$new_path"
60051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60052    unix_path=`$CYGPATH -u "$windows_path"`
60053    new_path="$unix_path"
60054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60056    new_path="$unix_path"
60057  fi
60058
60059  if test "x$path" != "x$new_path"; then
60060    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60062$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60063  fi
60064
60065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60067
60068    else
60069      # We're on a unix platform. Hooray! :)
60070      path="$POTENTIAL_FREETYPE_LIB_PATH"
60071      has_space=`$ECHO "$path" | $GREP " "`
60072      if test "x$has_space" != x; then
60073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60074$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60075        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60076      fi
60077
60078      # Use eval to expand a potential ~
60079      eval path="$path"
60080      if test ! -f "$path" && test ! -d "$path"; then
60081        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60082      fi
60083
60084      if test -d "$path"; then
60085        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60086      else
60087        dir="`$DIRNAME "$path"`"
60088        base="`$BASENAME "$path"`"
60089        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60090      fi
60091    fi
60092  fi
60093
60094
60095    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60097$as_echo_n "checking for freetype includes... " >&6; }
60098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60099$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60100    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60102$as_echo_n "checking for freetype libraries... " >&6; }
60103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60104$as_echo "$FREETYPE_LIB_PATH" >&6; }
60105  fi
60106
60107              fi
60108            fi
60109          fi
60110        else
60111          FREETYPE_BASE_DIR="$SYSROOT/usr"
60112
60113  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60114  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60115  METHOD="well-known location"
60116
60117  # Let's start with an optimistic view of the world :-)
60118  FOUND_FREETYPE=yes
60119
60120  # First look for the canonical freetype main include file ft2build.h.
60121  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60122    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60123    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60124    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60125      # Fail.
60126      FOUND_FREETYPE=no
60127    fi
60128  fi
60129
60130  if test "x$FOUND_FREETYPE" = xyes; then
60131    # Include file found, let's continue the sanity check.
60132    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60133$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60134
60135    # Reset to default value
60136    FREETYPE_BASE_NAME=freetype
60137    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60138    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60139      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60140          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60141        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60142        # for the .6 version explicitly.
60143        FREETYPE_BASE_NAME=freetype.6
60144        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60145        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60146$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60147      else
60148        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60149$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60150        FOUND_FREETYPE=no
60151      fi
60152    else
60153      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60154        # On Windows, we will need both .lib and .dll file.
60155        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60156          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60157$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60158          FOUND_FREETYPE=no
60159        fi
60160      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60161          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60162        # Found lib in isa dir, use that instead.
60163        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60164        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60165$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60166      fi
60167    fi
60168  fi
60169
60170  if test "x$FOUND_FREETYPE" = xyes; then
60171
60172  # Only process if variable expands to non-empty
60173
60174  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60176
60177  # Input might be given as Windows format, start by converting to
60178  # unix format.
60179  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60180  new_path=`$CYGPATH -u "$path"`
60181
60182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60185  # "foo.exe" is OK but "foo" is an error.
60186  #
60187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60188  # It is also a way to make sure we got the proper file name for the real test later on.
60189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60190  if test "x$test_shortpath" = x; then
60191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60192$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60193    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60194  fi
60195
60196  # Call helper function which possibly converts this using DOS-style short mode.
60197  # If so, the updated path is stored in $new_path.
60198
60199  input_path="$new_path"
60200  # Check if we need to convert this using DOS-style short mode. If the path
60201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60202  # take no chances and rewrite it.
60203  # Note: m4 eats our [], so we need to use [ and ] instead.
60204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60205  if test "x$has_forbidden_chars" != x; then
60206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60210      # Going to short mode and back again did indeed matter. Since short mode is
60211      # case insensitive, let's make it lowercase to improve readability.
60212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60213      # Now convert it back to Unix-style (cygpath)
60214      input_path=`$CYGPATH -u "$shortmode_path"`
60215      new_path="$input_path"
60216    fi
60217  fi
60218
60219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60220  if test "x$test_cygdrive_prefix" = x; then
60221    # As a simple fix, exclude /usr/bin since it's not a real path.
60222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60224      # a path prefixed by /cygdrive for fixpath to work.
60225      new_path="$CYGWIN_ROOT_PATH$input_path"
60226    fi
60227  fi
60228
60229
60230  if test "x$path" != "x$new_path"; then
60231    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60233$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60234  fi
60235
60236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60237
60238  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60239  has_colon=`$ECHO $path | $GREP ^.:`
60240  new_path="$path"
60241  if test "x$has_colon" = x; then
60242    # Not in mixed or Windows style, start by that.
60243    new_path=`cmd //c echo $path`
60244  fi
60245
60246
60247  input_path="$new_path"
60248  # Check if we need to convert this using DOS-style short mode. If the path
60249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60250  # take no chances and rewrite it.
60251  # Note: m4 eats our [], so we need to use [ and ] instead.
60252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60253  if test "x$has_forbidden_chars" != x; then
60254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60256  fi
60257
60258
60259  windows_path="$new_path"
60260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60261    unix_path=`$CYGPATH -u "$windows_path"`
60262    new_path="$unix_path"
60263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60265    new_path="$unix_path"
60266  fi
60267
60268  if test "x$path" != "x$new_path"; then
60269    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60271$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60272  fi
60273
60274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60276
60277    else
60278      # We're on a unix platform. Hooray! :)
60279      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60280      has_space=`$ECHO "$path" | $GREP " "`
60281      if test "x$has_space" != x; then
60282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60283$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60285      fi
60286
60287      # Use eval to expand a potential ~
60288      eval path="$path"
60289      if test ! -f "$path" && test ! -d "$path"; then
60290        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60291      fi
60292
60293      if test -d "$path"; then
60294        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60295      else
60296        dir="`$DIRNAME "$path"`"
60297        base="`$BASENAME "$path"`"
60298        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60299      fi
60300    fi
60301  fi
60302
60303
60304  # Only process if variable expands to non-empty
60305
60306  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60308
60309  # Input might be given as Windows format, start by converting to
60310  # unix format.
60311  path="$POTENTIAL_FREETYPE_LIB_PATH"
60312  new_path=`$CYGPATH -u "$path"`
60313
60314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60317  # "foo.exe" is OK but "foo" is an error.
60318  #
60319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60320  # It is also a way to make sure we got the proper file name for the real test later on.
60321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60322  if test "x$test_shortpath" = x; then
60323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60324$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60325    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60326  fi
60327
60328  # Call helper function which possibly converts this using DOS-style short mode.
60329  # If so, the updated path is stored in $new_path.
60330
60331  input_path="$new_path"
60332  # Check if we need to convert this using DOS-style short mode. If the path
60333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60334  # take no chances and rewrite it.
60335  # Note: m4 eats our [], so we need to use [ and ] instead.
60336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60337  if test "x$has_forbidden_chars" != x; then
60338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60342      # Going to short mode and back again did indeed matter. Since short mode is
60343      # case insensitive, let's make it lowercase to improve readability.
60344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60345      # Now convert it back to Unix-style (cygpath)
60346      input_path=`$CYGPATH -u "$shortmode_path"`
60347      new_path="$input_path"
60348    fi
60349  fi
60350
60351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60352  if test "x$test_cygdrive_prefix" = x; then
60353    # As a simple fix, exclude /usr/bin since it's not a real path.
60354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60356      # a path prefixed by /cygdrive for fixpath to work.
60357      new_path="$CYGWIN_ROOT_PATH$input_path"
60358    fi
60359  fi
60360
60361
60362  if test "x$path" != "x$new_path"; then
60363    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60365$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60366  fi
60367
60368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60369
60370  path="$POTENTIAL_FREETYPE_LIB_PATH"
60371  has_colon=`$ECHO $path | $GREP ^.:`
60372  new_path="$path"
60373  if test "x$has_colon" = x; then
60374    # Not in mixed or Windows style, start by that.
60375    new_path=`cmd //c echo $path`
60376  fi
60377
60378
60379  input_path="$new_path"
60380  # Check if we need to convert this using DOS-style short mode. If the path
60381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60382  # take no chances and rewrite it.
60383  # Note: m4 eats our [], so we need to use [ and ] instead.
60384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60385  if test "x$has_forbidden_chars" != x; then
60386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60388  fi
60389
60390
60391  windows_path="$new_path"
60392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60393    unix_path=`$CYGPATH -u "$windows_path"`
60394    new_path="$unix_path"
60395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60397    new_path="$unix_path"
60398  fi
60399
60400  if test "x$path" != "x$new_path"; then
60401    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60403$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60404  fi
60405
60406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60408
60409    else
60410      # We're on a unix platform. Hooray! :)
60411      path="$POTENTIAL_FREETYPE_LIB_PATH"
60412      has_space=`$ECHO "$path" | $GREP " "`
60413      if test "x$has_space" != x; then
60414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60415$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60416        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60417      fi
60418
60419      # Use eval to expand a potential ~
60420      eval path="$path"
60421      if test ! -f "$path" && test ! -d "$path"; then
60422        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60423      fi
60424
60425      if test -d "$path"; then
60426        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60427      else
60428        dir="`$DIRNAME "$path"`"
60429        base="`$BASENAME "$path"`"
60430        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60431      fi
60432    fi
60433  fi
60434
60435
60436    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60438$as_echo_n "checking for freetype includes... " >&6; }
60439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60440$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60441    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60443$as_echo_n "checking for freetype libraries... " >&6; }
60444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60445$as_echo "$FREETYPE_LIB_PATH" >&6; }
60446  fi
60447
60448
60449          if test "x$FOUND_FREETYPE" != xyes; then
60450            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60451
60452  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60453  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60454  METHOD="well-known location"
60455
60456  # Let's start with an optimistic view of the world :-)
60457  FOUND_FREETYPE=yes
60458
60459  # First look for the canonical freetype main include file ft2build.h.
60460  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60461    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60462    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60463    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60464      # Fail.
60465      FOUND_FREETYPE=no
60466    fi
60467  fi
60468
60469  if test "x$FOUND_FREETYPE" = xyes; then
60470    # Include file found, let's continue the sanity check.
60471    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60472$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60473
60474    # Reset to default value
60475    FREETYPE_BASE_NAME=freetype
60476    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60477    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60478      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60479          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60480        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60481        # for the .6 version explicitly.
60482        FREETYPE_BASE_NAME=freetype.6
60483        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60484        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60485$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60486      else
60487        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60488$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60489        FOUND_FREETYPE=no
60490      fi
60491    else
60492      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60493        # On Windows, we will need both .lib and .dll file.
60494        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60495          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60496$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60497          FOUND_FREETYPE=no
60498        fi
60499      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60500          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60501        # Found lib in isa dir, use that instead.
60502        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60503        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60504$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60505      fi
60506    fi
60507  fi
60508
60509  if test "x$FOUND_FREETYPE" = xyes; then
60510
60511  # Only process if variable expands to non-empty
60512
60513  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60515
60516  # Input might be given as Windows format, start by converting to
60517  # unix format.
60518  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60519  new_path=`$CYGPATH -u "$path"`
60520
60521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60524  # "foo.exe" is OK but "foo" is an error.
60525  #
60526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60527  # It is also a way to make sure we got the proper file name for the real test later on.
60528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60529  if test "x$test_shortpath" = x; then
60530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60531$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60532    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60533  fi
60534
60535  # Call helper function which possibly converts this using DOS-style short mode.
60536  # If so, the updated path is stored in $new_path.
60537
60538  input_path="$new_path"
60539  # Check if we need to convert this using DOS-style short mode. If the path
60540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60541  # take no chances and rewrite it.
60542  # Note: m4 eats our [], so we need to use [ and ] instead.
60543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60544  if test "x$has_forbidden_chars" != x; then
60545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60549      # Going to short mode and back again did indeed matter. Since short mode is
60550      # case insensitive, let's make it lowercase to improve readability.
60551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60552      # Now convert it back to Unix-style (cygpath)
60553      input_path=`$CYGPATH -u "$shortmode_path"`
60554      new_path="$input_path"
60555    fi
60556  fi
60557
60558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60559  if test "x$test_cygdrive_prefix" = x; then
60560    # As a simple fix, exclude /usr/bin since it's not a real path.
60561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60563      # a path prefixed by /cygdrive for fixpath to work.
60564      new_path="$CYGWIN_ROOT_PATH$input_path"
60565    fi
60566  fi
60567
60568
60569  if test "x$path" != "x$new_path"; then
60570    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60573  fi
60574
60575    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60576
60577  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60578  has_colon=`$ECHO $path | $GREP ^.:`
60579  new_path="$path"
60580  if test "x$has_colon" = x; then
60581    # Not in mixed or Windows style, start by that.
60582    new_path=`cmd //c echo $path`
60583  fi
60584
60585
60586  input_path="$new_path"
60587  # Check if we need to convert this using DOS-style short mode. If the path
60588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60589  # take no chances and rewrite it.
60590  # Note: m4 eats our [], so we need to use [ and ] instead.
60591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60592  if test "x$has_forbidden_chars" != x; then
60593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60595  fi
60596
60597
60598  windows_path="$new_path"
60599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60600    unix_path=`$CYGPATH -u "$windows_path"`
60601    new_path="$unix_path"
60602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60604    new_path="$unix_path"
60605  fi
60606
60607  if test "x$path" != "x$new_path"; then
60608    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60611  fi
60612
60613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60615
60616    else
60617      # We're on a unix platform. Hooray! :)
60618      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60619      has_space=`$ECHO "$path" | $GREP " "`
60620      if test "x$has_space" != x; then
60621        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60623        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60624      fi
60625
60626      # Use eval to expand a potential ~
60627      eval path="$path"
60628      if test ! -f "$path" && test ! -d "$path"; then
60629        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60630      fi
60631
60632      if test -d "$path"; then
60633        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60634      else
60635        dir="`$DIRNAME "$path"`"
60636        base="`$BASENAME "$path"`"
60637        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60638      fi
60639    fi
60640  fi
60641
60642
60643  # Only process if variable expands to non-empty
60644
60645  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60647
60648  # Input might be given as Windows format, start by converting to
60649  # unix format.
60650  path="$POTENTIAL_FREETYPE_LIB_PATH"
60651  new_path=`$CYGPATH -u "$path"`
60652
60653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60656  # "foo.exe" is OK but "foo" is an error.
60657  #
60658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60659  # It is also a way to make sure we got the proper file name for the real test later on.
60660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60661  if test "x$test_shortpath" = x; then
60662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60663$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60664    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60665  fi
60666
60667  # Call helper function which possibly converts this using DOS-style short mode.
60668  # If so, the updated path is stored in $new_path.
60669
60670  input_path="$new_path"
60671  # Check if we need to convert this using DOS-style short mode. If the path
60672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60673  # take no chances and rewrite it.
60674  # Note: m4 eats our [], so we need to use [ and ] instead.
60675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60676  if test "x$has_forbidden_chars" != x; then
60677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60681      # Going to short mode and back again did indeed matter. Since short mode is
60682      # case insensitive, let's make it lowercase to improve readability.
60683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60684      # Now convert it back to Unix-style (cygpath)
60685      input_path=`$CYGPATH -u "$shortmode_path"`
60686      new_path="$input_path"
60687    fi
60688  fi
60689
60690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60691  if test "x$test_cygdrive_prefix" = x; then
60692    # As a simple fix, exclude /usr/bin since it's not a real path.
60693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60695      # a path prefixed by /cygdrive for fixpath to work.
60696      new_path="$CYGWIN_ROOT_PATH$input_path"
60697    fi
60698  fi
60699
60700
60701  if test "x$path" != "x$new_path"; then
60702    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60704$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60705  fi
60706
60707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60708
60709  path="$POTENTIAL_FREETYPE_LIB_PATH"
60710  has_colon=`$ECHO $path | $GREP ^.:`
60711  new_path="$path"
60712  if test "x$has_colon" = x; then
60713    # Not in mixed or Windows style, start by that.
60714    new_path=`cmd //c echo $path`
60715  fi
60716
60717
60718  input_path="$new_path"
60719  # Check if we need to convert this using DOS-style short mode. If the path
60720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60721  # take no chances and rewrite it.
60722  # Note: m4 eats our [], so we need to use [ and ] instead.
60723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60724  if test "x$has_forbidden_chars" != x; then
60725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60727  fi
60728
60729
60730  windows_path="$new_path"
60731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60732    unix_path=`$CYGPATH -u "$windows_path"`
60733    new_path="$unix_path"
60734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60736    new_path="$unix_path"
60737  fi
60738
60739  if test "x$path" != "x$new_path"; then
60740    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60742$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60743  fi
60744
60745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60747
60748    else
60749      # We're on a unix platform. Hooray! :)
60750      path="$POTENTIAL_FREETYPE_LIB_PATH"
60751      has_space=`$ECHO "$path" | $GREP " "`
60752      if test "x$has_space" != x; then
60753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60754$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60755        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60756      fi
60757
60758      # Use eval to expand a potential ~
60759      eval path="$path"
60760      if test ! -f "$path" && test ! -d "$path"; then
60761        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60762      fi
60763
60764      if test -d "$path"; then
60765        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60766      else
60767        dir="`$DIRNAME "$path"`"
60768        base="`$BASENAME "$path"`"
60769        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60770      fi
60771    fi
60772  fi
60773
60774
60775    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60777$as_echo_n "checking for freetype includes... " >&6; }
60778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60779$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60780    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60781    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60782$as_echo_n "checking for freetype libraries... " >&6; }
60783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60784$as_echo "$FREETYPE_LIB_PATH" >&6; }
60785  fi
60786
60787          fi
60788
60789          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60790            if test "x$FOUND_FREETYPE" != xyes; then
60791              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60792              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60793
60794  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60795  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60796  METHOD="well-known location"
60797
60798  # Let's start with an optimistic view of the world :-)
60799  FOUND_FREETYPE=yes
60800
60801  # First look for the canonical freetype main include file ft2build.h.
60802  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60803    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60804    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60805    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60806      # Fail.
60807      FOUND_FREETYPE=no
60808    fi
60809  fi
60810
60811  if test "x$FOUND_FREETYPE" = xyes; then
60812    # Include file found, let's continue the sanity check.
60813    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60814$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60815
60816    # Reset to default value
60817    FREETYPE_BASE_NAME=freetype
60818    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60819    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60820      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60821          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60822        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60823        # for the .6 version explicitly.
60824        FREETYPE_BASE_NAME=freetype.6
60825        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60826        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60827$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60828      else
60829        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60830$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60831        FOUND_FREETYPE=no
60832      fi
60833    else
60834      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60835        # On Windows, we will need both .lib and .dll file.
60836        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60837          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60838$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60839          FOUND_FREETYPE=no
60840        fi
60841      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60842          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60843        # Found lib in isa dir, use that instead.
60844        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60845        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60846$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60847      fi
60848    fi
60849  fi
60850
60851  if test "x$FOUND_FREETYPE" = xyes; then
60852
60853  # Only process if variable expands to non-empty
60854
60855  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60857
60858  # Input might be given as Windows format, start by converting to
60859  # unix format.
60860  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60861  new_path=`$CYGPATH -u "$path"`
60862
60863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60866  # "foo.exe" is OK but "foo" is an error.
60867  #
60868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60869  # It is also a way to make sure we got the proper file name for the real test later on.
60870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60871  if test "x$test_shortpath" = x; then
60872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60873$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60874    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60875  fi
60876
60877  # Call helper function which possibly converts this using DOS-style short mode.
60878  # If so, the updated path is stored in $new_path.
60879
60880  input_path="$new_path"
60881  # Check if we need to convert this using DOS-style short mode. If the path
60882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60883  # take no chances and rewrite it.
60884  # Note: m4 eats our [], so we need to use [ and ] instead.
60885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60886  if test "x$has_forbidden_chars" != x; then
60887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60891      # Going to short mode and back again did indeed matter. Since short mode is
60892      # case insensitive, let's make it lowercase to improve readability.
60893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60894      # Now convert it back to Unix-style (cygpath)
60895      input_path=`$CYGPATH -u "$shortmode_path"`
60896      new_path="$input_path"
60897    fi
60898  fi
60899
60900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60901  if test "x$test_cygdrive_prefix" = x; then
60902    # As a simple fix, exclude /usr/bin since it's not a real path.
60903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60905      # a path prefixed by /cygdrive for fixpath to work.
60906      new_path="$CYGWIN_ROOT_PATH$input_path"
60907    fi
60908  fi
60909
60910
60911  if test "x$path" != "x$new_path"; then
60912    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60915  fi
60916
60917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60918
60919  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60920  has_colon=`$ECHO $path | $GREP ^.:`
60921  new_path="$path"
60922  if test "x$has_colon" = x; then
60923    # Not in mixed or Windows style, start by that.
60924    new_path=`cmd //c echo $path`
60925  fi
60926
60927
60928  input_path="$new_path"
60929  # Check if we need to convert this using DOS-style short mode. If the path
60930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60931  # take no chances and rewrite it.
60932  # Note: m4 eats our [], so we need to use [ and ] instead.
60933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60934  if test "x$has_forbidden_chars" != x; then
60935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60937  fi
60938
60939
60940  windows_path="$new_path"
60941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60942    unix_path=`$CYGPATH -u "$windows_path"`
60943    new_path="$unix_path"
60944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60946    new_path="$unix_path"
60947  fi
60948
60949  if test "x$path" != "x$new_path"; then
60950    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60952$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60953  fi
60954
60955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60957
60958    else
60959      # We're on a unix platform. Hooray! :)
60960      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60961      has_space=`$ECHO "$path" | $GREP " "`
60962      if test "x$has_space" != x; then
60963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60966      fi
60967
60968      # Use eval to expand a potential ~
60969      eval path="$path"
60970      if test ! -f "$path" && test ! -d "$path"; then
60971        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60972      fi
60973
60974      if test -d "$path"; then
60975        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60976      else
60977        dir="`$DIRNAME "$path"`"
60978        base="`$BASENAME "$path"`"
60979        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60980      fi
60981    fi
60982  fi
60983
60984
60985  # Only process if variable expands to non-empty
60986
60987  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60989
60990  # Input might be given as Windows format, start by converting to
60991  # unix format.
60992  path="$POTENTIAL_FREETYPE_LIB_PATH"
60993  new_path=`$CYGPATH -u "$path"`
60994
60995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60998  # "foo.exe" is OK but "foo" is an error.
60999  #
61000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61001  # It is also a way to make sure we got the proper file name for the real test later on.
61002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61003  if test "x$test_shortpath" = x; then
61004    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61005$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61006    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61007  fi
61008
61009  # Call helper function which possibly converts this using DOS-style short mode.
61010  # If so, the updated path is stored in $new_path.
61011
61012  input_path="$new_path"
61013  # Check if we need to convert this using DOS-style short mode. If the path
61014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61015  # take no chances and rewrite it.
61016  # Note: m4 eats our [], so we need to use [ and ] instead.
61017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61018  if test "x$has_forbidden_chars" != x; then
61019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61023      # Going to short mode and back again did indeed matter. Since short mode is
61024      # case insensitive, let's make it lowercase to improve readability.
61025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61026      # Now convert it back to Unix-style (cygpath)
61027      input_path=`$CYGPATH -u "$shortmode_path"`
61028      new_path="$input_path"
61029    fi
61030  fi
61031
61032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61033  if test "x$test_cygdrive_prefix" = x; then
61034    # As a simple fix, exclude /usr/bin since it's not a real path.
61035    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61037      # a path prefixed by /cygdrive for fixpath to work.
61038      new_path="$CYGWIN_ROOT_PATH$input_path"
61039    fi
61040  fi
61041
61042
61043  if test "x$path" != "x$new_path"; then
61044    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61046$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61047  fi
61048
61049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61050
61051  path="$POTENTIAL_FREETYPE_LIB_PATH"
61052  has_colon=`$ECHO $path | $GREP ^.:`
61053  new_path="$path"
61054  if test "x$has_colon" = x; then
61055    # Not in mixed or Windows style, start by that.
61056    new_path=`cmd //c echo $path`
61057  fi
61058
61059
61060  input_path="$new_path"
61061  # Check if we need to convert this using DOS-style short mode. If the path
61062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61063  # take no chances and rewrite it.
61064  # Note: m4 eats our [], so we need to use [ and ] instead.
61065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61066  if test "x$has_forbidden_chars" != x; then
61067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61069  fi
61070
61071
61072  windows_path="$new_path"
61073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61074    unix_path=`$CYGPATH -u "$windows_path"`
61075    new_path="$unix_path"
61076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61078    new_path="$unix_path"
61079  fi
61080
61081  if test "x$path" != "x$new_path"; then
61082    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61084$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61085  fi
61086
61087  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61088  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61089
61090    else
61091      # We're on a unix platform. Hooray! :)
61092      path="$POTENTIAL_FREETYPE_LIB_PATH"
61093      has_space=`$ECHO "$path" | $GREP " "`
61094      if test "x$has_space" != x; then
61095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61096$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61097        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61098      fi
61099
61100      # Use eval to expand a potential ~
61101      eval path="$path"
61102      if test ! -f "$path" && test ! -d "$path"; then
61103        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61104      fi
61105
61106      if test -d "$path"; then
61107        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61108      else
61109        dir="`$DIRNAME "$path"`"
61110        base="`$BASENAME "$path"`"
61111        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61112      fi
61113    fi
61114  fi
61115
61116
61117    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61119$as_echo_n "checking for freetype includes... " >&6; }
61120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61121$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61122    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61124$as_echo_n "checking for freetype libraries... " >&6; }
61125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61126$as_echo "$FREETYPE_LIB_PATH" >&6; }
61127  fi
61128
61129            fi
61130          fi
61131
61132          if test "x$FOUND_FREETYPE" != xyes; then
61133            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
61134
61135  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61136  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61137  METHOD="well-known location"
61138
61139  # Let's start with an optimistic view of the world :-)
61140  FOUND_FREETYPE=yes
61141
61142  # First look for the canonical freetype main include file ft2build.h.
61143  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61144    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61145    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61146    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61147      # Fail.
61148      FOUND_FREETYPE=no
61149    fi
61150  fi
61151
61152  if test "x$FOUND_FREETYPE" = xyes; then
61153    # Include file found, let's continue the sanity check.
61154    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61155$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61156
61157    # Reset to default value
61158    FREETYPE_BASE_NAME=freetype
61159    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61160    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61161      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61162          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61163        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61164        # for the .6 version explicitly.
61165        FREETYPE_BASE_NAME=freetype.6
61166        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61167        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61168$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61169      else
61170        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61171$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61172        FOUND_FREETYPE=no
61173      fi
61174    else
61175      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61176        # On Windows, we will need both .lib and .dll file.
61177        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61178          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61179$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61180          FOUND_FREETYPE=no
61181        fi
61182      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61183          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61184        # Found lib in isa dir, use that instead.
61185        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61186        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61187$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61188      fi
61189    fi
61190  fi
61191
61192  if test "x$FOUND_FREETYPE" = xyes; then
61193
61194  # Only process if variable expands to non-empty
61195
61196  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61197    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61198
61199  # Input might be given as Windows format, start by converting to
61200  # unix format.
61201  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61202  new_path=`$CYGPATH -u "$path"`
61203
61204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61207  # "foo.exe" is OK but "foo" is an error.
61208  #
61209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61210  # It is also a way to make sure we got the proper file name for the real test later on.
61211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61212  if test "x$test_shortpath" = x; then
61213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61214$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61215    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61216  fi
61217
61218  # Call helper function which possibly converts this using DOS-style short mode.
61219  # If so, the updated path is stored in $new_path.
61220
61221  input_path="$new_path"
61222  # Check if we need to convert this using DOS-style short mode. If the path
61223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61224  # take no chances and rewrite it.
61225  # Note: m4 eats our [], so we need to use [ and ] instead.
61226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61227  if test "x$has_forbidden_chars" != x; then
61228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61232      # Going to short mode and back again did indeed matter. Since short mode is
61233      # case insensitive, let's make it lowercase to improve readability.
61234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61235      # Now convert it back to Unix-style (cygpath)
61236      input_path=`$CYGPATH -u "$shortmode_path"`
61237      new_path="$input_path"
61238    fi
61239  fi
61240
61241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61242  if test "x$test_cygdrive_prefix" = x; then
61243    # As a simple fix, exclude /usr/bin since it's not a real path.
61244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61246      # a path prefixed by /cygdrive for fixpath to work.
61247      new_path="$CYGWIN_ROOT_PATH$input_path"
61248    fi
61249  fi
61250
61251
61252  if test "x$path" != "x$new_path"; then
61253    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61255$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61256  fi
61257
61258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61259
61260  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61261  has_colon=`$ECHO $path | $GREP ^.:`
61262  new_path="$path"
61263  if test "x$has_colon" = x; then
61264    # Not in mixed or Windows style, start by that.
61265    new_path=`cmd //c echo $path`
61266  fi
61267
61268
61269  input_path="$new_path"
61270  # Check if we need to convert this using DOS-style short mode. If the path
61271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61272  # take no chances and rewrite it.
61273  # Note: m4 eats our [], so we need to use [ and ] instead.
61274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61275  if test "x$has_forbidden_chars" != x; then
61276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61278  fi
61279
61280
61281  windows_path="$new_path"
61282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61283    unix_path=`$CYGPATH -u "$windows_path"`
61284    new_path="$unix_path"
61285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61287    new_path="$unix_path"
61288  fi
61289
61290  if test "x$path" != "x$new_path"; then
61291    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61293$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61294  fi
61295
61296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61298
61299    else
61300      # We're on a unix platform. Hooray! :)
61301      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61302      has_space=`$ECHO "$path" | $GREP " "`
61303      if test "x$has_space" != x; then
61304        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61305$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61306        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61307      fi
61308
61309      # Use eval to expand a potential ~
61310      eval path="$path"
61311      if test ! -f "$path" && test ! -d "$path"; then
61312        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61313      fi
61314
61315      if test -d "$path"; then
61316        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61317      else
61318        dir="`$DIRNAME "$path"`"
61319        base="`$BASENAME "$path"`"
61320        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61321      fi
61322    fi
61323  fi
61324
61325
61326  # Only process if variable expands to non-empty
61327
61328  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61329    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61330
61331  # Input might be given as Windows format, start by converting to
61332  # unix format.
61333  path="$POTENTIAL_FREETYPE_LIB_PATH"
61334  new_path=`$CYGPATH -u "$path"`
61335
61336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61339  # "foo.exe" is OK but "foo" is an error.
61340  #
61341  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61342  # It is also a way to make sure we got the proper file name for the real test later on.
61343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61344  if test "x$test_shortpath" = x; then
61345    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61346$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61347    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61348  fi
61349
61350  # Call helper function which possibly converts this using DOS-style short mode.
61351  # If so, the updated path is stored in $new_path.
61352
61353  input_path="$new_path"
61354  # Check if we need to convert this using DOS-style short mode. If the path
61355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61356  # take no chances and rewrite it.
61357  # Note: m4 eats our [], so we need to use [ and ] instead.
61358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61359  if test "x$has_forbidden_chars" != x; then
61360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61364      # Going to short mode and back again did indeed matter. Since short mode is
61365      # case insensitive, let's make it lowercase to improve readability.
61366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61367      # Now convert it back to Unix-style (cygpath)
61368      input_path=`$CYGPATH -u "$shortmode_path"`
61369      new_path="$input_path"
61370    fi
61371  fi
61372
61373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61374  if test "x$test_cygdrive_prefix" = x; then
61375    # As a simple fix, exclude /usr/bin since it's not a real path.
61376    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61378      # a path prefixed by /cygdrive for fixpath to work.
61379      new_path="$CYGWIN_ROOT_PATH$input_path"
61380    fi
61381  fi
61382
61383
61384  if test "x$path" != "x$new_path"; then
61385    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61387$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61388  fi
61389
61390    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61391
61392  path="$POTENTIAL_FREETYPE_LIB_PATH"
61393  has_colon=`$ECHO $path | $GREP ^.:`
61394  new_path="$path"
61395  if test "x$has_colon" = x; then
61396    # Not in mixed or Windows style, start by that.
61397    new_path=`cmd //c echo $path`
61398  fi
61399
61400
61401  input_path="$new_path"
61402  # Check if we need to convert this using DOS-style short mode. If the path
61403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61404  # take no chances and rewrite it.
61405  # Note: m4 eats our [], so we need to use [ and ] instead.
61406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61407  if test "x$has_forbidden_chars" != x; then
61408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61410  fi
61411
61412
61413  windows_path="$new_path"
61414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61415    unix_path=`$CYGPATH -u "$windows_path"`
61416    new_path="$unix_path"
61417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61419    new_path="$unix_path"
61420  fi
61421
61422  if test "x$path" != "x$new_path"; then
61423    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61425$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61426  fi
61427
61428  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61429  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61430
61431    else
61432      # We're on a unix platform. Hooray! :)
61433      path="$POTENTIAL_FREETYPE_LIB_PATH"
61434      has_space=`$ECHO "$path" | $GREP " "`
61435      if test "x$has_space" != x; then
61436        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61437$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61438        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61439      fi
61440
61441      # Use eval to expand a potential ~
61442      eval path="$path"
61443      if test ! -f "$path" && test ! -d "$path"; then
61444        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61445      fi
61446
61447      if test -d "$path"; then
61448        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61449      else
61450        dir="`$DIRNAME "$path"`"
61451        base="`$BASENAME "$path"`"
61452        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61453      fi
61454    fi
61455  fi
61456
61457
61458    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61460$as_echo_n "checking for freetype includes... " >&6; }
61461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61462$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61463    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61465$as_echo_n "checking for freetype libraries... " >&6; }
61466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61467$as_echo "$FREETYPE_LIB_PATH" >&6; }
61468  fi
61469
61470          fi
61471
61472          if test "x$FOUND_FREETYPE" != xyes; then
61473            FREETYPE_BASE_DIR="$SYSROOT/usr"
61474            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61475
61476  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61477  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61478  METHOD="well-known location"
61479
61480  # Let's start with an optimistic view of the world :-)
61481  FOUND_FREETYPE=yes
61482
61483  # First look for the canonical freetype main include file ft2build.h.
61484  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61485    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61486    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61487    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61488      # Fail.
61489      FOUND_FREETYPE=no
61490    fi
61491  fi
61492
61493  if test "x$FOUND_FREETYPE" = xyes; then
61494    # Include file found, let's continue the sanity check.
61495    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61496$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61497
61498    # Reset to default value
61499    FREETYPE_BASE_NAME=freetype
61500    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61501    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61502      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61503          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61504        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61505        # for the .6 version explicitly.
61506        FREETYPE_BASE_NAME=freetype.6
61507        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61508        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61509$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61510      else
61511        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61512$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61513        FOUND_FREETYPE=no
61514      fi
61515    else
61516      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61517        # On Windows, we will need both .lib and .dll file.
61518        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61519          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61520$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61521          FOUND_FREETYPE=no
61522        fi
61523      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61524          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61525        # Found lib in isa dir, use that instead.
61526        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61527        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61528$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61529      fi
61530    fi
61531  fi
61532
61533  if test "x$FOUND_FREETYPE" = xyes; then
61534
61535  # Only process if variable expands to non-empty
61536
61537  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61539
61540  # Input might be given as Windows format, start by converting to
61541  # unix format.
61542  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61543  new_path=`$CYGPATH -u "$path"`
61544
61545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61548  # "foo.exe" is OK but "foo" is an error.
61549  #
61550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61551  # It is also a way to make sure we got the proper file name for the real test later on.
61552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61553  if test "x$test_shortpath" = x; then
61554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61555$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61556    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61557  fi
61558
61559  # Call helper function which possibly converts this using DOS-style short mode.
61560  # If so, the updated path is stored in $new_path.
61561
61562  input_path="$new_path"
61563  # Check if we need to convert this using DOS-style short mode. If the path
61564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61565  # take no chances and rewrite it.
61566  # Note: m4 eats our [], so we need to use [ and ] instead.
61567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61568  if test "x$has_forbidden_chars" != x; then
61569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61573      # Going to short mode and back again did indeed matter. Since short mode is
61574      # case insensitive, let's make it lowercase to improve readability.
61575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61576      # Now convert it back to Unix-style (cygpath)
61577      input_path=`$CYGPATH -u "$shortmode_path"`
61578      new_path="$input_path"
61579    fi
61580  fi
61581
61582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61583  if test "x$test_cygdrive_prefix" = x; then
61584    # As a simple fix, exclude /usr/bin since it's not a real path.
61585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61587      # a path prefixed by /cygdrive for fixpath to work.
61588      new_path="$CYGWIN_ROOT_PATH$input_path"
61589    fi
61590  fi
61591
61592
61593  if test "x$path" != "x$new_path"; then
61594    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61596$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61597  fi
61598
61599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61600
61601  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61602  has_colon=`$ECHO $path | $GREP ^.:`
61603  new_path="$path"
61604  if test "x$has_colon" = x; then
61605    # Not in mixed or Windows style, start by that.
61606    new_path=`cmd //c echo $path`
61607  fi
61608
61609
61610  input_path="$new_path"
61611  # Check if we need to convert this using DOS-style short mode. If the path
61612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61613  # take no chances and rewrite it.
61614  # Note: m4 eats our [], so we need to use [ and ] instead.
61615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61616  if test "x$has_forbidden_chars" != x; then
61617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61619  fi
61620
61621
61622  windows_path="$new_path"
61623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61624    unix_path=`$CYGPATH -u "$windows_path"`
61625    new_path="$unix_path"
61626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61628    new_path="$unix_path"
61629  fi
61630
61631  if test "x$path" != "x$new_path"; then
61632    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61634$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61635  fi
61636
61637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61639
61640    else
61641      # We're on a unix platform. Hooray! :)
61642      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61643      has_space=`$ECHO "$path" | $GREP " "`
61644      if test "x$has_space" != x; then
61645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61646$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61647        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61648      fi
61649
61650      # Use eval to expand a potential ~
61651      eval path="$path"
61652      if test ! -f "$path" && test ! -d "$path"; then
61653        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61654      fi
61655
61656      if test -d "$path"; then
61657        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61658      else
61659        dir="`$DIRNAME "$path"`"
61660        base="`$BASENAME "$path"`"
61661        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61662      fi
61663    fi
61664  fi
61665
61666
61667  # Only process if variable expands to non-empty
61668
61669  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61671
61672  # Input might be given as Windows format, start by converting to
61673  # unix format.
61674  path="$POTENTIAL_FREETYPE_LIB_PATH"
61675  new_path=`$CYGPATH -u "$path"`
61676
61677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61680  # "foo.exe" is OK but "foo" is an error.
61681  #
61682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61683  # It is also a way to make sure we got the proper file name for the real test later on.
61684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61685  if test "x$test_shortpath" = x; then
61686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61687$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61688    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61689  fi
61690
61691  # Call helper function which possibly converts this using DOS-style short mode.
61692  # If so, the updated path is stored in $new_path.
61693
61694  input_path="$new_path"
61695  # Check if we need to convert this using DOS-style short mode. If the path
61696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61697  # take no chances and rewrite it.
61698  # Note: m4 eats our [], so we need to use [ and ] instead.
61699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61700  if test "x$has_forbidden_chars" != x; then
61701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61705      # Going to short mode and back again did indeed matter. Since short mode is
61706      # case insensitive, let's make it lowercase to improve readability.
61707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61708      # Now convert it back to Unix-style (cygpath)
61709      input_path=`$CYGPATH -u "$shortmode_path"`
61710      new_path="$input_path"
61711    fi
61712  fi
61713
61714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61715  if test "x$test_cygdrive_prefix" = x; then
61716    # As a simple fix, exclude /usr/bin since it's not a real path.
61717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61719      # a path prefixed by /cygdrive for fixpath to work.
61720      new_path="$CYGWIN_ROOT_PATH$input_path"
61721    fi
61722  fi
61723
61724
61725  if test "x$path" != "x$new_path"; then
61726    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61728$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61729  fi
61730
61731    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61732
61733  path="$POTENTIAL_FREETYPE_LIB_PATH"
61734  has_colon=`$ECHO $path | $GREP ^.:`
61735  new_path="$path"
61736  if test "x$has_colon" = x; then
61737    # Not in mixed or Windows style, start by that.
61738    new_path=`cmd //c echo $path`
61739  fi
61740
61741
61742  input_path="$new_path"
61743  # Check if we need to convert this using DOS-style short mode. If the path
61744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61745  # take no chances and rewrite it.
61746  # Note: m4 eats our [], so we need to use [ and ] instead.
61747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61748  if test "x$has_forbidden_chars" != x; then
61749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61751  fi
61752
61753
61754  windows_path="$new_path"
61755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61756    unix_path=`$CYGPATH -u "$windows_path"`
61757    new_path="$unix_path"
61758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61760    new_path="$unix_path"
61761  fi
61762
61763  if test "x$path" != "x$new_path"; then
61764    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61766$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61767  fi
61768
61769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61771
61772    else
61773      # We're on a unix platform. Hooray! :)
61774      path="$POTENTIAL_FREETYPE_LIB_PATH"
61775      has_space=`$ECHO "$path" | $GREP " "`
61776      if test "x$has_space" != x; then
61777        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61778$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61779        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61780      fi
61781
61782      # Use eval to expand a potential ~
61783      eval path="$path"
61784      if test ! -f "$path" && test ! -d "$path"; then
61785        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61786      fi
61787
61788      if test -d "$path"; then
61789        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61790      else
61791        dir="`$DIRNAME "$path"`"
61792        base="`$BASENAME "$path"`"
61793        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61794      fi
61795    fi
61796  fi
61797
61798
61799    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61801$as_echo_n "checking for freetype includes... " >&6; }
61802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61803$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61804    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61806$as_echo_n "checking for freetype libraries... " >&6; }
61807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61808$as_echo "$FREETYPE_LIB_PATH" >&6; }
61809  fi
61810
61811            else
61812
61813  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61814  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61815  METHOD="well-known location"
61816
61817  # Let's start with an optimistic view of the world :-)
61818  FOUND_FREETYPE=yes
61819
61820  # First look for the canonical freetype main include file ft2build.h.
61821  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61822    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61823    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61824    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61825      # Fail.
61826      FOUND_FREETYPE=no
61827    fi
61828  fi
61829
61830  if test "x$FOUND_FREETYPE" = xyes; then
61831    # Include file found, let's continue the sanity check.
61832    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61833$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61834
61835    # Reset to default value
61836    FREETYPE_BASE_NAME=freetype
61837    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61838    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61839      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61840          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61841        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61842        # for the .6 version explicitly.
61843        FREETYPE_BASE_NAME=freetype.6
61844        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61845        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61846$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61847      else
61848        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61849$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61850        FOUND_FREETYPE=no
61851      fi
61852    else
61853      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61854        # On Windows, we will need both .lib and .dll file.
61855        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61856          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61857$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61858          FOUND_FREETYPE=no
61859        fi
61860      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61861          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61862        # Found lib in isa dir, use that instead.
61863        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61864        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61865$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61866      fi
61867    fi
61868  fi
61869
61870  if test "x$FOUND_FREETYPE" = xyes; then
61871
61872  # Only process if variable expands to non-empty
61873
61874  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61876
61877  # Input might be given as Windows format, start by converting to
61878  # unix format.
61879  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61880  new_path=`$CYGPATH -u "$path"`
61881
61882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61885  # "foo.exe" is OK but "foo" is an error.
61886  #
61887  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61888  # It is also a way to make sure we got the proper file name for the real test later on.
61889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61890  if test "x$test_shortpath" = x; then
61891    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61892$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61893    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61894  fi
61895
61896  # Call helper function which possibly converts this using DOS-style short mode.
61897  # If so, the updated path is stored in $new_path.
61898
61899  input_path="$new_path"
61900  # Check if we need to convert this using DOS-style short mode. If the path
61901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61902  # take no chances and rewrite it.
61903  # Note: m4 eats our [], so we need to use [ and ] instead.
61904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61905  if test "x$has_forbidden_chars" != x; then
61906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61910      # Going to short mode and back again did indeed matter. Since short mode is
61911      # case insensitive, let's make it lowercase to improve readability.
61912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61913      # Now convert it back to Unix-style (cygpath)
61914      input_path=`$CYGPATH -u "$shortmode_path"`
61915      new_path="$input_path"
61916    fi
61917  fi
61918
61919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61920  if test "x$test_cygdrive_prefix" = x; then
61921    # As a simple fix, exclude /usr/bin since it's not a real path.
61922    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61924      # a path prefixed by /cygdrive for fixpath to work.
61925      new_path="$CYGWIN_ROOT_PATH$input_path"
61926    fi
61927  fi
61928
61929
61930  if test "x$path" != "x$new_path"; then
61931    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61933$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61934  fi
61935
61936    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61937
61938  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61939  has_colon=`$ECHO $path | $GREP ^.:`
61940  new_path="$path"
61941  if test "x$has_colon" = x; then
61942    # Not in mixed or Windows style, start by that.
61943    new_path=`cmd //c echo $path`
61944  fi
61945
61946
61947  input_path="$new_path"
61948  # Check if we need to convert this using DOS-style short mode. If the path
61949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61950  # take no chances and rewrite it.
61951  # Note: m4 eats our [], so we need to use [ and ] instead.
61952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61953  if test "x$has_forbidden_chars" != x; then
61954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61955    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61956  fi
61957
61958
61959  windows_path="$new_path"
61960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61961    unix_path=`$CYGPATH -u "$windows_path"`
61962    new_path="$unix_path"
61963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61965    new_path="$unix_path"
61966  fi
61967
61968  if test "x$path" != "x$new_path"; then
61969    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61971$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61972  fi
61973
61974  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61975  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61976
61977    else
61978      # We're on a unix platform. Hooray! :)
61979      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61980      has_space=`$ECHO "$path" | $GREP " "`
61981      if test "x$has_space" != x; then
61982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61983$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61984        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61985      fi
61986
61987      # Use eval to expand a potential ~
61988      eval path="$path"
61989      if test ! -f "$path" && test ! -d "$path"; then
61990        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61991      fi
61992
61993      if test -d "$path"; then
61994        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61995      else
61996        dir="`$DIRNAME "$path"`"
61997        base="`$BASENAME "$path"`"
61998        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61999      fi
62000    fi
62001  fi
62002
62003
62004  # Only process if variable expands to non-empty
62005
62006  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62007    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62008
62009  # Input might be given as Windows format, start by converting to
62010  # unix format.
62011  path="$POTENTIAL_FREETYPE_LIB_PATH"
62012  new_path=`$CYGPATH -u "$path"`
62013
62014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62017  # "foo.exe" is OK but "foo" is an error.
62018  #
62019  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62020  # It is also a way to make sure we got the proper file name for the real test later on.
62021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62022  if test "x$test_shortpath" = x; then
62023    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62024$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62025    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62026  fi
62027
62028  # Call helper function which possibly converts this using DOS-style short mode.
62029  # If so, the updated path is stored in $new_path.
62030
62031  input_path="$new_path"
62032  # Check if we need to convert this using DOS-style short mode. If the path
62033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62034  # take no chances and rewrite it.
62035  # Note: m4 eats our [], so we need to use [ and ] instead.
62036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62037  if test "x$has_forbidden_chars" != x; then
62038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62042      # Going to short mode and back again did indeed matter. Since short mode is
62043      # case insensitive, let's make it lowercase to improve readability.
62044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62045      # Now convert it back to Unix-style (cygpath)
62046      input_path=`$CYGPATH -u "$shortmode_path"`
62047      new_path="$input_path"
62048    fi
62049  fi
62050
62051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62052  if test "x$test_cygdrive_prefix" = x; then
62053    # As a simple fix, exclude /usr/bin since it's not a real path.
62054    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62056      # a path prefixed by /cygdrive for fixpath to work.
62057      new_path="$CYGWIN_ROOT_PATH$input_path"
62058    fi
62059  fi
62060
62061
62062  if test "x$path" != "x$new_path"; then
62063    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62065$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62066  fi
62067
62068    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62069
62070  path="$POTENTIAL_FREETYPE_LIB_PATH"
62071  has_colon=`$ECHO $path | $GREP ^.:`
62072  new_path="$path"
62073  if test "x$has_colon" = x; then
62074    # Not in mixed or Windows style, start by that.
62075    new_path=`cmd //c echo $path`
62076  fi
62077
62078
62079  input_path="$new_path"
62080  # Check if we need to convert this using DOS-style short mode. If the path
62081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62082  # take no chances and rewrite it.
62083  # Note: m4 eats our [], so we need to use [ and ] instead.
62084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62085  if test "x$has_forbidden_chars" != x; then
62086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62088  fi
62089
62090
62091  windows_path="$new_path"
62092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62093    unix_path=`$CYGPATH -u "$windows_path"`
62094    new_path="$unix_path"
62095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62097    new_path="$unix_path"
62098  fi
62099
62100  if test "x$path" != "x$new_path"; then
62101    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62103$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62104  fi
62105
62106  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62107  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62108
62109    else
62110      # We're on a unix platform. Hooray! :)
62111      path="$POTENTIAL_FREETYPE_LIB_PATH"
62112      has_space=`$ECHO "$path" | $GREP " "`
62113      if test "x$has_space" != x; then
62114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62115$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62116        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62117      fi
62118
62119      # Use eval to expand a potential ~
62120      eval path="$path"
62121      if test ! -f "$path" && test ! -d "$path"; then
62122        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62123      fi
62124
62125      if test -d "$path"; then
62126        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62127      else
62128        dir="`$DIRNAME "$path"`"
62129        base="`$BASENAME "$path"`"
62130        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62131      fi
62132    fi
62133  fi
62134
62135
62136    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62138$as_echo_n "checking for freetype includes... " >&6; }
62139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62140$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62141    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62143$as_echo_n "checking for freetype libraries... " >&6; }
62144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62145$as_echo "$FREETYPE_LIB_PATH" >&6; }
62146  fi
62147
62148              if test "x$FOUND_FREETYPE" != xyes; then
62149
62150  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62151  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62152  METHOD="well-known location"
62153
62154  # Let's start with an optimistic view of the world :-)
62155  FOUND_FREETYPE=yes
62156
62157  # First look for the canonical freetype main include file ft2build.h.
62158  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62159    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62160    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62161    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62162      # Fail.
62163      FOUND_FREETYPE=no
62164    fi
62165  fi
62166
62167  if test "x$FOUND_FREETYPE" = xyes; then
62168    # Include file found, let's continue the sanity check.
62169    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62170$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62171
62172    # Reset to default value
62173    FREETYPE_BASE_NAME=freetype
62174    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62175    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62176      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62177          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62178        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62179        # for the .6 version explicitly.
62180        FREETYPE_BASE_NAME=freetype.6
62181        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62182        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62183$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62184      else
62185        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62186$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62187        FOUND_FREETYPE=no
62188      fi
62189    else
62190      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62191        # On Windows, we will need both .lib and .dll file.
62192        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62193          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62194$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62195          FOUND_FREETYPE=no
62196        fi
62197      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62198          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62199        # Found lib in isa dir, use that instead.
62200        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62201        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62202$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62203      fi
62204    fi
62205  fi
62206
62207  if test "x$FOUND_FREETYPE" = xyes; then
62208
62209  # Only process if variable expands to non-empty
62210
62211  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62213
62214  # Input might be given as Windows format, start by converting to
62215  # unix format.
62216  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62217  new_path=`$CYGPATH -u "$path"`
62218
62219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62222  # "foo.exe" is OK but "foo" is an error.
62223  #
62224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62225  # It is also a way to make sure we got the proper file name for the real test later on.
62226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62227  if test "x$test_shortpath" = x; then
62228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62229$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62230    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62231  fi
62232
62233  # Call helper function which possibly converts this using DOS-style short mode.
62234  # If so, the updated path is stored in $new_path.
62235
62236  input_path="$new_path"
62237  # Check if we need to convert this using DOS-style short mode. If the path
62238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62239  # take no chances and rewrite it.
62240  # Note: m4 eats our [], so we need to use [ and ] instead.
62241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62242  if test "x$has_forbidden_chars" != x; then
62243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62247      # Going to short mode and back again did indeed matter. Since short mode is
62248      # case insensitive, let's make it lowercase to improve readability.
62249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62250      # Now convert it back to Unix-style (cygpath)
62251      input_path=`$CYGPATH -u "$shortmode_path"`
62252      new_path="$input_path"
62253    fi
62254  fi
62255
62256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62257  if test "x$test_cygdrive_prefix" = x; then
62258    # As a simple fix, exclude /usr/bin since it's not a real path.
62259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62261      # a path prefixed by /cygdrive for fixpath to work.
62262      new_path="$CYGWIN_ROOT_PATH$input_path"
62263    fi
62264  fi
62265
62266
62267  if test "x$path" != "x$new_path"; then
62268    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62270$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62271  fi
62272
62273    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62274
62275  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62276  has_colon=`$ECHO $path | $GREP ^.:`
62277  new_path="$path"
62278  if test "x$has_colon" = x; then
62279    # Not in mixed or Windows style, start by that.
62280    new_path=`cmd //c echo $path`
62281  fi
62282
62283
62284  input_path="$new_path"
62285  # Check if we need to convert this using DOS-style short mode. If the path
62286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62287  # take no chances and rewrite it.
62288  # Note: m4 eats our [], so we need to use [ and ] instead.
62289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62290  if test "x$has_forbidden_chars" != x; then
62291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62293  fi
62294
62295
62296  windows_path="$new_path"
62297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62298    unix_path=`$CYGPATH -u "$windows_path"`
62299    new_path="$unix_path"
62300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62302    new_path="$unix_path"
62303  fi
62304
62305  if test "x$path" != "x$new_path"; then
62306    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62308$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62309  fi
62310
62311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62313
62314    else
62315      # We're on a unix platform. Hooray! :)
62316      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62317      has_space=`$ECHO "$path" | $GREP " "`
62318      if test "x$has_space" != x; then
62319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62320$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62321        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62322      fi
62323
62324      # Use eval to expand a potential ~
62325      eval path="$path"
62326      if test ! -f "$path" && test ! -d "$path"; then
62327        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62328      fi
62329
62330      if test -d "$path"; then
62331        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62332      else
62333        dir="`$DIRNAME "$path"`"
62334        base="`$BASENAME "$path"`"
62335        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62336      fi
62337    fi
62338  fi
62339
62340
62341  # Only process if variable expands to non-empty
62342
62343  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62345
62346  # Input might be given as Windows format, start by converting to
62347  # unix format.
62348  path="$POTENTIAL_FREETYPE_LIB_PATH"
62349  new_path=`$CYGPATH -u "$path"`
62350
62351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62354  # "foo.exe" is OK but "foo" is an error.
62355  #
62356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62357  # It is also a way to make sure we got the proper file name for the real test later on.
62358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62359  if test "x$test_shortpath" = x; then
62360    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62361$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62362    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62363  fi
62364
62365  # Call helper function which possibly converts this using DOS-style short mode.
62366  # If so, the updated path is stored in $new_path.
62367
62368  input_path="$new_path"
62369  # Check if we need to convert this using DOS-style short mode. If the path
62370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62371  # take no chances and rewrite it.
62372  # Note: m4 eats our [], so we need to use [ and ] instead.
62373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62374  if test "x$has_forbidden_chars" != x; then
62375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62379      # Going to short mode and back again did indeed matter. Since short mode is
62380      # case insensitive, let's make it lowercase to improve readability.
62381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62382      # Now convert it back to Unix-style (cygpath)
62383      input_path=`$CYGPATH -u "$shortmode_path"`
62384      new_path="$input_path"
62385    fi
62386  fi
62387
62388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62389  if test "x$test_cygdrive_prefix" = x; then
62390    # As a simple fix, exclude /usr/bin since it's not a real path.
62391    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62393      # a path prefixed by /cygdrive for fixpath to work.
62394      new_path="$CYGWIN_ROOT_PATH$input_path"
62395    fi
62396  fi
62397
62398
62399  if test "x$path" != "x$new_path"; then
62400    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62402$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62403  fi
62404
62405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62406
62407  path="$POTENTIAL_FREETYPE_LIB_PATH"
62408  has_colon=`$ECHO $path | $GREP ^.:`
62409  new_path="$path"
62410  if test "x$has_colon" = x; then
62411    # Not in mixed or Windows style, start by that.
62412    new_path=`cmd //c echo $path`
62413  fi
62414
62415
62416  input_path="$new_path"
62417  # Check if we need to convert this using DOS-style short mode. If the path
62418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62419  # take no chances and rewrite it.
62420  # Note: m4 eats our [], so we need to use [ and ] instead.
62421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62422  if test "x$has_forbidden_chars" != x; then
62423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62425  fi
62426
62427
62428  windows_path="$new_path"
62429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62430    unix_path=`$CYGPATH -u "$windows_path"`
62431    new_path="$unix_path"
62432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62434    new_path="$unix_path"
62435  fi
62436
62437  if test "x$path" != "x$new_path"; then
62438    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62440$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62441  fi
62442
62443  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62444  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62445
62446    else
62447      # We're on a unix platform. Hooray! :)
62448      path="$POTENTIAL_FREETYPE_LIB_PATH"
62449      has_space=`$ECHO "$path" | $GREP " "`
62450      if test "x$has_space" != x; then
62451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62452$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62453        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62454      fi
62455
62456      # Use eval to expand a potential ~
62457      eval path="$path"
62458      if test ! -f "$path" && test ! -d "$path"; then
62459        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62460      fi
62461
62462      if test -d "$path"; then
62463        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62464      else
62465        dir="`$DIRNAME "$path"`"
62466        base="`$BASENAME "$path"`"
62467        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62468      fi
62469    fi
62470  fi
62471
62472
62473    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62475$as_echo_n "checking for freetype includes... " >&6; }
62476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62477$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62478    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62480$as_echo_n "checking for freetype libraries... " >&6; }
62481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62482$as_echo "$FREETYPE_LIB_PATH" >&6; }
62483  fi
62484
62485              fi
62486            fi
62487          fi
62488        fi
62489      fi # end check in well-known locations
62490
62491      if test "x$FOUND_FREETYPE" != xyes; then
62492
62493  # Print a helpful message on how to acquire the necessary build dependency.
62494  # freetype is the help tag: freetype, cups, alsa etc
62495  MISSING_DEPENDENCY=freetype
62496
62497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62498    cygwin_help $MISSING_DEPENDENCY
62499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62500    msys_help $MISSING_DEPENDENCY
62501  else
62502    PKGHANDLER_COMMAND=
62503
62504    case $PKGHANDLER in
62505      apt-get)
62506        apt_help     $MISSING_DEPENDENCY ;;
62507      yum)
62508        yum_help     $MISSING_DEPENDENCY ;;
62509      port)
62510        port_help    $MISSING_DEPENDENCY ;;
62511      pkgutil)
62512        pkgutil_help $MISSING_DEPENDENCY ;;
62513      pkgadd)
62514        pkgadd_help  $MISSING_DEPENDENCY ;;
62515    esac
62516
62517    if test "x$PKGHANDLER_COMMAND" != x; then
62518      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62519    fi
62520  fi
62521
62522        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62523      fi
62524    fi # end user specified settings
62525
62526    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62527    if test "x$FREETYPE_CFLAGS" = x; then
62528
62529  # Only process if variable expands to non-empty
62530
62531  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62533
62534  # Input might be given as Windows format, start by converting to
62535  # unix format.
62536  path="$FREETYPE_INCLUDE_PATH"
62537  new_path=`$CYGPATH -u "$path"`
62538
62539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62542  # "foo.exe" is OK but "foo" is an error.
62543  #
62544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62545  # It is also a way to make sure we got the proper file name for the real test later on.
62546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62547  if test "x$test_shortpath" = x; then
62548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62549$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62550    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62551  fi
62552
62553  # Call helper function which possibly converts this using DOS-style short mode.
62554  # If so, the updated path is stored in $new_path.
62555
62556  input_path="$new_path"
62557  # Check if we need to convert this using DOS-style short mode. If the path
62558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62559  # take no chances and rewrite it.
62560  # Note: m4 eats our [], so we need to use [ and ] instead.
62561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62562  if test "x$has_forbidden_chars" != x; then
62563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62567      # Going to short mode and back again did indeed matter. Since short mode is
62568      # case insensitive, let's make it lowercase to improve readability.
62569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62570      # Now convert it back to Unix-style (cygpath)
62571      input_path=`$CYGPATH -u "$shortmode_path"`
62572      new_path="$input_path"
62573    fi
62574  fi
62575
62576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62577  if test "x$test_cygdrive_prefix" = x; then
62578    # As a simple fix, exclude /usr/bin since it's not a real path.
62579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62581      # a path prefixed by /cygdrive for fixpath to work.
62582      new_path="$CYGWIN_ROOT_PATH$input_path"
62583    fi
62584  fi
62585
62586
62587  if test "x$path" != "x$new_path"; then
62588    FREETYPE_INCLUDE_PATH="$new_path"
62589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62590$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62591  fi
62592
62593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62594
62595  path="$FREETYPE_INCLUDE_PATH"
62596  has_colon=`$ECHO $path | $GREP ^.:`
62597  new_path="$path"
62598  if test "x$has_colon" = x; then
62599    # Not in mixed or Windows style, start by that.
62600    new_path=`cmd //c echo $path`
62601  fi
62602
62603
62604  input_path="$new_path"
62605  # Check if we need to convert this using DOS-style short mode. If the path
62606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62607  # take no chances and rewrite it.
62608  # Note: m4 eats our [], so we need to use [ and ] instead.
62609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62610  if test "x$has_forbidden_chars" != x; then
62611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62613  fi
62614
62615
62616  windows_path="$new_path"
62617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62618    unix_path=`$CYGPATH -u "$windows_path"`
62619    new_path="$unix_path"
62620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62622    new_path="$unix_path"
62623  fi
62624
62625  if test "x$path" != "x$new_path"; then
62626    FREETYPE_INCLUDE_PATH="$new_path"
62627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62628$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62629  fi
62630
62631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62633
62634    else
62635      # We're on a unix platform. Hooray! :)
62636      path="$FREETYPE_INCLUDE_PATH"
62637      has_space=`$ECHO "$path" | $GREP " "`
62638      if test "x$has_space" != x; then
62639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62640$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62641        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62642      fi
62643
62644      # Use eval to expand a potential ~
62645      eval path="$path"
62646      if test ! -f "$path" && test ! -d "$path"; then
62647        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62648      fi
62649
62650      if test -d "$path"; then
62651        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62652      else
62653        dir="`$DIRNAME "$path"`"
62654        base="`$BASENAME "$path"`"
62655        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62656      fi
62657    fi
62658  fi
62659
62660      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62661        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62662      else
62663        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62664      fi
62665    fi
62666
62667    if test "x$FREETYPE_LIBS" = x; then
62668
62669  # Only process if variable expands to non-empty
62670
62671  if test "x$FREETYPE_LIB_PATH" != x; then
62672    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62673
62674  # Input might be given as Windows format, start by converting to
62675  # unix format.
62676  path="$FREETYPE_LIB_PATH"
62677  new_path=`$CYGPATH -u "$path"`
62678
62679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62682  # "foo.exe" is OK but "foo" is an error.
62683  #
62684  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62685  # It is also a way to make sure we got the proper file name for the real test later on.
62686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62687  if test "x$test_shortpath" = x; then
62688    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62689$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62690    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62691  fi
62692
62693  # Call helper function which possibly converts this using DOS-style short mode.
62694  # If so, the updated path is stored in $new_path.
62695
62696  input_path="$new_path"
62697  # Check if we need to convert this using DOS-style short mode. If the path
62698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62699  # take no chances and rewrite it.
62700  # Note: m4 eats our [], so we need to use [ and ] instead.
62701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62702  if test "x$has_forbidden_chars" != x; then
62703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62707      # Going to short mode and back again did indeed matter. Since short mode is
62708      # case insensitive, let's make it lowercase to improve readability.
62709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62710      # Now convert it back to Unix-style (cygpath)
62711      input_path=`$CYGPATH -u "$shortmode_path"`
62712      new_path="$input_path"
62713    fi
62714  fi
62715
62716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62717  if test "x$test_cygdrive_prefix" = x; then
62718    # As a simple fix, exclude /usr/bin since it's not a real path.
62719    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62721      # a path prefixed by /cygdrive for fixpath to work.
62722      new_path="$CYGWIN_ROOT_PATH$input_path"
62723    fi
62724  fi
62725
62726
62727  if test "x$path" != "x$new_path"; then
62728    FREETYPE_LIB_PATH="$new_path"
62729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62730$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62731  fi
62732
62733    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62734
62735  path="$FREETYPE_LIB_PATH"
62736  has_colon=`$ECHO $path | $GREP ^.:`
62737  new_path="$path"
62738  if test "x$has_colon" = x; then
62739    # Not in mixed or Windows style, start by that.
62740    new_path=`cmd //c echo $path`
62741  fi
62742
62743
62744  input_path="$new_path"
62745  # Check if we need to convert this using DOS-style short mode. If the path
62746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62747  # take no chances and rewrite it.
62748  # Note: m4 eats our [], so we need to use [ and ] instead.
62749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62750  if test "x$has_forbidden_chars" != x; then
62751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62753  fi
62754
62755
62756  windows_path="$new_path"
62757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62758    unix_path=`$CYGPATH -u "$windows_path"`
62759    new_path="$unix_path"
62760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62762    new_path="$unix_path"
62763  fi
62764
62765  if test "x$path" != "x$new_path"; then
62766    FREETYPE_LIB_PATH="$new_path"
62767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62768$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62769  fi
62770
62771  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62772  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62773
62774    else
62775      # We're on a unix platform. Hooray! :)
62776      path="$FREETYPE_LIB_PATH"
62777      has_space=`$ECHO "$path" | $GREP " "`
62778      if test "x$has_space" != x; then
62779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62780$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62781        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62782      fi
62783
62784      # Use eval to expand a potential ~
62785      eval path="$path"
62786      if test ! -f "$path" && test ! -d "$path"; then
62787        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62788      fi
62789
62790      if test -d "$path"; then
62791        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62792      else
62793        dir="`$DIRNAME "$path"`"
62794        base="`$BASENAME "$path"`"
62795        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62796      fi
62797    fi
62798  fi
62799
62800      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62801        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62802      else
62803        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62804      fi
62805    fi
62806
62807    # Try to compile it
62808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62809$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62810    ac_ext=cpp
62811ac_cpp='$CXXCPP $CPPFLAGS'
62812ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62813ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62814ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62815
62816    PREV_CXXCFLAGS="$CXXFLAGS"
62817    PREV_LIBS="$LIBS"
62818    PREV_CXX="$CXX"
62819    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62820    LIBS="$LIBS $FREETYPE_LIBS"
62821    CXX="$FIXPATH $CXX"
62822    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62823/* end confdefs.h.  */
62824
62825          #include<ft2build.h>
62826          #include FT_FREETYPE_H
62827          int main () {
62828            FT_Init_FreeType(NULL);
62829            return 0;
62830          }
62831
62832_ACEOF
62833if ac_fn_cxx_try_link "$LINENO"; then :
62834
62835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62836$as_echo "yes" >&6; }
62837
62838else
62839
62840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62841$as_echo "no" >&6; }
62842          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62843$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62844          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62845$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62846
62847
62848  # Print a helpful message on how to acquire the necessary build dependency.
62849  # freetype is the help tag: freetype, cups, alsa etc
62850  MISSING_DEPENDENCY=freetype
62851
62852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62853    cygwin_help $MISSING_DEPENDENCY
62854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62855    msys_help $MISSING_DEPENDENCY
62856  else
62857    PKGHANDLER_COMMAND=
62858
62859    case $PKGHANDLER in
62860      apt-get)
62861        apt_help     $MISSING_DEPENDENCY ;;
62862      yum)
62863        yum_help     $MISSING_DEPENDENCY ;;
62864      port)
62865        port_help    $MISSING_DEPENDENCY ;;
62866      pkgutil)
62867        pkgutil_help $MISSING_DEPENDENCY ;;
62868      pkgadd)
62869        pkgadd_help  $MISSING_DEPENDENCY ;;
62870    esac
62871
62872    if test "x$PKGHANDLER_COMMAND" != x; then
62873      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62874    fi
62875  fi
62876
62877
62878          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62879
62880
62881fi
62882rm -f core conftest.err conftest.$ac_objext \
62883    conftest$ac_exeext conftest.$ac_ext
62884    CXXCFLAGS="$PREV_CXXFLAGS"
62885    LIBS="$PREV_LIBS"
62886    CXX="$PREV_CXX"
62887    ac_ext=cpp
62888ac_cpp='$CXXCPP $CPPFLAGS'
62889ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62890ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62891ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62892
62893
62894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62895$as_echo_n "checking if we should bundle freetype... " >&6; }
62896    if test "x$BUNDLE_FREETYPE" = xyes; then
62897      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62898    fi
62899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62900$as_echo "$BUNDLE_FREETYPE" >&6; }
62901
62902  fi # end freetype needed
62903
62904
62905
62906
62907
62908
62909
62910# Check whether --with-alsa was given.
62911if test "${with_alsa+set}" = set; then :
62912  withval=$with_alsa;
62913fi
62914
62915
62916# Check whether --with-alsa-include was given.
62917if test "${with_alsa_include+set}" = set; then :
62918  withval=$with_alsa_include;
62919fi
62920
62921
62922# Check whether --with-alsa-lib was given.
62923if test "${with_alsa_lib+set}" = set; then :
62924  withval=$with_alsa_lib;
62925fi
62926
62927
62928  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62929    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62930        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62931        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62932      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62933$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62934    fi
62935    ALSA_CFLAGS=
62936    ALSA_LIBS=
62937  else
62938    ALSA_FOUND=no
62939
62940    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62941      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62942    fi
62943
62944    if test "x${with_alsa}" != x; then
62945      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62946      ALSA_CFLAGS="-I${with_alsa}/include"
62947      ALSA_FOUND=yes
62948    fi
62949    if test "x${with_alsa_include}" != x; then
62950      ALSA_CFLAGS="-I${with_alsa_include}"
62951      ALSA_FOUND=yes
62952    fi
62953    if test "x${with_alsa_lib}" != x; then
62954      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62955      ALSA_FOUND=yes
62956    fi
62957    # Do not try pkg-config if we have a sysroot set.
62958    if test "x$SYSROOT" = x; then
62959      if test "x$ALSA_FOUND" = xno; then
62960
62961pkg_failed=no
62962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62963$as_echo_n "checking for ALSA... " >&6; }
62964
62965if test -n "$ALSA_CFLAGS"; then
62966    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62967 elif test -n "$PKG_CONFIG"; then
62968    if test -n "$PKG_CONFIG" && \
62969    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62970  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62971  ac_status=$?
62972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62973  test $ac_status = 0; }; then
62974  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62975else
62976  pkg_failed=yes
62977fi
62978 else
62979    pkg_failed=untried
62980fi
62981if test -n "$ALSA_LIBS"; then
62982    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62983 elif test -n "$PKG_CONFIG"; then
62984    if test -n "$PKG_CONFIG" && \
62985    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62986  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62987  ac_status=$?
62988  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62989  test $ac_status = 0; }; then
62990  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62991else
62992  pkg_failed=yes
62993fi
62994 else
62995    pkg_failed=untried
62996fi
62997
62998
62999
63000if test $pkg_failed = yes; then
63001
63002if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63003        _pkg_short_errors_supported=yes
63004else
63005        _pkg_short_errors_supported=no
63006fi
63007        if test $_pkg_short_errors_supported = yes; then
63008	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63009        else
63010	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63011        fi
63012	# Put the nasty error message in config.log where it belongs
63013	echo "$ALSA_PKG_ERRORS" >&5
63014
63015	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63016$as_echo "no" >&6; }
63017                ALSA_FOUND=no
63018elif test $pkg_failed = untried; then
63019	ALSA_FOUND=no
63020else
63021	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63022	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63024$as_echo "yes" >&6; }
63025	ALSA_FOUND=yes
63026fi
63027      fi
63028    fi
63029    if test "x$ALSA_FOUND" = xno; then
63030      for ac_header in alsa/asoundlib.h
63031do :
63032  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63033if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63034  cat >>confdefs.h <<_ACEOF
63035#define HAVE_ALSA_ASOUNDLIB_H 1
63036_ACEOF
63037
63038            ALSA_FOUND=yes
63039            ALSA_CFLAGS=-Iignoreme
63040            ALSA_LIBS=-lasound
63041            DEFAULT_ALSA=yes
63042
63043else
63044  ALSA_FOUND=no
63045
63046fi
63047
63048done
63049
63050    fi
63051    if test "x$ALSA_FOUND" = xno; then
63052
63053  # Print a helpful message on how to acquire the necessary build dependency.
63054  # alsa is the help tag: freetype, cups, alsa etc
63055  MISSING_DEPENDENCY=alsa
63056
63057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63058    cygwin_help $MISSING_DEPENDENCY
63059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63060    msys_help $MISSING_DEPENDENCY
63061  else
63062    PKGHANDLER_COMMAND=
63063
63064    case $PKGHANDLER in
63065      apt-get)
63066        apt_help     $MISSING_DEPENDENCY ;;
63067      yum)
63068        yum_help     $MISSING_DEPENDENCY ;;
63069      port)
63070        port_help    $MISSING_DEPENDENCY ;;
63071      pkgutil)
63072        pkgutil_help $MISSING_DEPENDENCY ;;
63073      pkgadd)
63074        pkgadd_help  $MISSING_DEPENDENCY ;;
63075    esac
63076
63077    if test "x$PKGHANDLER_COMMAND" != x; then
63078      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63079    fi
63080  fi
63081
63082      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63083    fi
63084  fi
63085
63086
63087
63088
63089
63090
63091# Check whether --with-libffi was given.
63092if test "${with_libffi+set}" = set; then :
63093  withval=$with_libffi;
63094fi
63095
63096
63097# Check whether --with-libffi-include was given.
63098if test "${with_libffi_include+set}" = set; then :
63099  withval=$with_libffi_include;
63100fi
63101
63102
63103# Check whether --with-libffi-lib was given.
63104if test "${with_libffi_lib+set}" = set; then :
63105  withval=$with_libffi_lib;
63106fi
63107
63108
63109  if test "x$NEEDS_LIB_FFI" = xfalse; then
63110    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63111        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63112        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63113      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63114$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63115    fi
63116    LIBFFI_CFLAGS=
63117    LIBFFI_LIBS=
63118  else
63119    LIBFFI_FOUND=no
63120
63121    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63122      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63123    fi
63124
63125    if test "x${with_libffi}" != x; then
63126      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63127      LIBFFI_CFLAGS="-I${with_libffi}/include"
63128      LIBFFI_FOUND=yes
63129    fi
63130    if test "x${with_libffi_include}" != x; then
63131      LIBFFI_CFLAGS="-I${with_libffi_include}"
63132      LIBFFI_FOUND=yes
63133    fi
63134    if test "x${with_libffi_lib}" != x; then
63135      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63136      LIBFFI_FOUND=yes
63137    fi
63138    # Do not try pkg-config if we have a sysroot set.
63139    if test "x$SYSROOT" = x; then
63140      if test "x$LIBFFI_FOUND" = xno; then
63141        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63142
63143pkg_failed=no
63144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63145$as_echo_n "checking for LIBFFI... " >&6; }
63146
63147if test -n "$LIBFFI_CFLAGS"; then
63148    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63149 elif test -n "$PKG_CONFIG"; then
63150    if test -n "$PKG_CONFIG" && \
63151    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63152  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63153  ac_status=$?
63154  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63155  test $ac_status = 0; }; then
63156  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63157else
63158  pkg_failed=yes
63159fi
63160 else
63161    pkg_failed=untried
63162fi
63163if test -n "$LIBFFI_LIBS"; then
63164    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63165 elif test -n "$PKG_CONFIG"; then
63166    if test -n "$PKG_CONFIG" && \
63167    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63168  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63169  ac_status=$?
63170  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63171  test $ac_status = 0; }; then
63172  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63173else
63174  pkg_failed=yes
63175fi
63176 else
63177    pkg_failed=untried
63178fi
63179
63180
63181
63182if test $pkg_failed = yes; then
63183
63184if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63185        _pkg_short_errors_supported=yes
63186else
63187        _pkg_short_errors_supported=no
63188fi
63189        if test $_pkg_short_errors_supported = yes; then
63190	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63191        else
63192	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63193        fi
63194	# Put the nasty error message in config.log where it belongs
63195	echo "$LIBFFI_PKG_ERRORS" >&5
63196
63197	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63198$as_echo "no" >&6; }
63199                LIBFFI_FOUND=no
63200elif test $pkg_failed = untried; then
63201	LIBFFI_FOUND=no
63202else
63203	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63204	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63206$as_echo "yes" >&6; }
63207	LIBFFI_FOUND=yes
63208fi
63209      fi
63210    fi
63211    if test "x$LIBFFI_FOUND" = xno; then
63212      for ac_header in ffi.h
63213do :
63214  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63215if test "x$ac_cv_header_ffi_h" = xyes; then :
63216  cat >>confdefs.h <<_ACEOF
63217#define HAVE_FFI_H 1
63218_ACEOF
63219
63220            LIBFFI_FOUND=yes
63221            LIBFFI_CFLAGS=
63222            LIBFFI_LIBS=-lffi
63223
63224else
63225  LIBFFI_FOUND=no
63226
63227fi
63228
63229done
63230
63231    fi
63232    if test "x$LIBFFI_FOUND" = xno; then
63233
63234  # Print a helpful message on how to acquire the necessary build dependency.
63235  # ffi is the help tag: freetype, cups, alsa etc
63236  MISSING_DEPENDENCY=ffi
63237
63238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63239    cygwin_help $MISSING_DEPENDENCY
63240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63241    msys_help $MISSING_DEPENDENCY
63242  else
63243    PKGHANDLER_COMMAND=
63244
63245    case $PKGHANDLER in
63246      apt-get)
63247        apt_help     $MISSING_DEPENDENCY ;;
63248      yum)
63249        yum_help     $MISSING_DEPENDENCY ;;
63250      port)
63251        port_help    $MISSING_DEPENDENCY ;;
63252      pkgutil)
63253        pkgutil_help $MISSING_DEPENDENCY ;;
63254      pkgadd)
63255        pkgadd_help  $MISSING_DEPENDENCY ;;
63256    esac
63257
63258    if test "x$PKGHANDLER_COMMAND" != x; then
63259      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63260    fi
63261  fi
63262
63263      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63264    fi
63265
63266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63267$as_echo_n "checking if libffi works... " >&6; }
63268    ac_ext=c
63269ac_cpp='$CPP $CPPFLAGS'
63270ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63271ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63272ac_compiler_gnu=$ac_cv_c_compiler_gnu
63273
63274    OLD_CFLAGS="$CFLAGS"
63275    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63276    OLD_LIBS="$LIBS"
63277    LIBS="$LIBS $LIBFFI_LIBS"
63278    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63279/* end confdefs.h.  */
63280#include <ffi.h>
63281int
63282main ()
63283{
63284
63285          ffi_call(NULL, NULL, NULL, NULL);
63286          return 0;
63287
63288  ;
63289  return 0;
63290}
63291_ACEOF
63292if ac_fn_c_try_link "$LINENO"; then :
63293  LIBFFI_WORKS=yes
63294else
63295  LIBFFI_WORKS=no
63296
63297fi
63298rm -f core conftest.err conftest.$ac_objext \
63299    conftest$ac_exeext conftest.$ac_ext
63300    CFLAGS="$OLD_CFLAGS"
63301    LIBS="$OLD_LIBS"
63302    ac_ext=cpp
63303ac_cpp='$CXXCPP $CPPFLAGS'
63304ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63305ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63306ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63307
63308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63309$as_echo "$LIBFFI_WORKS" >&6; }
63310
63311    if test "x$LIBFFI_WORKS" = xno; then
63312
63313  # Print a helpful message on how to acquire the necessary build dependency.
63314  # ffi is the help tag: freetype, cups, alsa etc
63315  MISSING_DEPENDENCY=ffi
63316
63317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63318    cygwin_help $MISSING_DEPENDENCY
63319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63320    msys_help $MISSING_DEPENDENCY
63321  else
63322    PKGHANDLER_COMMAND=
63323
63324    case $PKGHANDLER in
63325      apt-get)
63326        apt_help     $MISSING_DEPENDENCY ;;
63327      yum)
63328        yum_help     $MISSING_DEPENDENCY ;;
63329      port)
63330        port_help    $MISSING_DEPENDENCY ;;
63331      pkgutil)
63332        pkgutil_help $MISSING_DEPENDENCY ;;
63333      pkgadd)
63334        pkgadd_help  $MISSING_DEPENDENCY ;;
63335    esac
63336
63337    if test "x$PKGHANDLER_COMMAND" != x; then
63338      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63339    fi
63340  fi
63341
63342      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63343    fi
63344  fi
63345
63346
63347
63348
63349
63350  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63351    # Extract the first word of "llvm-config", so it can be a program name with args.
63352set dummy llvm-config; ac_word=$2
63353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63354$as_echo_n "checking for $ac_word... " >&6; }
63355if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63356  $as_echo_n "(cached) " >&6
63357else
63358  if test -n "$LLVM_CONFIG"; then
63359  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63360else
63361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63362for as_dir in $PATH
63363do
63364  IFS=$as_save_IFS
63365  test -z "$as_dir" && as_dir=.
63366    for ac_exec_ext in '' $ac_executable_extensions; do
63367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63368    ac_cv_prog_LLVM_CONFIG="llvm-config"
63369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63370    break 2
63371  fi
63372done
63373  done
63374IFS=$as_save_IFS
63375
63376fi
63377fi
63378LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63379if test -n "$LLVM_CONFIG"; then
63380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63381$as_echo "$LLVM_CONFIG" >&6; }
63382else
63383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63384$as_echo "no" >&6; }
63385fi
63386
63387
63388
63389    if test "x$LLVM_CONFIG" != xllvm-config; then
63390      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63391    fi
63392
63393    llvm_components="jit mcjit engine nativecodegen native"
63394    unset LLVM_CFLAGS
63395    for flag in $("$LLVM_CONFIG" --cxxflags); do
63396      if echo "${flag}" | grep -q '^-[ID]'; then
63397        if test "${flag}" != "-D_DEBUG" ; then
63398          if test "${LLVM_CFLAGS}" != "" ; then
63399            LLVM_CFLAGS="${LLVM_CFLAGS} "
63400          fi
63401          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63402        fi
63403      fi
63404    done
63405    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63406    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63407
63408    unset LLVM_LDFLAGS
63409    for flag in $("${LLVM_CONFIG}" --ldflags); do
63410      if echo "${flag}" | grep -q '^-L'; then
63411        if test "${LLVM_LDFLAGS}" != ""; then
63412          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63413        fi
63414        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63415      fi
63416    done
63417
63418    unset LLVM_LIBS
63419    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63420      if echo "${flag}" | grep -q '^-l'; then
63421        if test "${LLVM_LIBS}" != ""; then
63422          LLVM_LIBS="${LLVM_LIBS} "
63423        fi
63424        LLVM_LIBS="${LLVM_LIBS}${flag}"
63425      fi
63426    done
63427
63428    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63429    # always properly detect -ltinfo
63430    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63431
63432
63433
63434
63435  fi
63436
63437
63438
63439# Check whether --with-libjpeg was given.
63440if test "${with_libjpeg+set}" = set; then :
63441  withval=$with_libjpeg;
63442fi
63443
63444
63445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63446$as_echo_n "checking for which libjpeg to use... " >&6; }
63447  # default is bundled
63448  DEFAULT_LIBJPEG=bundled
63449  # if user didn't specify, use DEFAULT_LIBJPEG
63450  if test "x${with_libjpeg}" = "x"; then
63451    with_libjpeg=${DEFAULT_LIBJPEG}
63452  fi
63453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63454$as_echo "${with_libjpeg}" >&6; }
63455
63456  if test "x${with_libjpeg}" = "xbundled"; then
63457    USE_EXTERNAL_LIBJPEG=false
63458  elif test "x${with_libjpeg}" = "xsystem"; then
63459    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63460if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63461
63462else
63463   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63464fi
63465
63466
63467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63468$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63469if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63470  $as_echo_n "(cached) " >&6
63471else
63472  ac_check_lib_save_LIBS=$LIBS
63473LIBS="-ljpeg  $LIBS"
63474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63475/* end confdefs.h.  */
63476
63477/* Override any GCC internal prototype to avoid an error.
63478   Use char because int might match the return type of a GCC
63479   builtin and then its argument prototype would still apply.  */
63480#ifdef __cplusplus
63481extern "C"
63482#endif
63483char jpeg_CreateDecompress ();
63484int
63485main ()
63486{
63487return jpeg_CreateDecompress ();
63488  ;
63489  return 0;
63490}
63491_ACEOF
63492if ac_fn_cxx_try_link "$LINENO"; then :
63493  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63494else
63495  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63496fi
63497rm -f core conftest.err conftest.$ac_objext \
63498    conftest$ac_exeext conftest.$ac_ext
63499LIBS=$ac_check_lib_save_LIBS
63500fi
63501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63502$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63503if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63504  cat >>confdefs.h <<_ACEOF
63505#define HAVE_LIBJPEG 1
63506_ACEOF
63507
63508  LIBS="-ljpeg $LIBS"
63509
63510else
63511   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63512fi
63513
63514
63515    USE_EXTERNAL_LIBJPEG=true
63516  else
63517    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63518  fi
63519
63520
63521
63522
63523
63524# Check whether --with-giflib was given.
63525if test "${with_giflib+set}" = set; then :
63526  withval=$with_giflib;
63527fi
63528
63529
63530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63531$as_echo_n "checking for which giflib to use... " >&6; }
63532  # default is bundled
63533  DEFAULT_GIFLIB=bundled
63534  # if user didn't specify, use DEFAULT_GIFLIB
63535  if test "x${with_giflib}" = "x"; then
63536    with_giflib=${DEFAULT_GIFLIB}
63537  fi
63538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63539$as_echo "${with_giflib}" >&6; }
63540
63541  if test "x${with_giflib}" = "xbundled"; then
63542    USE_EXTERNAL_LIBGIF=false
63543  elif test "x${with_giflib}" = "xsystem"; then
63544    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63545if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63546
63547else
63548   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63549fi
63550
63551
63552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63553$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63554if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63555  $as_echo_n "(cached) " >&6
63556else
63557  ac_check_lib_save_LIBS=$LIBS
63558LIBS="-lgif  $LIBS"
63559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63560/* end confdefs.h.  */
63561
63562/* Override any GCC internal prototype to avoid an error.
63563   Use char because int might match the return type of a GCC
63564   builtin and then its argument prototype would still apply.  */
63565#ifdef __cplusplus
63566extern "C"
63567#endif
63568char DGifGetCode ();
63569int
63570main ()
63571{
63572return DGifGetCode ();
63573  ;
63574  return 0;
63575}
63576_ACEOF
63577if ac_fn_cxx_try_link "$LINENO"; then :
63578  ac_cv_lib_gif_DGifGetCode=yes
63579else
63580  ac_cv_lib_gif_DGifGetCode=no
63581fi
63582rm -f core conftest.err conftest.$ac_objext \
63583    conftest$ac_exeext conftest.$ac_ext
63584LIBS=$ac_check_lib_save_LIBS
63585fi
63586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63587$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63588if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63589  cat >>confdefs.h <<_ACEOF
63590#define HAVE_LIBGIF 1
63591_ACEOF
63592
63593  LIBS="-lgif $LIBS"
63594
63595else
63596   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63597fi
63598
63599
63600    USE_EXTERNAL_LIBGIF=true
63601  else
63602    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63603  fi
63604
63605
63606
63607
63608
63609# Check whether --with-libpng was given.
63610if test "${with_libpng+set}" = set; then :
63611  withval=$with_libpng;
63612fi
63613
63614
63615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63616$as_echo_n "checking for which libpng to use... " >&6; }
63617
63618  # default is bundled
63619  DEFAULT_LIBPNG=bundled
63620  # if user didn't specify, use DEFAULT_LIBPNG
63621  if test "x${with_libpng}" = "x"; then
63622      with_libpng=${DEFAULT_LIBPNG}
63623  fi
63624
63625  if test "x${with_libpng}" = "xbundled"; then
63626      USE_EXTERNAL_LIBPNG=false
63627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63628$as_echo "bundled" >&6; }
63629  elif test "x${with_libpng}" = "xsystem"; then
63630
63631pkg_failed=no
63632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63633$as_echo_n "checking for PNG... " >&6; }
63634
63635if test -n "$PNG_CFLAGS"; then
63636    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63637 elif test -n "$PKG_CONFIG"; then
63638    if test -n "$PKG_CONFIG" && \
63639    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63640  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63641  ac_status=$?
63642  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63643  test $ac_status = 0; }; then
63644  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63645else
63646  pkg_failed=yes
63647fi
63648 else
63649    pkg_failed=untried
63650fi
63651if test -n "$PNG_LIBS"; then
63652    pkg_cv_PNG_LIBS="$PNG_LIBS"
63653 elif test -n "$PKG_CONFIG"; then
63654    if test -n "$PKG_CONFIG" && \
63655    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63656  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63657  ac_status=$?
63658  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63659  test $ac_status = 0; }; then
63660  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63661else
63662  pkg_failed=yes
63663fi
63664 else
63665    pkg_failed=untried
63666fi
63667
63668
63669
63670if test $pkg_failed = yes; then
63671
63672if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63673        _pkg_short_errors_supported=yes
63674else
63675        _pkg_short_errors_supported=no
63676fi
63677        if test $_pkg_short_errors_supported = yes; then
63678	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63679        else
63680	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63681        fi
63682	# Put the nasty error message in config.log where it belongs
63683	echo "$PNG_PKG_ERRORS" >&5
63684
63685	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63686$as_echo "no" >&6; }
63687                 LIBPNG_FOUND=no
63688elif test $pkg_failed = untried; then
63689	 LIBPNG_FOUND=no
63690else
63691	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63692	PNG_LIBS=$pkg_cv_PNG_LIBS
63693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63694$as_echo "yes" >&6; }
63695	 LIBPNG_FOUND=yes
63696fi
63697      if test "x${LIBPNG_FOUND}" = "xyes"; then
63698          USE_EXTERNAL_LIBPNG=true
63699          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63700$as_echo "system" >&6; }
63701      else
63702          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63703$as_echo "system not found" >&6; }
63704          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63705      fi
63706  else
63707      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63708  fi
63709
63710
63711
63712
63713
63714# Check whether --with-zlib was given.
63715if test "${with_zlib+set}" = set; then :
63716  withval=$with_zlib;
63717fi
63718
63719
63720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63721$as_echo_n "checking for compress in -lz... " >&6; }
63722if ${ac_cv_lib_z_compress+:} false; then :
63723  $as_echo_n "(cached) " >&6
63724else
63725  ac_check_lib_save_LIBS=$LIBS
63726LIBS="-lz  $LIBS"
63727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63728/* end confdefs.h.  */
63729
63730/* Override any GCC internal prototype to avoid an error.
63731   Use char because int might match the return type of a GCC
63732   builtin and then its argument prototype would still apply.  */
63733#ifdef __cplusplus
63734extern "C"
63735#endif
63736char compress ();
63737int
63738main ()
63739{
63740return compress ();
63741  ;
63742  return 0;
63743}
63744_ACEOF
63745if ac_fn_cxx_try_link "$LINENO"; then :
63746  ac_cv_lib_z_compress=yes
63747else
63748  ac_cv_lib_z_compress=no
63749fi
63750rm -f core conftest.err conftest.$ac_objext \
63751    conftest$ac_exeext conftest.$ac_ext
63752LIBS=$ac_check_lib_save_LIBS
63753fi
63754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63755$as_echo "$ac_cv_lib_z_compress" >&6; }
63756if test "x$ac_cv_lib_z_compress" = xyes; then :
63757   ZLIB_FOUND=yes
63758else
63759   ZLIB_FOUND=no
63760fi
63761
63762
63763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63764$as_echo_n "checking for which zlib to use... " >&6; }
63765
63766  DEFAULT_ZLIB=system
63767  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63768    # On windows default is bundled...on others default is system
63769    DEFAULT_ZLIB=bundled
63770  fi
63771
63772  if test "x${ZLIB_FOUND}" != "xyes"; then
63773    # If we don't find any system...set default to bundled
63774    DEFAULT_ZLIB=bundled
63775  fi
63776
63777  # If user didn't specify, use DEFAULT_ZLIB
63778  if test "x${with_zlib}" = "x"; then
63779    with_zlib=${DEFAULT_ZLIB}
63780  fi
63781
63782  if test "x${with_zlib}" = "xbundled"; then
63783    USE_EXTERNAL_LIBZ=false
63784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63785$as_echo "bundled" >&6; }
63786  elif test "x${with_zlib}" = "xsystem"; then
63787    if test "x${ZLIB_FOUND}" = "xyes"; then
63788      USE_EXTERNAL_LIBZ=true
63789      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63790$as_echo "system" >&6; }
63791    else
63792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63793$as_echo "system not found" >&6; }
63794      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63795    fi
63796  else
63797    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63798  fi
63799
63800
63801
63802
63803
63804# Check whether --with-lcms was given.
63805if test "${with_lcms+set}" = set; then :
63806  withval=$with_lcms;
63807fi
63808
63809
63810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63811$as_echo_n "checking for which lcms to use... " >&6; }
63812
63813  DEFAULT_LCMS=bundled
63814  # If user didn't specify, use DEFAULT_LCMS
63815  if test "x${with_lcms}" = "x"; then
63816      with_lcms=${DEFAULT_LCMS}
63817  fi
63818
63819  if test "x${with_lcms}" = "xbundled"; then
63820    USE_EXTERNAL_LCMS=false
63821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63822$as_echo "bundled" >&6; }
63823  elif test "x${with_lcms}" = "xsystem"; then
63824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63825$as_echo "system" >&6; }
63826
63827pkg_failed=no
63828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63829$as_echo_n "checking for LCMS... " >&6; }
63830
63831if test -n "$LCMS_CFLAGS"; then
63832    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63833 elif test -n "$PKG_CONFIG"; then
63834    if test -n "$PKG_CONFIG" && \
63835    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63836  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63837  ac_status=$?
63838  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63839  test $ac_status = 0; }; then
63840  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63841else
63842  pkg_failed=yes
63843fi
63844 else
63845    pkg_failed=untried
63846fi
63847if test -n "$LCMS_LIBS"; then
63848    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63849 elif test -n "$PKG_CONFIG"; then
63850    if test -n "$PKG_CONFIG" && \
63851    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63852  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63853  ac_status=$?
63854  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63855  test $ac_status = 0; }; then
63856  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63857else
63858  pkg_failed=yes
63859fi
63860 else
63861    pkg_failed=untried
63862fi
63863
63864
63865
63866if test $pkg_failed = yes; then
63867
63868if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63869        _pkg_short_errors_supported=yes
63870else
63871        _pkg_short_errors_supported=no
63872fi
63873        if test $_pkg_short_errors_supported = yes; then
63874	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63875        else
63876	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63877        fi
63878	# Put the nasty error message in config.log where it belongs
63879	echo "$LCMS_PKG_ERRORS" >&5
63880
63881	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63882$as_echo "no" >&6; }
63883                LCMS_FOUND=no
63884elif test $pkg_failed = untried; then
63885	LCMS_FOUND=no
63886else
63887	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63888	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63890$as_echo "yes" >&6; }
63891	LCMS_FOUND=yes
63892fi
63893    if test "x${LCMS_FOUND}" = "xyes"; then
63894      USE_EXTERNAL_LCMS=true
63895    else
63896      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63897    fi
63898  else
63899    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63900  fi
63901
63902
63903
63904
63905
63906
63907
63908
63909
63910
63911
63912  # Setup libm (the maths library)
63913  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63915$as_echo_n "checking for cos in -lm... " >&6; }
63916if ${ac_cv_lib_m_cos+:} false; then :
63917  $as_echo_n "(cached) " >&6
63918else
63919  ac_check_lib_save_LIBS=$LIBS
63920LIBS="-lm  $LIBS"
63921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63922/* end confdefs.h.  */
63923
63924/* Override any GCC internal prototype to avoid an error.
63925   Use char because int might match the return type of a GCC
63926   builtin and then its argument prototype would still apply.  */
63927#ifdef __cplusplus
63928extern "C"
63929#endif
63930char cos ();
63931int
63932main ()
63933{
63934return cos ();
63935  ;
63936  return 0;
63937}
63938_ACEOF
63939if ac_fn_cxx_try_link "$LINENO"; then :
63940  ac_cv_lib_m_cos=yes
63941else
63942  ac_cv_lib_m_cos=no
63943fi
63944rm -f core conftest.err conftest.$ac_objext \
63945    conftest$ac_exeext conftest.$ac_ext
63946LIBS=$ac_check_lib_save_LIBS
63947fi
63948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63949$as_echo "$ac_cv_lib_m_cos" >&6; }
63950if test "x$ac_cv_lib_m_cos" = xyes; then :
63951  cat >>confdefs.h <<_ACEOF
63952#define HAVE_LIBM 1
63953_ACEOF
63954
63955  LIBS="-lm $LIBS"
63956
63957else
63958
63959        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63960$as_echo "$as_me: Maths library was not found" >&6;}
63961
63962fi
63963
63964    LIBM="-lm"
63965  else
63966    LIBM=""
63967  fi
63968
63969
63970  # Setup libdl (for dynamic library loading)
63971  save_LIBS="$LIBS"
63972  LIBS=""
63973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63974$as_echo_n "checking for dlopen in -ldl... " >&6; }
63975if ${ac_cv_lib_dl_dlopen+:} false; then :
63976  $as_echo_n "(cached) " >&6
63977else
63978  ac_check_lib_save_LIBS=$LIBS
63979LIBS="-ldl  $LIBS"
63980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63981/* end confdefs.h.  */
63982
63983/* Override any GCC internal prototype to avoid an error.
63984   Use char because int might match the return type of a GCC
63985   builtin and then its argument prototype would still apply.  */
63986#ifdef __cplusplus
63987extern "C"
63988#endif
63989char dlopen ();
63990int
63991main ()
63992{
63993return dlopen ();
63994  ;
63995  return 0;
63996}
63997_ACEOF
63998if ac_fn_cxx_try_link "$LINENO"; then :
63999  ac_cv_lib_dl_dlopen=yes
64000else
64001  ac_cv_lib_dl_dlopen=no
64002fi
64003rm -f core conftest.err conftest.$ac_objext \
64004    conftest$ac_exeext conftest.$ac_ext
64005LIBS=$ac_check_lib_save_LIBS
64006fi
64007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64008$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64009if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64010  cat >>confdefs.h <<_ACEOF
64011#define HAVE_LIBDL 1
64012_ACEOF
64013
64014  LIBS="-ldl $LIBS"
64015
64016fi
64017
64018  LIBDL="$LIBS"
64019
64020  LIBS="$save_LIBS"
64021
64022  # Deprecated libraries, keep the flags for backwards compatibility
64023  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64024
64025
64026# Check whether --with-dxsdk was given.
64027if test "${with_dxsdk+set}" = set; then :
64028  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64029$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64030fi
64031
64032
64033
64034
64035# Check whether --with-dxsdk-lib was given.
64036if test "${with_dxsdk_lib+set}" = set; then :
64037  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64038$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64039fi
64040
64041
64042
64043
64044# Check whether --with-dxsdk-include was given.
64045if test "${with_dxsdk_include+set}" = set; then :
64046  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64047$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64048fi
64049
64050
64051  fi
64052
64053  # Control if libzip can use mmap. Available for purposes of overriding.
64054  LIBZIP_CAN_USE_MMAP=true
64055
64056
64057
64058  if test "$OPENJDK_TARGET_OS" = "solaris"; then
64059    # Find the root of the Solaris Studio installation from the compiler path
64060    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64061    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64063$as_echo_n "checking for libstlport.so.1... " >&6; }
64064    if test -f "$STLPORT_LIB"; then
64065      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64066$as_echo "yes, $STLPORT_LIB" >&6; }
64067
64068  # Only process if variable expands to non-empty
64069
64070  if test "x$STLPORT_LIB" != x; then
64071    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64072
64073  # Input might be given as Windows format, start by converting to
64074  # unix format.
64075  path="$STLPORT_LIB"
64076  new_path=`$CYGPATH -u "$path"`
64077
64078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64081  # "foo.exe" is OK but "foo" is an error.
64082  #
64083  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64084  # It is also a way to make sure we got the proper file name for the real test later on.
64085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64086  if test "x$test_shortpath" = x; then
64087    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64088$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64089    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64090  fi
64091
64092  # Call helper function which possibly converts this using DOS-style short mode.
64093  # If so, the updated path is stored in $new_path.
64094
64095  input_path="$new_path"
64096  # Check if we need to convert this using DOS-style short mode. If the path
64097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64098  # take no chances and rewrite it.
64099  # Note: m4 eats our [], so we need to use [ and ] instead.
64100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64101  if test "x$has_forbidden_chars" != x; then
64102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64106      # Going to short mode and back again did indeed matter. Since short mode is
64107      # case insensitive, let's make it lowercase to improve readability.
64108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64109      # Now convert it back to Unix-style (cygpath)
64110      input_path=`$CYGPATH -u "$shortmode_path"`
64111      new_path="$input_path"
64112    fi
64113  fi
64114
64115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64116  if test "x$test_cygdrive_prefix" = x; then
64117    # As a simple fix, exclude /usr/bin since it's not a real path.
64118    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64120      # a path prefixed by /cygdrive for fixpath to work.
64121      new_path="$CYGWIN_ROOT_PATH$input_path"
64122    fi
64123  fi
64124
64125
64126  if test "x$path" != "x$new_path"; then
64127    STLPORT_LIB="$new_path"
64128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64129$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64130  fi
64131
64132    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64133
64134  path="$STLPORT_LIB"
64135  has_colon=`$ECHO $path | $GREP ^.:`
64136  new_path="$path"
64137  if test "x$has_colon" = x; then
64138    # Not in mixed or Windows style, start by that.
64139    new_path=`cmd //c echo $path`
64140  fi
64141
64142
64143  input_path="$new_path"
64144  # Check if we need to convert this using DOS-style short mode. If the path
64145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64146  # take no chances and rewrite it.
64147  # Note: m4 eats our [], so we need to use [ and ] instead.
64148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64149  if test "x$has_forbidden_chars" != x; then
64150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64151    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64152  fi
64153
64154
64155  windows_path="$new_path"
64156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64157    unix_path=`$CYGPATH -u "$windows_path"`
64158    new_path="$unix_path"
64159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64161    new_path="$unix_path"
64162  fi
64163
64164  if test "x$path" != "x$new_path"; then
64165    STLPORT_LIB="$new_path"
64166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64167$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64168  fi
64169
64170  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64171  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64172
64173    else
64174      # We're on a unix platform. Hooray! :)
64175      path="$STLPORT_LIB"
64176      has_space=`$ECHO "$path" | $GREP " "`
64177      if test "x$has_space" != x; then
64178        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64179$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64180        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64181      fi
64182
64183      # Use eval to expand a potential ~
64184      eval path="$path"
64185      if test ! -f "$path" && test ! -d "$path"; then
64186        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64187      fi
64188
64189      if test -d "$path"; then
64190        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64191      else
64192        dir="`$DIRNAME "$path"`"
64193        base="`$BASENAME "$path"`"
64194        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64195      fi
64196    fi
64197  fi
64198
64199    else
64200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64201$as_echo "no, not found at $STLPORT_LIB" >&6; }
64202      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64203    fi
64204
64205  fi
64206
64207
64208
64209
64210
64211
64212
64213
64214
64215
64216
64217
64218
64219
64220###############################################################################
64221#
64222# We need to do some final tweaking, when everything else is done.
64223#
64224###############################################################################
64225
64226
64227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64228$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64229
64230  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64231    ENABLE_INTREE_EC=yes
64232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64233$as_echo "yes" >&6; }
64234  else
64235    ENABLE_INTREE_EC=no
64236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64237$as_echo "no" >&6; }
64238  fi
64239
64240
64241
64242
64243  # Check whether --enable-jtreg-failure-handler was given.
64244if test "${enable_jtreg_failure_handler+set}" = set; then :
64245  enableval=$enable_jtreg_failure_handler;
64246fi
64247
64248
64249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64250$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64251
64252  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64253    if test "x$JT_HOME" = "x"; then
64254      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64255    else
64256      BUILD_FAILURE_HANDLER=true
64257      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64258$as_echo "yes, forced" >&6; }
64259    fi
64260  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64261    BUILD_FAILURE_HANDLER=false
64262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64263$as_echo "no, forced" >&6; }
64264  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64265      || test "x$enable_jtreg_failure_handler" = "x"; then
64266    if test "x$JT_HOME" = "x"; then
64267      BUILD_FAILURE_HANDLER=false
64268      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64269$as_echo "no, missing jtreg" >&6; }
64270    else
64271      BUILD_FAILURE_HANDLER=true
64272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64273$as_echo "yes, jtreg present" >&6; }
64274    fi
64275  else
64276    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64277  fi
64278
64279
64280
64281
64282###############################################################################
64283#
64284# Configure parts of the build that only affect the build performance,
64285# not the result.
64286#
64287###############################################################################
64288
64289
64290  # How many cores do we have on this build system?
64291
64292# Check whether --with-num-cores was given.
64293if test "${with_num_cores+set}" = set; then :
64294  withval=$with_num_cores;
64295fi
64296
64297  if test "x$with_num_cores" = x; then
64298    # The number of cores were not specified, try to probe them.
64299
64300  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64301$as_echo_n "checking for number of cores... " >&6; }
64302  NUM_CORES=1
64303  FOUND_CORES=no
64304
64305  if test -f /proc/cpuinfo; then
64306    # Looks like a Linux (or cygwin) system
64307    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64308    FOUND_CORES=yes
64309  elif test -x /usr/sbin/psrinfo; then
64310    # Looks like a Solaris system
64311    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64312    FOUND_CORES=yes
64313  elif test -x /usr/sbin/sysctl; then
64314    # Looks like a MacOSX system
64315    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64316    FOUND_CORES=yes
64317  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64318    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64319    FOUND_CORES=yes
64320  elif test -n "$NUMBER_OF_PROCESSORS"; then
64321    # On windows, look in the env
64322    NUM_CORES=$NUMBER_OF_PROCESSORS
64323    FOUND_CORES=yes
64324  fi
64325
64326  if test "x$FOUND_CORES" = xyes; then
64327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64328$as_echo "$NUM_CORES" >&6; }
64329  else
64330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64331$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64332    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64333$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64334  fi
64335
64336  else
64337    NUM_CORES=$with_num_cores
64338  fi
64339
64340
64341
64342  # How much memory do we have on this build system?
64343
64344# Check whether --with-memory-size was given.
64345if test "${with_memory_size+set}" = set; then :
64346  withval=$with_memory_size;
64347fi
64348
64349  if test "x$with_memory_size" = x; then
64350    # The memory size was not specified, try to probe it.
64351
64352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64353$as_echo_n "checking for memory size... " >&6; }
64354  # Default to 1024 MB
64355  MEMORY_SIZE=1024
64356  FOUND_MEM=no
64357
64358  if test -f /proc/meminfo; then
64359    # Looks like a Linux (or cygwin) system
64360    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64361    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64362    FOUND_MEM=yes
64363  elif test -x /usr/sbin/prtconf; then
64364    # Looks like a Solaris or AIX system
64365    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64366    FOUND_MEM=yes
64367  elif test -x /usr/sbin/sysctl; then
64368    # Looks like a MacOSX system
64369    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64370    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64371    FOUND_MEM=yes
64372  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64373    # Windows, but without cygwin
64374    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64375    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64376    FOUND_MEM=yes
64377  fi
64378
64379  if test "x$FOUND_MEM" = xyes; then
64380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64381$as_echo "$MEMORY_SIZE MB" >&6; }
64382  else
64383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64384$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64385    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64386$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64387  fi
64388
64389  else
64390    MEMORY_SIZE=$with_memory_size
64391  fi
64392
64393
64394
64395  # Provide a decent default number of parallel jobs for make depending on
64396  # number of cores, amount of memory and machine architecture.
64397
64398# Check whether --with-jobs was given.
64399if test "${with_jobs+set}" = set; then :
64400  withval=$with_jobs;
64401fi
64402
64403  if test "x$with_jobs" = x; then
64404    # Number of jobs was not specified, calculate.
64405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64406$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64407    # Approximate memory in GB.
64408    memory_gb=`expr $MEMORY_SIZE / 1024`
64409    # Pick the lowest of memory in gb and number of cores.
64410    if test "$memory_gb" -lt "$NUM_CORES"; then
64411      JOBS="$memory_gb"
64412    else
64413      JOBS="$NUM_CORES"
64414    fi
64415    if test "$JOBS" -eq "0"; then
64416      JOBS=1
64417    fi
64418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64419$as_echo "$JOBS" >&6; }
64420  else
64421    JOBS=$with_jobs
64422  fi
64423
64424
64425
64426  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64427
64428# Check whether --with-test-jobs was given.
64429if test "${with_test_jobs+set}" = set; then :
64430  withval=$with_test_jobs;
64431fi
64432
64433  if test "x$with_test_jobs" = x; then
64434      TEST_JOBS=0
64435  else
64436      TEST_JOBS=$with_test_jobs
64437  fi
64438
64439
64440
64441# Setup arguments for the boot jdk (after cores and memory have been setup)
64442
64443  ##############################################################################
64444  #
64445  # Specify jvm options for anything that is run with the Boot JDK.
64446  # Not all JVM:s accept the same arguments on the command line.
64447  #
64448
64449# Check whether --with-boot-jdk-jvmargs was given.
64450if test "${with_boot_jdk_jvmargs+set}" = set; then :
64451  withval=$with_boot_jdk_jvmargs;
64452fi
64453
64454
64455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64456$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64457
64458  # Disable special log output when a debug build is used as Boot JDK...
64459
64460  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64461  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64462  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64463  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64464  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64465  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64466    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64467    JVM_ARG_OK=true
64468  else
64469    $ECHO "Arg failed:" >&5
64470    $ECHO "$OUTPUT" >&5
64471    JVM_ARG_OK=false
64472  fi
64473
64474
64475  # Apply user provided options.
64476
64477  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64478  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64479  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64480  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64481  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64482  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64483    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64484    JVM_ARG_OK=true
64485  else
64486    $ECHO "Arg failed:" >&5
64487    $ECHO "$OUTPUT" >&5
64488    JVM_ARG_OK=false
64489  fi
64490
64491
64492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64493$as_echo "$boot_jdk_jvmargs" >&6; }
64494
64495  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64496  JAVA_FLAGS=$boot_jdk_jvmargs
64497
64498
64499
64500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64501$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64502
64503  # Starting amount of heap memory.
64504
64505  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64506  $ECHO "Command: $JAVA -Xms64M -version" >&5
64507  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64508  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64509  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64510  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64511    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64512    JVM_ARG_OK=true
64513  else
64514    $ECHO "Arg failed:" >&5
64515    $ECHO "$OUTPUT" >&5
64516    JVM_ARG_OK=false
64517  fi
64518
64519
64520  # Maximum amount of heap memory.
64521  # Maximum stack size.
64522  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
64523  if test "x$BOOT_JDK_BITS" = "x32"; then
64524    if test "$JVM_MAX_HEAP" -gt "1100"; then
64525      JVM_MAX_HEAP=1100
64526    elif test "$JVM_MAX_HEAP" -lt "512"; then
64527      JVM_MAX_HEAP=512
64528    fi
64529    STACK_SIZE=768
64530  else
64531    # Running a 64 bit JVM allows for and requires a bigger heap
64532    if test "$JVM_MAX_HEAP" -gt "1600"; then
64533      JVM_MAX_HEAP=1600
64534    elif test "$JVM_MAX_HEAP" -lt "512"; then
64535      JVM_MAX_HEAP=512
64536    fi
64537    STACK_SIZE=1536
64538  fi
64539
64540  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64541  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64542  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64543  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64544  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64545  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64546    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64547    JVM_ARG_OK=true
64548  else
64549    $ECHO "Arg failed:" >&5
64550    $ECHO "$OUTPUT" >&5
64551    JVM_ARG_OK=false
64552  fi
64553
64554
64555  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64556  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64557  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64558  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64559  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64560  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64561    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64562    JVM_ARG_OK=true
64563  else
64564    $ECHO "Arg failed:" >&5
64565    $ECHO "$OUTPUT" >&5
64566    JVM_ARG_OK=false
64567  fi
64568
64569
64570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64571$as_echo "$boot_jdk_jvmargs_big" >&6; }
64572
64573  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64574
64575
64576  # By default, the main javac compilations use big
64577  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64578
64579
64580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64581$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64582
64583  # Use serial gc for small short lived tools if possible
64584
64585  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64586  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64587  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64588  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64589  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64590  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64591    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64592    JVM_ARG_OK=true
64593  else
64594    $ECHO "Arg failed:" >&5
64595    $ECHO "$OUTPUT" >&5
64596    JVM_ARG_OK=false
64597  fi
64598
64599
64600  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64601  $ECHO "Command: $JAVA -Xms32M -version" >&5
64602  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64603  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64604  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64605  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64606    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64607    JVM_ARG_OK=true
64608  else
64609    $ECHO "Arg failed:" >&5
64610    $ECHO "$OUTPUT" >&5
64611    JVM_ARG_OK=false
64612  fi
64613
64614
64615  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64616  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64617  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64618  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64619  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64620  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64621    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64622    JVM_ARG_OK=true
64623  else
64624    $ECHO "Arg failed:" >&5
64625    $ECHO "$OUTPUT" >&5
64626    JVM_ARG_OK=false
64627  fi
64628
64629
64630  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64631  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64632  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64633  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64634  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64635  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64636    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64637    JVM_ARG_OK=true
64638  else
64639    $ECHO "Arg failed:" >&5
64640    $ECHO "$OUTPUT" >&5
64641    JVM_ARG_OK=false
64642  fi
64643
64644
64645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64646$as_echo "$boot_jdk_jvmargs_small" >&6; }
64647
64648  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64649
64650
64651  JAVA_TOOL_FLAGS_SMALL=""
64652  for f in $JAVA_FLAGS_SMALL; do
64653    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64654  done
64655
64656
64657
64658# Setup smart javac (after cores and memory have been setup)
64659
64660
64661# Check whether --with-sjavac-server-java was given.
64662if test "${with_sjavac_server_java+set}" = set; then :
64663  withval=$with_sjavac_server_java;
64664fi
64665
64666
64667  if test "x$with_sjavac_server_java" != x; then
64668    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64669    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64670    if test "x$FOUND_VERSION" = x; then
64671      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64672    fi
64673  else
64674    SJAVAC_SERVER_JAVA="$JAVA"
64675  fi
64676
64677
64678  if test "$MEMORY_SIZE" -gt "3000"; then
64679
64680  $ECHO "Check if jvm arg is ok: -d64" >&5
64681  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64682  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64683  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64684  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64685  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64686    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64687    JVM_ARG_OK=true
64688  else
64689    $ECHO "Arg failed:" >&5
64690    $ECHO "$OUTPUT" >&5
64691    JVM_ARG_OK=false
64692  fi
64693
64694    if test "$JVM_ARG_OK" = true; then
64695      JVM_64BIT=true
64696      JVM_ARG_OK=false
64697    fi
64698  fi
64699
64700  MX_VALUE=`expr $MEMORY_SIZE / 2`
64701  if test "$JVM_64BIT" = true; then
64702    # Set ms lower than mx since more than one instance of the server might
64703    # get launched at the same time before they figure out which instance won.
64704    MS_VALUE=512
64705    if test "$MX_VALUE" -gt "2048"; then
64706      MX_VALUE=2048
64707    fi
64708  else
64709    MS_VALUE=256
64710    if test "$MX_VALUE" -gt "1500"; then
64711      MX_VALUE=1500
64712    fi
64713  fi
64714  if test "$MX_VALUE" -lt "512"; then
64715    MX_VALUE=512
64716  fi
64717
64718  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64719  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64720  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64721  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64722  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64723  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64724    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64725    JVM_ARG_OK=true
64726  else
64727    $ECHO "Arg failed:" >&5
64728    $ECHO "$OUTPUT" >&5
64729    JVM_ARG_OK=false
64730  fi
64731
64732
64733
64734  # Check whether --enable-sjavac was given.
64735if test "${enable_sjavac+set}" = set; then :
64736  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64737else
64738  ENABLE_SJAVAC="no"
64739fi
64740
64741  if test "x$JVM_ARG_OK" = "xfalse"; then
64742    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64743$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64744    ENABLE_SJAVAC="no"
64745  fi
64746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64747$as_echo_n "checking whether to use sjavac... " >&6; }
64748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64749$as_echo "$ENABLE_SJAVAC" >&6; }
64750
64751
64752  # Check whether --enable-javac-server was given.
64753if test "${enable_javac_server+set}" = set; then :
64754  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64755else
64756  ENABLE_JAVAC_SERVER="yes"
64757fi
64758
64759  if test "x$JVM_ARG_OK" = "xfalse"; then
64760    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64761$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64762    ENABLE_JAVAC_SERVER="no"
64763  fi
64764  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64765$as_echo_n "checking whether to use javac server... " >&6; }
64766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64767$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64768
64769
64770  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64771    # When using a server javac, the small client instances do not need much
64772    # resources.
64773    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64774  fi
64775
64776
64777# Setup use of icecc if requested
64778
64779  # Check whether --enable-icecc was given.
64780if test "${enable_icecc+set}" = set; then :
64781  enableval=$enable_icecc;
64782fi
64783
64784
64785  if test "x${enable_icecc}" = "xyes"; then
64786
64787
64788
64789  # Publish this variable in the help.
64790
64791
64792  if [ -z "${ICECC_CMD+x}" ]; then
64793    # The variable is not set by user, try to locate tool using the code snippet
64794    for ac_prog in icecc
64795do
64796  # Extract the first word of "$ac_prog", so it can be a program name with args.
64797set dummy $ac_prog; ac_word=$2
64798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64799$as_echo_n "checking for $ac_word... " >&6; }
64800if ${ac_cv_path_ICECC_CMD+:} false; then :
64801  $as_echo_n "(cached) " >&6
64802else
64803  case $ICECC_CMD in
64804  [\\/]* | ?:[\\/]*)
64805  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64806  ;;
64807  *)
64808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64809for as_dir in $PATH
64810do
64811  IFS=$as_save_IFS
64812  test -z "$as_dir" && as_dir=.
64813    for ac_exec_ext in '' $ac_executable_extensions; do
64814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64815    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64817    break 2
64818  fi
64819done
64820  done
64821IFS=$as_save_IFS
64822
64823  ;;
64824esac
64825fi
64826ICECC_CMD=$ac_cv_path_ICECC_CMD
64827if test -n "$ICECC_CMD"; then
64828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64829$as_echo "$ICECC_CMD" >&6; }
64830else
64831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64832$as_echo "no" >&6; }
64833fi
64834
64835
64836  test -n "$ICECC_CMD" && break
64837done
64838
64839  else
64840    # The variable is set, but is it from the command line or the environment?
64841
64842    # Try to remove the string !ICECC_CMD! from our list.
64843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64845      # If it failed, the variable was not from the command line. Ignore it,
64846      # but warn the user (except for BASH, which is always set by the calling BASH).
64847      if test "xICECC_CMD" != xBASH; then
64848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64849$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64850      fi
64851      # Try to locate tool using the code snippet
64852      for ac_prog in icecc
64853do
64854  # Extract the first word of "$ac_prog", so it can be a program name with args.
64855set dummy $ac_prog; ac_word=$2
64856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64857$as_echo_n "checking for $ac_word... " >&6; }
64858if ${ac_cv_path_ICECC_CMD+:} false; then :
64859  $as_echo_n "(cached) " >&6
64860else
64861  case $ICECC_CMD in
64862  [\\/]* | ?:[\\/]*)
64863  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64864  ;;
64865  *)
64866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64867for as_dir in $PATH
64868do
64869  IFS=$as_save_IFS
64870  test -z "$as_dir" && as_dir=.
64871    for ac_exec_ext in '' $ac_executable_extensions; do
64872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64873    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64875    break 2
64876  fi
64877done
64878  done
64879IFS=$as_save_IFS
64880
64881  ;;
64882esac
64883fi
64884ICECC_CMD=$ac_cv_path_ICECC_CMD
64885if test -n "$ICECC_CMD"; then
64886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64887$as_echo "$ICECC_CMD" >&6; }
64888else
64889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64890$as_echo "no" >&6; }
64891fi
64892
64893
64894  test -n "$ICECC_CMD" && break
64895done
64896
64897    else
64898      # If it succeeded, then it was overridden by the user. We will use it
64899      # for the tool.
64900
64901      # First remove it from the list of overridden variables, so we can test
64902      # for unknown variables in the end.
64903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64904
64905      # Check if we try to supply an empty value
64906      if test "x$ICECC_CMD" = x; then
64907        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64908$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64910$as_echo_n "checking for ICECC_CMD... " >&6; }
64911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64912$as_echo "disabled" >&6; }
64913      else
64914        # Check if the provided tool contains a complete path.
64915        tool_specified="$ICECC_CMD"
64916        tool_basename="${tool_specified##*/}"
64917        if test "x$tool_basename" = "x$tool_specified"; then
64918          # A command without a complete path is provided, search $PATH.
64919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64920$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64921          # Extract the first word of "$tool_basename", so it can be a program name with args.
64922set dummy $tool_basename; ac_word=$2
64923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64924$as_echo_n "checking for $ac_word... " >&6; }
64925if ${ac_cv_path_ICECC_CMD+:} false; then :
64926  $as_echo_n "(cached) " >&6
64927else
64928  case $ICECC_CMD in
64929  [\\/]* | ?:[\\/]*)
64930  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64931  ;;
64932  *)
64933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64934for as_dir in $PATH
64935do
64936  IFS=$as_save_IFS
64937  test -z "$as_dir" && as_dir=.
64938    for ac_exec_ext in '' $ac_executable_extensions; do
64939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64940    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64942    break 2
64943  fi
64944done
64945  done
64946IFS=$as_save_IFS
64947
64948  ;;
64949esac
64950fi
64951ICECC_CMD=$ac_cv_path_ICECC_CMD
64952if test -n "$ICECC_CMD"; then
64953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64954$as_echo "$ICECC_CMD" >&6; }
64955else
64956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64957$as_echo "no" >&6; }
64958fi
64959
64960
64961          if test "x$ICECC_CMD" = x; then
64962            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64963          fi
64964        else
64965          # Otherwise we believe it is a complete path. Use it as it is.
64966          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64967$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64968          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64969$as_echo_n "checking for ICECC_CMD... " >&6; }
64970          if test ! -x "$tool_specified"; then
64971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64972$as_echo "not found" >&6; }
64973            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64974          fi
64975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64976$as_echo "$tool_specified" >&6; }
64977        fi
64978      fi
64979    fi
64980
64981  fi
64982
64983
64984
64985  if test "x$ICECC_CMD" = x; then
64986    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64987  fi
64988
64989
64990    old_path="$PATH"
64991
64992    # Look for icecc-create-env in some known places
64993    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64994
64995
64996
64997  # Publish this variable in the help.
64998
64999
65000  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65001    # The variable is not set by user, try to locate tool using the code snippet
65002    for ac_prog in icecc-create-env
65003do
65004  # Extract the first word of "$ac_prog", so it can be a program name with args.
65005set dummy $ac_prog; ac_word=$2
65006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65007$as_echo_n "checking for $ac_word... " >&6; }
65008if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65009  $as_echo_n "(cached) " >&6
65010else
65011  case $ICECC_CREATE_ENV in
65012  [\\/]* | ?:[\\/]*)
65013  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65014  ;;
65015  *)
65016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65017for as_dir in $PATH
65018do
65019  IFS=$as_save_IFS
65020  test -z "$as_dir" && as_dir=.
65021    for ac_exec_ext in '' $ac_executable_extensions; do
65022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65023    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65025    break 2
65026  fi
65027done
65028  done
65029IFS=$as_save_IFS
65030
65031  ;;
65032esac
65033fi
65034ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65035if test -n "$ICECC_CREATE_ENV"; then
65036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65037$as_echo "$ICECC_CREATE_ENV" >&6; }
65038else
65039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65040$as_echo "no" >&6; }
65041fi
65042
65043
65044  test -n "$ICECC_CREATE_ENV" && break
65045done
65046
65047  else
65048    # The variable is set, but is it from the command line or the environment?
65049
65050    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65051    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65052    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65053      # If it failed, the variable was not from the command line. Ignore it,
65054      # but warn the user (except for BASH, which is always set by the calling BASH).
65055      if test "xICECC_CREATE_ENV" != xBASH; then
65056        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65057$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65058      fi
65059      # Try to locate tool using the code snippet
65060      for ac_prog in icecc-create-env
65061do
65062  # Extract the first word of "$ac_prog", so it can be a program name with args.
65063set dummy $ac_prog; ac_word=$2
65064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65065$as_echo_n "checking for $ac_word... " >&6; }
65066if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65067  $as_echo_n "(cached) " >&6
65068else
65069  case $ICECC_CREATE_ENV in
65070  [\\/]* | ?:[\\/]*)
65071  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65072  ;;
65073  *)
65074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65075for as_dir in $PATH
65076do
65077  IFS=$as_save_IFS
65078  test -z "$as_dir" && as_dir=.
65079    for ac_exec_ext in '' $ac_executable_extensions; do
65080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65081    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65083    break 2
65084  fi
65085done
65086  done
65087IFS=$as_save_IFS
65088
65089  ;;
65090esac
65091fi
65092ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65093if test -n "$ICECC_CREATE_ENV"; then
65094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65095$as_echo "$ICECC_CREATE_ENV" >&6; }
65096else
65097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65098$as_echo "no" >&6; }
65099fi
65100
65101
65102  test -n "$ICECC_CREATE_ENV" && break
65103done
65104
65105    else
65106      # If it succeeded, then it was overridden by the user. We will use it
65107      # for the tool.
65108
65109      # First remove it from the list of overridden variables, so we can test
65110      # for unknown variables in the end.
65111      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65112
65113      # Check if we try to supply an empty value
65114      if test "x$ICECC_CREATE_ENV" = x; then
65115        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65116$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65117        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65118$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65120$as_echo "disabled" >&6; }
65121      else
65122        # Check if the provided tool contains a complete path.
65123        tool_specified="$ICECC_CREATE_ENV"
65124        tool_basename="${tool_specified##*/}"
65125        if test "x$tool_basename" = "x$tool_specified"; then
65126          # A command without a complete path is provided, search $PATH.
65127          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65128$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65129          # Extract the first word of "$tool_basename", so it can be a program name with args.
65130set dummy $tool_basename; ac_word=$2
65131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65132$as_echo_n "checking for $ac_word... " >&6; }
65133if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65134  $as_echo_n "(cached) " >&6
65135else
65136  case $ICECC_CREATE_ENV in
65137  [\\/]* | ?:[\\/]*)
65138  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65139  ;;
65140  *)
65141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65142for as_dir in $PATH
65143do
65144  IFS=$as_save_IFS
65145  test -z "$as_dir" && as_dir=.
65146    for ac_exec_ext in '' $ac_executable_extensions; do
65147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65148    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65150    break 2
65151  fi
65152done
65153  done
65154IFS=$as_save_IFS
65155
65156  ;;
65157esac
65158fi
65159ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65160if test -n "$ICECC_CREATE_ENV"; then
65161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65162$as_echo "$ICECC_CREATE_ENV" >&6; }
65163else
65164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65165$as_echo "no" >&6; }
65166fi
65167
65168
65169          if test "x$ICECC_CREATE_ENV" = x; then
65170            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65171          fi
65172        else
65173          # Otherwise we believe it is a complete path. Use it as it is.
65174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65175$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65176          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65177$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65178          if test ! -x "$tool_specified"; then
65179            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65180$as_echo "not found" >&6; }
65181            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65182          fi
65183          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65184$as_echo "$tool_specified" >&6; }
65185        fi
65186      fi
65187    fi
65188
65189  fi
65190
65191
65192
65193  if test "x$ICECC_CREATE_ENV" = x; then
65194    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65195  fi
65196
65197
65198    # Use icecc-create-env to create a minimal compilation environment that can
65199    # be sent to the other hosts in the icecream cluster.
65200    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65201    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65202    # Older versions of icecc does not have the --gcc parameter
65203    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65204      icecc_gcc_arg="--gcc"
65205    fi
65206    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65207
65208  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65209      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65210          ${icecc_create_env_log} 2>&1 )
65211  if test "$?" != "0"; then
65212    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65213$as_echo "$as_me: icecc-create-env output:" >&6;}
65214    cat \
65215          ${icecc_create_env_log}
65216    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65217  fi
65218
65219    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65220      # For clang, the icecc compilerwrapper is needed. It usually resides next
65221      # to icecc-create-env.
65222
65223
65224
65225  # Publish this variable in the help.
65226
65227
65228  if [ -z "${ICECC_WRAPPER+x}" ]; then
65229    # The variable is not set by user, try to locate tool using the code snippet
65230    for ac_prog in compilerwrapper
65231do
65232  # Extract the first word of "$ac_prog", so it can be a program name with args.
65233set dummy $ac_prog; ac_word=$2
65234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65235$as_echo_n "checking for $ac_word... " >&6; }
65236if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65237  $as_echo_n "(cached) " >&6
65238else
65239  case $ICECC_WRAPPER in
65240  [\\/]* | ?:[\\/]*)
65241  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65242  ;;
65243  *)
65244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65245for as_dir in $PATH
65246do
65247  IFS=$as_save_IFS
65248  test -z "$as_dir" && as_dir=.
65249    for ac_exec_ext in '' $ac_executable_extensions; do
65250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65251    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65253    break 2
65254  fi
65255done
65256  done
65257IFS=$as_save_IFS
65258
65259  ;;
65260esac
65261fi
65262ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65263if test -n "$ICECC_WRAPPER"; then
65264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65265$as_echo "$ICECC_WRAPPER" >&6; }
65266else
65267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65268$as_echo "no" >&6; }
65269fi
65270
65271
65272  test -n "$ICECC_WRAPPER" && break
65273done
65274
65275  else
65276    # The variable is set, but is it from the command line or the environment?
65277
65278    # Try to remove the string !ICECC_WRAPPER! from our list.
65279    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65280    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65281      # If it failed, the variable was not from the command line. Ignore it,
65282      # but warn the user (except for BASH, which is always set by the calling BASH).
65283      if test "xICECC_WRAPPER" != xBASH; then
65284        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65285$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65286      fi
65287      # Try to locate tool using the code snippet
65288      for ac_prog in compilerwrapper
65289do
65290  # Extract the first word of "$ac_prog", so it can be a program name with args.
65291set dummy $ac_prog; ac_word=$2
65292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65293$as_echo_n "checking for $ac_word... " >&6; }
65294if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65295  $as_echo_n "(cached) " >&6
65296else
65297  case $ICECC_WRAPPER in
65298  [\\/]* | ?:[\\/]*)
65299  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65300  ;;
65301  *)
65302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65303for as_dir in $PATH
65304do
65305  IFS=$as_save_IFS
65306  test -z "$as_dir" && as_dir=.
65307    for ac_exec_ext in '' $ac_executable_extensions; do
65308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65309    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65311    break 2
65312  fi
65313done
65314  done
65315IFS=$as_save_IFS
65316
65317  ;;
65318esac
65319fi
65320ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65321if test -n "$ICECC_WRAPPER"; then
65322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65323$as_echo "$ICECC_WRAPPER" >&6; }
65324else
65325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65326$as_echo "no" >&6; }
65327fi
65328
65329
65330  test -n "$ICECC_WRAPPER" && break
65331done
65332
65333    else
65334      # If it succeeded, then it was overridden by the user. We will use it
65335      # for the tool.
65336
65337      # First remove it from the list of overridden variables, so we can test
65338      # for unknown variables in the end.
65339      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65340
65341      # Check if we try to supply an empty value
65342      if test "x$ICECC_WRAPPER" = x; then
65343        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65344$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65345        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65346$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65348$as_echo "disabled" >&6; }
65349      else
65350        # Check if the provided tool contains a complete path.
65351        tool_specified="$ICECC_WRAPPER"
65352        tool_basename="${tool_specified##*/}"
65353        if test "x$tool_basename" = "x$tool_specified"; then
65354          # A command without a complete path is provided, search $PATH.
65355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65356$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65357          # Extract the first word of "$tool_basename", so it can be a program name with args.
65358set dummy $tool_basename; ac_word=$2
65359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65360$as_echo_n "checking for $ac_word... " >&6; }
65361if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65362  $as_echo_n "(cached) " >&6
65363else
65364  case $ICECC_WRAPPER in
65365  [\\/]* | ?:[\\/]*)
65366  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65367  ;;
65368  *)
65369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65370for as_dir in $PATH
65371do
65372  IFS=$as_save_IFS
65373  test -z "$as_dir" && as_dir=.
65374    for ac_exec_ext in '' $ac_executable_extensions; do
65375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65376    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65378    break 2
65379  fi
65380done
65381  done
65382IFS=$as_save_IFS
65383
65384  ;;
65385esac
65386fi
65387ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65388if test -n "$ICECC_WRAPPER"; then
65389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65390$as_echo "$ICECC_WRAPPER" >&6; }
65391else
65392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65393$as_echo "no" >&6; }
65394fi
65395
65396
65397          if test "x$ICECC_WRAPPER" = x; then
65398            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65399          fi
65400        else
65401          # Otherwise we believe it is a complete path. Use it as it is.
65402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65403$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65404          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65405$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65406          if test ! -x "$tool_specified"; then
65407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65408$as_echo "not found" >&6; }
65409            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65410          fi
65411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65412$as_echo "$tool_specified" >&6; }
65413        fi
65414      fi
65415    fi
65416
65417  fi
65418
65419
65420
65421  if test "x$ICECC_WRAPPER" = x; then
65422    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65423  fi
65424
65425
65426
65427  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65428      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65429  if test "$?" != "0"; then
65430    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65431$as_echo "$as_me: icecc-create-env output:" >&6;}
65432    cat ${icecc_create_env_log}
65433    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65434  fi
65435
65436    else
65437      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65438    fi
65439    PATH="$old_path"
65440    # The bundle with the compiler gets a name based on checksums. Parse log file
65441    # to find it.
65442    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65443    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65444    if test ! -f ${ICECC_ENV_BUNDLE}; then
65445      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65446    fi
65447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65448$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65450$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65451    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65452
65453    if test "x${COMPILE_TYPE}" = "xcross"; then
65454      # If cross compiling, create a separate env package for the build compiler
65455      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65456      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65457      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65458
65459  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65460      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65461            ${icecc_create_env_log_build} 2>&1 )
65462  if test "$?" != "0"; then
65463    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65464$as_echo "$as_me: icecc-create-env output:" >&6;}
65465    cat \
65466            ${icecc_create_env_log_build}
65467    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65468  fi
65469
65470      elif test "x${BUILD_CC##*/}" = "xclang"; then
65471
65472  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65473      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65474  if test "$?" != "0"; then
65475    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65476$as_echo "$as_me: icecc-create-env output:" >&6;}
65477    cat ${icecc_create_env_log_build}
65478    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65479  fi
65480
65481      else
65482        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65483      fi
65484      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65485      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65486      if test ! -f ${ICECC_ENV_BUNDLE}; then
65487        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65488      fi
65489      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65490$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65492$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65493      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65494          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65495    else
65496      BUILD_ICECC="${ICECC}"
65497    fi
65498
65499
65500  fi
65501
65502
65503# Can the C/C++ compiler use precompiled headers?
65504
65505
65506  ###############################################################################
65507  #
65508  # Can the C/C++ compiler use precompiled headers?
65509  #
65510  # Check whether --enable-precompiled-headers was given.
65511if test "${enable_precompiled_headers+set}" = set; then :
65512  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65513else
65514  ENABLE_PRECOMPH=yes
65515fi
65516
65517
65518  USE_PRECOMPILED_HEADER=1
65519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65520$as_echo_n "checking If precompiled header is enabled... " >&6; }
65521  if test "x$ENABLE_PRECOMPH" = xno; then
65522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65523$as_echo "no, forced" >&6; }
65524    USE_PRECOMPILED_HEADER=0
65525  elif test "x$ICECC" != "x"; then
65526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65527$as_echo "no, does not work effectively with icecc" >&6; }
65528    USE_PRECOMPILED_HEADER=0
65529  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65531$as_echo "no, does not work with Solaris Studio" >&6; }
65532    USE_PRECOMPILED_HEADER=0
65533  else
65534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65535$as_echo "yes" >&6; }
65536  fi
65537
65538  if test "x$ENABLE_PRECOMPH" = xyes; then
65539    # Check that the compiler actually supports precomp headers.
65540    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65541      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65542$as_echo_n "checking that precompiled headers work... " >&6; }
65543      echo "int alfa();" > conftest.h
65544      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65545      if test ! -f conftest.hpp.gch; then
65546        USE_PRECOMPILED_HEADER=0
65547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65548$as_echo "no" >&6; }
65549      else
65550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65551$as_echo "yes" >&6; }
65552      fi
65553      rm -f conftest.h conftest.hpp.gch
65554    fi
65555  fi
65556
65557
65558
65559
65560# Setup use of ccache, if available
65561
65562  # Check whether --enable-ccache was given.
65563if test "${enable_ccache+set}" = set; then :
65564  enableval=$enable_ccache;
65565fi
65566
65567
65568  CCACHE=
65569  CCACHE_STATUS=
65570  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65571$as_echo_n "checking is ccache enabled... " >&6; }
65572  if test "x$enable_ccache" = xyes; then
65573    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65575$as_echo "yes" >&6; }
65576      OLD_PATH="$PATH"
65577      if test "x$TOOLCHAIN_PATH" != x; then
65578        PATH=$TOOLCHAIN_PATH:$PATH
65579      fi
65580
65581
65582
65583  # Publish this variable in the help.
65584
65585
65586  if [ -z "${CCACHE+x}" ]; then
65587    # The variable is not set by user, try to locate tool using the code snippet
65588    for ac_prog in ccache
65589do
65590  # Extract the first word of "$ac_prog", so it can be a program name with args.
65591set dummy $ac_prog; ac_word=$2
65592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65593$as_echo_n "checking for $ac_word... " >&6; }
65594if ${ac_cv_path_CCACHE+:} false; then :
65595  $as_echo_n "(cached) " >&6
65596else
65597  case $CCACHE in
65598  [\\/]* | ?:[\\/]*)
65599  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65600  ;;
65601  *)
65602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65603for as_dir in $PATH
65604do
65605  IFS=$as_save_IFS
65606  test -z "$as_dir" && as_dir=.
65607    for ac_exec_ext in '' $ac_executable_extensions; do
65608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65609    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65611    break 2
65612  fi
65613done
65614  done
65615IFS=$as_save_IFS
65616
65617  ;;
65618esac
65619fi
65620CCACHE=$ac_cv_path_CCACHE
65621if test -n "$CCACHE"; then
65622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65623$as_echo "$CCACHE" >&6; }
65624else
65625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65626$as_echo "no" >&6; }
65627fi
65628
65629
65630  test -n "$CCACHE" && break
65631done
65632
65633  else
65634    # The variable is set, but is it from the command line or the environment?
65635
65636    # Try to remove the string !CCACHE! from our list.
65637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65639      # If it failed, the variable was not from the command line. Ignore it,
65640      # but warn the user (except for BASH, which is always set by the calling BASH).
65641      if test "xCCACHE" != xBASH; then
65642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65643$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65644      fi
65645      # Try to locate tool using the code snippet
65646      for ac_prog in ccache
65647do
65648  # Extract the first word of "$ac_prog", so it can be a program name with args.
65649set dummy $ac_prog; ac_word=$2
65650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65651$as_echo_n "checking for $ac_word... " >&6; }
65652if ${ac_cv_path_CCACHE+:} false; then :
65653  $as_echo_n "(cached) " >&6
65654else
65655  case $CCACHE in
65656  [\\/]* | ?:[\\/]*)
65657  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65658  ;;
65659  *)
65660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65661for as_dir in $PATH
65662do
65663  IFS=$as_save_IFS
65664  test -z "$as_dir" && as_dir=.
65665    for ac_exec_ext in '' $ac_executable_extensions; do
65666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65667    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65669    break 2
65670  fi
65671done
65672  done
65673IFS=$as_save_IFS
65674
65675  ;;
65676esac
65677fi
65678CCACHE=$ac_cv_path_CCACHE
65679if test -n "$CCACHE"; then
65680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65681$as_echo "$CCACHE" >&6; }
65682else
65683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65684$as_echo "no" >&6; }
65685fi
65686
65687
65688  test -n "$CCACHE" && break
65689done
65690
65691    else
65692      # If it succeeded, then it was overridden by the user. We will use it
65693      # for the tool.
65694
65695      # First remove it from the list of overridden variables, so we can test
65696      # for unknown variables in the end.
65697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65698
65699      # Check if we try to supply an empty value
65700      if test "x$CCACHE" = x; then
65701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65702$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65704$as_echo_n "checking for CCACHE... " >&6; }
65705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65706$as_echo "disabled" >&6; }
65707      else
65708        # Check if the provided tool contains a complete path.
65709        tool_specified="$CCACHE"
65710        tool_basename="${tool_specified##*/}"
65711        if test "x$tool_basename" = "x$tool_specified"; then
65712          # A command without a complete path is provided, search $PATH.
65713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65714$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65715          # Extract the first word of "$tool_basename", so it can be a program name with args.
65716set dummy $tool_basename; ac_word=$2
65717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65718$as_echo_n "checking for $ac_word... " >&6; }
65719if ${ac_cv_path_CCACHE+:} false; then :
65720  $as_echo_n "(cached) " >&6
65721else
65722  case $CCACHE in
65723  [\\/]* | ?:[\\/]*)
65724  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65725  ;;
65726  *)
65727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65728for as_dir in $PATH
65729do
65730  IFS=$as_save_IFS
65731  test -z "$as_dir" && as_dir=.
65732    for ac_exec_ext in '' $ac_executable_extensions; do
65733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65734    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65736    break 2
65737  fi
65738done
65739  done
65740IFS=$as_save_IFS
65741
65742  ;;
65743esac
65744fi
65745CCACHE=$ac_cv_path_CCACHE
65746if test -n "$CCACHE"; then
65747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65748$as_echo "$CCACHE" >&6; }
65749else
65750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65751$as_echo "no" >&6; }
65752fi
65753
65754
65755          if test "x$CCACHE" = x; then
65756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65757          fi
65758        else
65759          # Otherwise we believe it is a complete path. Use it as it is.
65760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65761$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65763$as_echo_n "checking for CCACHE... " >&6; }
65764          if test ! -x "$tool_specified"; then
65765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65766$as_echo "not found" >&6; }
65767            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65768          fi
65769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65770$as_echo "$tool_specified" >&6; }
65771        fi
65772      fi
65773    fi
65774
65775  fi
65776
65777
65778
65779  if test "x$CCACHE" = x; then
65780    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65781  fi
65782
65783
65784      PATH="$OLD_PATH"
65785      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65786      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65787    else
65788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65789$as_echo "no" >&6; }
65790      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65791$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65792    fi
65793  elif test "x$enable_ccache" = xno; then
65794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65795$as_echo "no, explicitly disabled" >&6; }
65796    CCACHE_STATUS="Disabled"
65797  elif test "x$enable_ccache" = x; then
65798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65799$as_echo "no" >&6; }
65800  else
65801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65802$as_echo "unknown" >&6; }
65803    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65804  fi
65805
65806
65807
65808# Check whether --with-ccache-dir was given.
65809if test "${with_ccache_dir+set}" = set; then :
65810  withval=$with_ccache_dir;
65811fi
65812
65813
65814  if test "x$with_ccache_dir" != x; then
65815    # When using a non home ccache directory, assume the use is to share ccache files
65816    # with other users. Thus change the umask.
65817    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65818    if test "x$CCACHE" = x; then
65819      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65820$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65821    fi
65822  fi
65823
65824  if test "x$CCACHE" != x; then
65825
65826  if test "x$CCACHE" != x; then
65827    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65828      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65829          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65830      if test "x$HAS_BAD_CCACHE" != "x"; then
65831        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65832      fi
65833      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65834$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65835      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65836      PUSHED_FLAGS="$CXXFLAGS"
65837      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65838      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65839/* end confdefs.h.  */
65840
65841int
65842main ()
65843{
65844
65845  ;
65846  return 0;
65847}
65848_ACEOF
65849if ac_fn_cxx_try_compile "$LINENO"; then :
65850  CC_KNOWS_CCACHE_TRICK=yes
65851else
65852  CC_KNOWS_CCACHE_TRICK=no
65853fi
65854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65855      CXXFLAGS="$PUSHED_FLAGS"
65856      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65858$as_echo "yes" >&6; }
65859        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65860
65861        CCACHE_SLOPPINESS=pch_defines,time_macros
65862      else
65863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65864$as_echo "no" >&6; }
65865        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65866      fi
65867    fi
65868
65869    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65870        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65871
65872    if test "x$SET_CCACHE_DIR" != x; then
65873      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65874      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65875    fi
65876  fi
65877
65878  fi
65879
65880
65881###############################################################################
65882#
65883# And now the finish...
65884#
65885###############################################################################
65886
65887# Check for some common pitfalls
65888
65889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65890    file_to_test="$SRC_ROOT/LICENSE"
65891    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65892      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
65893    fi
65894  fi
65895
65896
65897  # Did user specify any unknown variables?
65898
65899  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65900    # Replace the separating ! with spaces before presenting for end user.
65901    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65902    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65903$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65904  fi
65905
65906
65907  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65908$as_echo_n "checking if build directory is on local disk... " >&6; }
65909
65910  # df -l lists only local disks; if the given directory is not found then
65911  # a non-zero exit code is given
65912  if test "x$DF" = x; then
65913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65914      # msys does not have df; use Windows "net use" instead.
65915      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65916      if test "x$IS_NETWORK_DISK" = x; then
65917        OUTPUT_DIR_IS_LOCAL="yes"
65918      else
65919        OUTPUT_DIR_IS_LOCAL="no"
65920      fi
65921    else
65922      # No df here, say it's local
65923      OUTPUT_DIR_IS_LOCAL="yes"
65924    fi
65925  else
65926    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65927      OUTPUT_DIR_IS_LOCAL="yes"
65928    else
65929      OUTPUT_DIR_IS_LOCAL="no"
65930    fi
65931  fi
65932
65933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65934$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65935
65936
65937
65938  # Check if the user has any old-style ALT_ variables set.
65939  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65940
65941  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65942  # Since we can't properly handle the dependencies for this, warn the user about the situation
65943  if test -e $OUTPUT_ROOT/spec.gmk; then
65944    IS_RECONFIGURE=yes
65945  else
65946    IS_RECONFIGURE=no
65947  fi
65948
65949
65950# At the end, call the custom hook. (Dummy macro if no custom sources available)
65951
65952
65953# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65954
65955  # Keep feature lists sorted and free of duplicates
65956  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65957  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65958  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65959  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65960  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65961  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65962  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65963
65964  # Validate features
65965  for variant in $JVM_VARIANTS; do
65966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65967$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65968    features_var_name=JVM_FEATURES_$variant
65969    JVM_FEATURES_TO_TEST=${!features_var_name}
65970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65971$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65972    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65973    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65974    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65975    if test "x$INVALID_FEATURES" != x; then
65976      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65977    fi
65978  done
65979
65980
65981# We're messing a bit with internal autoconf variables to put the config.status
65982# in the output directory instead of the current directory.
65983CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65984
65985# Create the actual output files. Now the main work of configure is done.
65986cat >confcache <<\_ACEOF
65987# This file is a shell script that caches the results of configure
65988# tests run on this system so they can be shared between configure
65989# scripts and configure runs, see configure's option --config-cache.
65990# It is not useful on other systems.  If it contains results you don't
65991# want to keep, you may remove or edit it.
65992#
65993# config.status only pays attention to the cache file if you give it
65994# the --recheck option to rerun configure.
65995#
65996# `ac_cv_env_foo' variables (set or unset) will be overridden when
65997# loading this file, other *unset* `ac_cv_foo' will be assigned the
65998# following values.
65999
66000_ACEOF
66001
66002# The following way of writing the cache mishandles newlines in values,
66003# but we know of no workaround that is simple, portable, and efficient.
66004# So, we kill variables containing newlines.
66005# Ultrix sh set writes to stderr and can't be redirected directly,
66006# and sets the high bit in the cache file unless we assign to the vars.
66007(
66008  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66009    eval ac_val=\$$ac_var
66010    case $ac_val in #(
66011    *${as_nl}*)
66012      case $ac_var in #(
66013      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66014$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66015      esac
66016      case $ac_var in #(
66017      _ | IFS | as_nl) ;; #(
66018      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66019      *) { eval $ac_var=; unset $ac_var;} ;;
66020      esac ;;
66021    esac
66022  done
66023
66024  (set) 2>&1 |
66025    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66026    *${as_nl}ac_space=\ *)
66027      # `set' does not quote correctly, so add quotes: double-quote
66028      # substitution turns \\\\ into \\, and sed turns \\ into \.
66029      sed -n \
66030	"s/'/'\\\\''/g;
66031	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66032      ;; #(
66033    *)
66034      # `set' quotes correctly as required by POSIX, so do not add quotes.
66035      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66036      ;;
66037    esac |
66038    sort
66039) |
66040  sed '
66041     /^ac_cv_env_/b end
66042     t clear
66043     :clear
66044     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66045     t end
66046     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66047     :end' >>confcache
66048if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66049  if test -w "$cache_file"; then
66050    if test "x$cache_file" != "x/dev/null"; then
66051      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66052$as_echo "$as_me: updating cache $cache_file" >&6;}
66053      if test ! -f "$cache_file" || test -h "$cache_file"; then
66054	cat confcache >"$cache_file"
66055      else
66056        case $cache_file in #(
66057        */* | ?:*)
66058	  mv -f confcache "$cache_file"$$ &&
66059	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66060        *)
66061	  mv -f confcache "$cache_file" ;;
66062	esac
66063      fi
66064    fi
66065  else
66066    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66067$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66068  fi
66069fi
66070rm -f confcache
66071
66072test "x$prefix" = xNONE && prefix=$ac_default_prefix
66073# Let make expand exec_prefix.
66074test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66075
66076# Transform confdefs.h into DEFS.
66077# Protect against shell expansion while executing Makefile rules.
66078# Protect against Makefile macro expansion.
66079#
66080# If the first sed substitution is executed (which looks for macros that
66081# take arguments), then branch to the quote section.  Otherwise,
66082# look for a macro that doesn't take arguments.
66083ac_script='
66084:mline
66085/\\$/{
66086 N
66087 s,\\\n,,
66088 b mline
66089}
66090t clear
66091:clear
66092s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66093t quote
66094s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66095t quote
66096b any
66097:quote
66098s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66099s/\[/\\&/g
66100s/\]/\\&/g
66101s/\$/$$/g
66102H
66103:any
66104${
66105	g
66106	s/^\n//
66107	s/\n/ /g
66108	p
66109}
66110'
66111DEFS=`sed -n "$ac_script" confdefs.h`
66112
66113
66114ac_libobjs=
66115ac_ltlibobjs=
66116U=
66117for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66118  # 1. Remove the extension, and $U if already installed.
66119  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66120  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66121  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66122  #    will be set to the directory where LIBOBJS objects are built.
66123  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66124  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66125done
66126LIBOBJS=$ac_libobjs
66127
66128LTLIBOBJS=$ac_ltlibobjs
66129
66130
66131
66132: "${CONFIG_STATUS=./config.status}"
66133ac_write_fail=0
66134ac_clean_files_save=$ac_clean_files
66135ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66136{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66137$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66138as_write_fail=0
66139cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66140#! $SHELL
66141# Generated by $as_me.
66142# Run this file to recreate the current configuration.
66143# Compiler output produced by configure, useful for debugging
66144# configure, is in config.log if it exists.
66145
66146debug=false
66147ac_cs_recheck=false
66148ac_cs_silent=false
66149
66150SHELL=\${CONFIG_SHELL-$SHELL}
66151export SHELL
66152_ASEOF
66153cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66154## -------------------- ##
66155## M4sh Initialization. ##
66156## -------------------- ##
66157
66158# Be more Bourne compatible
66159DUALCASE=1; export DUALCASE # for MKS sh
66160if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66161  emulate sh
66162  NULLCMD=:
66163  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66164  # is contrary to our usage.  Disable this feature.
66165  alias -g '${1+"$@"}'='"$@"'
66166  setopt NO_GLOB_SUBST
66167else
66168  case `(set -o) 2>/dev/null` in #(
66169  *posix*) :
66170    set -o posix ;; #(
66171  *) :
66172     ;;
66173esac
66174fi
66175
66176
66177as_nl='
66178'
66179export as_nl
66180# Printing a long string crashes Solaris 7 /usr/bin/printf.
66181as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66182as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66183as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66184# Prefer a ksh shell builtin over an external printf program on Solaris,
66185# but without wasting forks for bash or zsh.
66186if test -z "$BASH_VERSION$ZSH_VERSION" \
66187    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66188  as_echo='print -r --'
66189  as_echo_n='print -rn --'
66190elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66191  as_echo='printf %s\n'
66192  as_echo_n='printf %s'
66193else
66194  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66195    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66196    as_echo_n='/usr/ucb/echo -n'
66197  else
66198    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66199    as_echo_n_body='eval
66200      arg=$1;
66201      case $arg in #(
66202      *"$as_nl"*)
66203	expr "X$arg" : "X\\(.*\\)$as_nl";
66204	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66205      esac;
66206      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66207    '
66208    export as_echo_n_body
66209    as_echo_n='sh -c $as_echo_n_body as_echo'
66210  fi
66211  export as_echo_body
66212  as_echo='sh -c $as_echo_body as_echo'
66213fi
66214
66215# The user is always right.
66216if test "${PATH_SEPARATOR+set}" != set; then
66217  PATH_SEPARATOR=:
66218  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66219    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66220      PATH_SEPARATOR=';'
66221  }
66222fi
66223
66224
66225# IFS
66226# We need space, tab and new line, in precisely that order.  Quoting is
66227# there to prevent editors from complaining about space-tab.
66228# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66229# splitting by setting IFS to empty value.)
66230IFS=" ""	$as_nl"
66231
66232# Find who we are.  Look in the path if we contain no directory separator.
66233as_myself=
66234case $0 in #((
66235  *[\\/]* ) as_myself=$0 ;;
66236  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66237for as_dir in $PATH
66238do
66239  IFS=$as_save_IFS
66240  test -z "$as_dir" && as_dir=.
66241    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66242  done
66243IFS=$as_save_IFS
66244
66245     ;;
66246esac
66247# We did not find ourselves, most probably we were run as `sh COMMAND'
66248# in which case we are not to be found in the path.
66249if test "x$as_myself" = x; then
66250  as_myself=$0
66251fi
66252if test ! -f "$as_myself"; then
66253  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66254  exit 1
66255fi
66256
66257# Unset variables that we do not need and which cause bugs (e.g. in
66258# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66259# suppresses any "Segmentation fault" message there.  '((' could
66260# trigger a bug in pdksh 5.2.14.
66261for as_var in BASH_ENV ENV MAIL MAILPATH
66262do eval test x\${$as_var+set} = xset \
66263  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66264done
66265PS1='$ '
66266PS2='> '
66267PS4='+ '
66268
66269# NLS nuisances.
66270LC_ALL=C
66271export LC_ALL
66272LANGUAGE=C
66273export LANGUAGE
66274
66275# CDPATH.
66276(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66277
66278
66279# as_fn_error STATUS ERROR [LINENO LOG_FD]
66280# ----------------------------------------
66281# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66282# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66283# script with STATUS, using 1 if that was 0.
66284as_fn_error ()
66285{
66286  as_status=$1; test $as_status -eq 0 && as_status=1
66287  if test "$4"; then
66288    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66289    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66290  fi
66291  $as_echo "$as_me: error: $2" >&2
66292  as_fn_exit $as_status
66293} # as_fn_error
66294
66295
66296# as_fn_set_status STATUS
66297# -----------------------
66298# Set $? to STATUS, without forking.
66299as_fn_set_status ()
66300{
66301  return $1
66302} # as_fn_set_status
66303
66304# as_fn_exit STATUS
66305# -----------------
66306# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66307as_fn_exit ()
66308{
66309  set +e
66310  as_fn_set_status $1
66311  exit $1
66312} # as_fn_exit
66313
66314# as_fn_unset VAR
66315# ---------------
66316# Portably unset VAR.
66317as_fn_unset ()
66318{
66319  { eval $1=; unset $1;}
66320}
66321as_unset=as_fn_unset
66322# as_fn_append VAR VALUE
66323# ----------------------
66324# Append the text in VALUE to the end of the definition contained in VAR. Take
66325# advantage of any shell optimizations that allow amortized linear growth over
66326# repeated appends, instead of the typical quadratic growth present in naive
66327# implementations.
66328if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66329  eval 'as_fn_append ()
66330  {
66331    eval $1+=\$2
66332  }'
66333else
66334  as_fn_append ()
66335  {
66336    eval $1=\$$1\$2
66337  }
66338fi # as_fn_append
66339
66340# as_fn_arith ARG...
66341# ------------------
66342# Perform arithmetic evaluation on the ARGs, and store the result in the
66343# global $as_val. Take advantage of shells that can avoid forks. The arguments
66344# must be portable across $(()) and expr.
66345if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66346  eval 'as_fn_arith ()
66347  {
66348    as_val=$(( $* ))
66349  }'
66350else
66351  as_fn_arith ()
66352  {
66353    as_val=`expr "$@" || test $? -eq 1`
66354  }
66355fi # as_fn_arith
66356
66357
66358if expr a : '\(a\)' >/dev/null 2>&1 &&
66359   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66360  as_expr=expr
66361else
66362  as_expr=false
66363fi
66364
66365if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66366  as_basename=basename
66367else
66368  as_basename=false
66369fi
66370
66371if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66372  as_dirname=dirname
66373else
66374  as_dirname=false
66375fi
66376
66377as_me=`$as_basename -- "$0" ||
66378$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66379	 X"$0" : 'X\(//\)$' \| \
66380	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66381$as_echo X/"$0" |
66382    sed '/^.*\/\([^/][^/]*\)\/*$/{
66383	    s//\1/
66384	    q
66385	  }
66386	  /^X\/\(\/\/\)$/{
66387	    s//\1/
66388	    q
66389	  }
66390	  /^X\/\(\/\).*/{
66391	    s//\1/
66392	    q
66393	  }
66394	  s/.*/./; q'`
66395
66396# Avoid depending upon Character Ranges.
66397as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66398as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66399as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66400as_cr_digits='0123456789'
66401as_cr_alnum=$as_cr_Letters$as_cr_digits
66402
66403ECHO_C= ECHO_N= ECHO_T=
66404case `echo -n x` in #(((((
66405-n*)
66406  case `echo 'xy\c'` in
66407  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66408  xy)  ECHO_C='\c';;
66409  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66410       ECHO_T='	';;
66411  esac;;
66412*)
66413  ECHO_N='-n';;
66414esac
66415
66416rm -f conf$$ conf$$.exe conf$$.file
66417if test -d conf$$.dir; then
66418  rm -f conf$$.dir/conf$$.file
66419else
66420  rm -f conf$$.dir
66421  mkdir conf$$.dir 2>/dev/null
66422fi
66423if (echo >conf$$.file) 2>/dev/null; then
66424  if ln -s conf$$.file conf$$ 2>/dev/null; then
66425    as_ln_s='ln -s'
66426    # ... but there are two gotchas:
66427    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66428    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66429    # In both cases, we have to default to `cp -pR'.
66430    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66431      as_ln_s='cp -pR'
66432  elif ln conf$$.file conf$$ 2>/dev/null; then
66433    as_ln_s=ln
66434  else
66435    as_ln_s='cp -pR'
66436  fi
66437else
66438  as_ln_s='cp -pR'
66439fi
66440rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66441rmdir conf$$.dir 2>/dev/null
66442
66443
66444# as_fn_mkdir_p
66445# -------------
66446# Create "$as_dir" as a directory, including parents if necessary.
66447as_fn_mkdir_p ()
66448{
66449
66450  case $as_dir in #(
66451  -*) as_dir=./$as_dir;;
66452  esac
66453  test -d "$as_dir" || eval $as_mkdir_p || {
66454    as_dirs=
66455    while :; do
66456      case $as_dir in #(
66457      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66458      *) as_qdir=$as_dir;;
66459      esac
66460      as_dirs="'$as_qdir' $as_dirs"
66461      as_dir=`$as_dirname -- "$as_dir" ||
66462$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66463	 X"$as_dir" : 'X\(//\)[^/]' \| \
66464	 X"$as_dir" : 'X\(//\)$' \| \
66465	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66466$as_echo X"$as_dir" |
66467    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66468	    s//\1/
66469	    q
66470	  }
66471	  /^X\(\/\/\)[^/].*/{
66472	    s//\1/
66473	    q
66474	  }
66475	  /^X\(\/\/\)$/{
66476	    s//\1/
66477	    q
66478	  }
66479	  /^X\(\/\).*/{
66480	    s//\1/
66481	    q
66482	  }
66483	  s/.*/./; q'`
66484      test -d "$as_dir" && break
66485    done
66486    test -z "$as_dirs" || eval "mkdir $as_dirs"
66487  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66488
66489
66490} # as_fn_mkdir_p
66491if mkdir -p . 2>/dev/null; then
66492  as_mkdir_p='mkdir -p "$as_dir"'
66493else
66494  test -d ./-p && rmdir ./-p
66495  as_mkdir_p=false
66496fi
66497
66498
66499# as_fn_executable_p FILE
66500# -----------------------
66501# Test if FILE is an executable regular file.
66502as_fn_executable_p ()
66503{
66504  test -f "$1" && test -x "$1"
66505} # as_fn_executable_p
66506as_test_x='test -x'
66507as_executable_p=as_fn_executable_p
66508
66509# Sed expression to map a string onto a valid CPP name.
66510as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66511
66512# Sed expression to map a string onto a valid variable name.
66513as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66514
66515
66516exec 6>&1
66517## ----------------------------------- ##
66518## Main body of $CONFIG_STATUS script. ##
66519## ----------------------------------- ##
66520_ASEOF
66521test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66522
66523cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66524# Save the log message, to keep $0 and so on meaningful, and to
66525# report actual input values of CONFIG_FILES etc. instead of their
66526# values after options handling.
66527ac_log="
66528This file was extended by OpenJDK $as_me jdk9, which was
66529generated by GNU Autoconf 2.69.  Invocation command line was
66530
66531  CONFIG_FILES    = $CONFIG_FILES
66532  CONFIG_HEADERS  = $CONFIG_HEADERS
66533  CONFIG_LINKS    = $CONFIG_LINKS
66534  CONFIG_COMMANDS = $CONFIG_COMMANDS
66535  $ $0 $@
66536
66537on `(hostname || uname -n) 2>/dev/null | sed 1q`
66538"
66539
66540_ACEOF
66541
66542case $ac_config_files in *"
66543"*) set x $ac_config_files; shift; ac_config_files=$*;;
66544esac
66545
66546
66547
66548cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66549# Files that config.status was made for.
66550config_files="$ac_config_files"
66551
66552_ACEOF
66553
66554cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66555ac_cs_usage="\
66556\`$as_me' instantiates files and other configuration actions
66557from templates according to the current configuration.  Unless the files
66558and actions are specified as TAGs, all are instantiated by default.
66559
66560Usage: $0 [OPTION]... [TAG]...
66561
66562  -h, --help       print this help, then exit
66563  -V, --version    print version number and configuration settings, then exit
66564      --config     print configuration, then exit
66565  -q, --quiet, --silent
66566                   do not print progress messages
66567  -d, --debug      don't remove temporary files
66568      --recheck    update $as_me by reconfiguring in the same conditions
66569      --file=FILE[:TEMPLATE]
66570                   instantiate the configuration file FILE
66571
66572Configuration files:
66573$config_files
66574
66575Report bugs to <build-dev@openjdk.java.net>.
66576OpenJDK home page: <http://openjdk.java.net>."
66577
66578_ACEOF
66579cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66580ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66581ac_cs_version="\\
66582OpenJDK config.status jdk9
66583configured by $0, generated by GNU Autoconf 2.69,
66584  with options \\"\$ac_cs_config\\"
66585
66586Copyright (C) 2012 Free Software Foundation, Inc.
66587This config.status script is free software; the Free Software Foundation
66588gives unlimited permission to copy, distribute and modify it."
66589
66590ac_pwd='$ac_pwd'
66591srcdir='$srcdir'
66592AWK='$AWK'
66593test -n "\$AWK" || AWK=awk
66594_ACEOF
66595
66596cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66597# The default lists apply if the user does not specify any file.
66598ac_need_defaults=:
66599while test $# != 0
66600do
66601  case $1 in
66602  --*=?*)
66603    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66604    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66605    ac_shift=:
66606    ;;
66607  --*=)
66608    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66609    ac_optarg=
66610    ac_shift=:
66611    ;;
66612  *)
66613    ac_option=$1
66614    ac_optarg=$2
66615    ac_shift=shift
66616    ;;
66617  esac
66618
66619  case $ac_option in
66620  # Handling of the options.
66621  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66622    ac_cs_recheck=: ;;
66623  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66624    $as_echo "$ac_cs_version"; exit ;;
66625  --config | --confi | --conf | --con | --co | --c )
66626    $as_echo "$ac_cs_config"; exit ;;
66627  --debug | --debu | --deb | --de | --d | -d )
66628    debug=: ;;
66629  --file | --fil | --fi | --f )
66630    $ac_shift
66631    case $ac_optarg in
66632    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66633    '') as_fn_error $? "missing file argument" ;;
66634    esac
66635    as_fn_append CONFIG_FILES " '$ac_optarg'"
66636    ac_need_defaults=false;;
66637  --he | --h |  --help | --hel | -h )
66638    $as_echo "$ac_cs_usage"; exit ;;
66639  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66640  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66641    ac_cs_silent=: ;;
66642
66643  # This is an error.
66644  -*) as_fn_error $? "unrecognized option: \`$1'
66645Try \`$0 --help' for more information." ;;
66646
66647  *) as_fn_append ac_config_targets " $1"
66648     ac_need_defaults=false ;;
66649
66650  esac
66651  shift
66652done
66653
66654ac_configure_extra_args=
66655
66656if $ac_cs_silent; then
66657  exec 6>/dev/null
66658  ac_configure_extra_args="$ac_configure_extra_args --silent"
66659fi
66660
66661_ACEOF
66662cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66663if \$ac_cs_recheck; then
66664  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66665  shift
66666  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66667  CONFIG_SHELL='$SHELL'
66668  export CONFIG_SHELL
66669  exec "\$@"
66670fi
66671
66672_ACEOF
66673cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66674exec 5>>config.log
66675{
66676  echo
66677  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66678## Running $as_me. ##
66679_ASBOX
66680  $as_echo "$ac_log"
66681} >&5
66682
66683_ACEOF
66684cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66685_ACEOF
66686
66687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66688
66689# Handling of arguments.
66690for ac_config_target in $ac_config_targets
66691do
66692  case $ac_config_target in
66693    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66694    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66695    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66696    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66697    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66698
66699  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66700  esac
66701done
66702
66703
66704# If the user did not use the arguments to specify the items to instantiate,
66705# then the envvar interface is used.  Set only those that are not.
66706# We use the long form for the default assignment because of an extremely
66707# bizarre bug on SunOS 4.1.3.
66708if $ac_need_defaults; then
66709  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66710fi
66711
66712# Have a temporary directory for convenience.  Make it in the build tree
66713# simply because there is no reason against having it here, and in addition,
66714# creating and moving files from /tmp can sometimes cause problems.
66715# Hook for its removal unless debugging.
66716# Note that there is a small window in which the directory will not be cleaned:
66717# after its creation but before its name has been assigned to `$tmp'.
66718$debug ||
66719{
66720  tmp= ac_tmp=
66721  trap 'exit_status=$?
66722  : "${ac_tmp:=$tmp}"
66723  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66724' 0
66725  trap 'as_fn_exit 1' 1 2 13 15
66726}
66727# Create a (secure) tmp directory for tmp files.
66728
66729{
66730  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66731  test -d "$tmp"
66732}  ||
66733{
66734  tmp=./conf$$-$RANDOM
66735  (umask 077 && mkdir "$tmp")
66736} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66737ac_tmp=$tmp
66738
66739# Set up the scripts for CONFIG_FILES section.
66740# No need to generate them if there are no CONFIG_FILES.
66741# This happens for instance with `./config.status config.h'.
66742if test -n "$CONFIG_FILES"; then
66743
66744
66745ac_cr=`echo X | tr X '\015'`
66746# On cygwin, bash can eat \r inside `` if the user requested igncr.
66747# But we know of no other shell where ac_cr would be empty at this
66748# point, so we can use a bashism as a fallback.
66749if test "x$ac_cr" = x; then
66750  eval ac_cr=\$\'\\r\'
66751fi
66752ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66753if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66754  ac_cs_awk_cr='\\r'
66755else
66756  ac_cs_awk_cr=$ac_cr
66757fi
66758
66759echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66760_ACEOF
66761
66762
66763{
66764  echo "cat >conf$$subs.awk <<_ACEOF" &&
66765  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66766  echo "_ACEOF"
66767} >conf$$subs.sh ||
66768  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66769ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66770ac_delim='%!_!# '
66771for ac_last_try in false false false false false :; do
66772  . ./conf$$subs.sh ||
66773    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66774
66775  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66776  if test $ac_delim_n = $ac_delim_num; then
66777    break
66778  elif $ac_last_try; then
66779    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66780  else
66781    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66782  fi
66783done
66784rm -f conf$$subs.sh
66785
66786cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66787cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66788_ACEOF
66789sed -n '
66790h
66791s/^/S["/; s/!.*/"]=/
66792p
66793g
66794s/^[^!]*!//
66795:repl
66796t repl
66797s/'"$ac_delim"'$//
66798t delim
66799:nl
66800h
66801s/\(.\{148\}\)..*/\1/
66802t more1
66803s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66804p
66805n
66806b repl
66807:more1
66808s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66809p
66810g
66811s/.\{148\}//
66812t nl
66813:delim
66814h
66815s/\(.\{148\}\)..*/\1/
66816t more2
66817s/["\\]/\\&/g; s/^/"/; s/$/"/
66818p
66819b
66820:more2
66821s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66822p
66823g
66824s/.\{148\}//
66825t delim
66826' <conf$$subs.awk | sed '
66827/^[^""]/{
66828  N
66829  s/\n//
66830}
66831' >>$CONFIG_STATUS || ac_write_fail=1
66832rm -f conf$$subs.awk
66833cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66834_ACAWK
66835cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66836  for (key in S) S_is_set[key] = 1
66837  FS = ""
66838
66839}
66840{
66841  line = $ 0
66842  nfields = split(line, field, "@")
66843  substed = 0
66844  len = length(field[1])
66845  for (i = 2; i < nfields; i++) {
66846    key = field[i]
66847    keylen = length(key)
66848    if (S_is_set[key]) {
66849      value = S[key]
66850      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66851      len += length(value) + length(field[++i])
66852      substed = 1
66853    } else
66854      len += 1 + keylen
66855  }
66856
66857  print line
66858}
66859
66860_ACAWK
66861_ACEOF
66862cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66863if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66864  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66865else
66866  cat
66867fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66868  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66869_ACEOF
66870
66871# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66872# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66873# trailing colons and then remove the whole line if VPATH becomes empty
66874# (actually we leave an empty line to preserve line numbers).
66875if test "x$srcdir" = x.; then
66876  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66877h
66878s///
66879s/^/:/
66880s/[	 ]*$/:/
66881s/:\$(srcdir):/:/g
66882s/:\${srcdir}:/:/g
66883s/:@srcdir@:/:/g
66884s/^:*//
66885s/:*$//
66886x
66887s/\(=[	 ]*\).*/\1/
66888G
66889s/\n//
66890s/^[^=]*=[	 ]*$//
66891}'
66892fi
66893
66894cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66895fi # test -n "$CONFIG_FILES"
66896
66897
66898eval set X "  :F $CONFIG_FILES      "
66899shift
66900for ac_tag
66901do
66902  case $ac_tag in
66903  :[FHLC]) ac_mode=$ac_tag; continue;;
66904  esac
66905  case $ac_mode$ac_tag in
66906  :[FHL]*:*);;
66907  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66908  :[FH]-) ac_tag=-:-;;
66909  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66910  esac
66911  ac_save_IFS=$IFS
66912  IFS=:
66913  set x $ac_tag
66914  IFS=$ac_save_IFS
66915  shift
66916  ac_file=$1
66917  shift
66918
66919  case $ac_mode in
66920  :L) ac_source=$1;;
66921  :[FH])
66922    ac_file_inputs=
66923    for ac_f
66924    do
66925      case $ac_f in
66926      -) ac_f="$ac_tmp/stdin";;
66927      *) # Look for the file first in the build tree, then in the source tree
66928	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66929	 # because $ac_f cannot contain `:'.
66930	 test -f "$ac_f" ||
66931	   case $ac_f in
66932	   [\\/$]*) false;;
66933	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66934	   esac ||
66935	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66936      esac
66937      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66938      as_fn_append ac_file_inputs " '$ac_f'"
66939    done
66940
66941    # Let's still pretend it is `configure' which instantiates (i.e., don't
66942    # use $as_me), people would be surprised to read:
66943    #    /* config.h.  Generated by config.status.  */
66944    configure_input='Generated from '`
66945	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66946	`' by configure.'
66947    if test x"$ac_file" != x-; then
66948      configure_input="$ac_file.  $configure_input"
66949      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66950$as_echo "$as_me: creating $ac_file" >&6;}
66951    fi
66952    # Neutralize special characters interpreted by sed in replacement strings.
66953    case $configure_input in #(
66954    *\&* | *\|* | *\\* )
66955       ac_sed_conf_input=`$as_echo "$configure_input" |
66956       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66957    *) ac_sed_conf_input=$configure_input;;
66958    esac
66959
66960    case $ac_tag in
66961    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66962      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66963    esac
66964    ;;
66965  esac
66966
66967  ac_dir=`$as_dirname -- "$ac_file" ||
66968$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66969	 X"$ac_file" : 'X\(//\)[^/]' \| \
66970	 X"$ac_file" : 'X\(//\)$' \| \
66971	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66972$as_echo X"$ac_file" |
66973    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66974	    s//\1/
66975	    q
66976	  }
66977	  /^X\(\/\/\)[^/].*/{
66978	    s//\1/
66979	    q
66980	  }
66981	  /^X\(\/\/\)$/{
66982	    s//\1/
66983	    q
66984	  }
66985	  /^X\(\/\).*/{
66986	    s//\1/
66987	    q
66988	  }
66989	  s/.*/./; q'`
66990  as_dir="$ac_dir"; as_fn_mkdir_p
66991  ac_builddir=.
66992
66993case "$ac_dir" in
66994.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66995*)
66996  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66997  # A ".." for each directory in $ac_dir_suffix.
66998  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66999  case $ac_top_builddir_sub in
67000  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67001  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67002  esac ;;
67003esac
67004ac_abs_top_builddir=$ac_pwd
67005ac_abs_builddir=$ac_pwd$ac_dir_suffix
67006# for backward compatibility:
67007ac_top_builddir=$ac_top_build_prefix
67008
67009case $srcdir in
67010  .)  # We are building in place.
67011    ac_srcdir=.
67012    ac_top_srcdir=$ac_top_builddir_sub
67013    ac_abs_top_srcdir=$ac_pwd ;;
67014  [\\/]* | ?:[\\/]* )  # Absolute name.
67015    ac_srcdir=$srcdir$ac_dir_suffix;
67016    ac_top_srcdir=$srcdir
67017    ac_abs_top_srcdir=$srcdir ;;
67018  *) # Relative name.
67019    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67020    ac_top_srcdir=$ac_top_build_prefix$srcdir
67021    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67022esac
67023ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67024
67025
67026  case $ac_mode in
67027  :F)
67028  #
67029  # CONFIG_FILE
67030  #
67031
67032_ACEOF
67033
67034cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67035# If the template does not know about datarootdir, expand it.
67036# FIXME: This hack should be removed a few years after 2.60.
67037ac_datarootdir_hack=; ac_datarootdir_seen=
67038ac_sed_dataroot='
67039/datarootdir/ {
67040  p
67041  q
67042}
67043/@datadir@/p
67044/@docdir@/p
67045/@infodir@/p
67046/@localedir@/p
67047/@mandir@/p'
67048case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67049*datarootdir*) ac_datarootdir_seen=yes;;
67050*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67051  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67052$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67053_ACEOF
67054cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67055  ac_datarootdir_hack='
67056  s&@datadir@&$datadir&g
67057  s&@docdir@&$docdir&g
67058  s&@infodir@&$infodir&g
67059  s&@localedir@&$localedir&g
67060  s&@mandir@&$mandir&g
67061  s&\\\${datarootdir}&$datarootdir&g' ;;
67062esac
67063_ACEOF
67064
67065# Neutralize VPATH when `$srcdir' = `.'.
67066# Shell code in configure.ac might set extrasub.
67067# FIXME: do we really want to maintain this feature?
67068cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67069ac_sed_extra="$ac_vpsub
67070$extrasub
67071_ACEOF
67072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67073:t
67074/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67075s|@configure_input@|$ac_sed_conf_input|;t t
67076s&@top_builddir@&$ac_top_builddir_sub&;t t
67077s&@top_build_prefix@&$ac_top_build_prefix&;t t
67078s&@srcdir@&$ac_srcdir&;t t
67079s&@abs_srcdir@&$ac_abs_srcdir&;t t
67080s&@top_srcdir@&$ac_top_srcdir&;t t
67081s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67082s&@builddir@&$ac_builddir&;t t
67083s&@abs_builddir@&$ac_abs_builddir&;t t
67084s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67085$ac_datarootdir_hack
67086"
67087eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67088  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67089
67090test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67091  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67092  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67093      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67094  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67095which seems to be undefined.  Please make sure it is defined" >&5
67096$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67097which seems to be undefined.  Please make sure it is defined" >&2;}
67098
67099  rm -f "$ac_tmp/stdin"
67100  case $ac_file in
67101  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67102  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67103  esac \
67104  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67105 ;;
67106
67107
67108
67109  esac
67110
67111done # for ac_tag
67112
67113
67114as_fn_exit 0
67115_ACEOF
67116ac_clean_files=$ac_clean_files_save
67117
67118test $ac_write_fail = 0 ||
67119  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67120
67121
67122# configure is writing to config.log, and then calls config.status.
67123# config.status does its own redirection, appending to config.log.
67124# Unfortunately, on DOS this fails, as config.log is still kept open
67125# by configure, so config.status won't be able to write to it; its
67126# output is simply discarded.  So we exec the FD to /dev/null,
67127# effectively closing config.log, so it can be properly (re)opened and
67128# appended to by config.status.  When coming back to configure, we
67129# need to make the FD available again.
67130if test "$no_create" != yes; then
67131  ac_cs_success=:
67132  ac_config_status_args=
67133  test "$silent" = yes &&
67134    ac_config_status_args="$ac_config_status_args --quiet"
67135  exec 5>/dev/null
67136  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67137  exec 5>>config.log
67138  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67139  # would make configure fail if this is the last instruction.
67140  $ac_cs_success || as_fn_exit 1
67141fi
67142if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67143  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67144$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67145fi
67146
67147
67148# After AC_OUTPUT, we need to do final work
67149
67150
67151  # Try to move config.log (generated by autoconf) to the configure-support directory.
67152  if test -e ./config.log; then
67153    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67154  fi
67155
67156  # Rotate our log file (configure.log)
67157  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67158    $RM -f "$OUTPUT_ROOT/configure.log.old"
67159  fi
67160  if test -e "$OUTPUT_ROOT/configure.log"; then
67161    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67162  fi
67163
67164  # Move configure.log from current directory to the build output root
67165  if test -e ./configure.log; then
67166    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67167  fi
67168
67169  # Make the compare script executable
67170  $CHMOD +x $OUTPUT_ROOT/compare.sh
67171
67172
67173# Finally output some useful information to the user
67174
67175  # Finally output some useful information to the user
67176
67177  printf "\n"
67178  printf "====================================================\n"
67179  if test "x$no_create" != "xyes"; then
67180    if test "x$IS_RECONFIGURE" != "xyes"; then
67181      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67182    else
67183      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67184    fi
67185  else
67186    if test "x$IS_RECONFIGURE" != "xyes"; then
67187      printf "A configuration has been successfully checked but not created\n"
67188    else
67189      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67190    fi
67191  fi
67192  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67193    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67194  else
67195    printf "using default settings.\n"
67196  fi
67197
67198  printf "\n"
67199  printf "Configuration summary:\n"
67200  printf "* Debug level:    $DEBUG_LEVEL\n"
67201  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67202  printf "* JDK variant:    $JDK_VARIANT\n"
67203  printf "* JVM variants:   $JVM_VARIANTS\n"
67204  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67205  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67206
67207  printf "\n"
67208  printf "Tools summary:\n"
67209  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67210    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67211  fi
67212  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67213  if test "x$TOOLCHAIN_VERSION" != "x"; then
67214    print_version=" $TOOLCHAIN_VERSION"
67215  fi
67216  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67217  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67218  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67219
67220  printf "\n"
67221  printf "Build performance summary:\n"
67222  printf "* Cores to use:   $JOBS\n"
67223  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67224  if test "x$CCACHE_STATUS" != "x"; then
67225    printf "* ccache status:  $CCACHE_STATUS\n"
67226  fi
67227  printf "\n"
67228
67229  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67230    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67231    printf "will result in longer build times.\n"
67232    printf "\n"
67233  fi
67234
67235  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67236    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67237    printf "These are not respected, and will be ignored. It is recommended\n"
67238    printf "that you clean your environment. The following variables are set:\n"
67239    printf "$FOUND_ALT_VARIABLES\n"
67240    printf "\n"
67241  fi
67242
67243  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67244    printf "WARNING: Your build output directory is not on a local disk.\n"
67245    printf "This will severely degrade build performance!\n"
67246    printf "It is recommended that you create an output directory on a local disk,\n"
67247    printf "and run the configure script again from that directory.\n"
67248    printf "\n"
67249  fi
67250
67251  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67252    printf "WARNING: The result of this configuration has overridden an older\n"
67253    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67254    printf "proper build. Failure to do so might result in strange build problems.\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 was not saved.\n"
67260    printf "You should run without '--no-create | -n' to create the configuration.\n"
67261    printf "\n"
67262  fi
67263
67264
67265
67266  # Locate config.log.
67267  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67268    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67269  elif test -e "./config.log"; then
67270    CONFIG_LOG_PATH="."
67271  fi
67272
67273  if test -e "$CONFIG_LOG_PATH/config.log"; then
67274    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67275    if test $? -eq 0; then
67276      printf "The following warnings were produced. Repeated here for convenience:\n"
67277      # We must quote sed expression (using []) to stop m4 from eating the [].
67278      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67279      printf "\n"
67280    fi
67281  fi
67282
67283