generated-configure.sh revision 2200:b22aa0dc79b4
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657STLPORT_LIB
658LIBZIP_CAN_USE_MMAP
659LIBDL
660LIBM
661USE_EXTERNAL_LCMS
662LCMS_LIBS
663LCMS_CFLAGS
664USE_EXTERNAL_LIBZ
665USE_EXTERNAL_LIBPNG
666PNG_LIBS
667PNG_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670LLVM_LIBS
671LLVM_LDFLAGS
672LLVM_CFLAGS
673LLVM_CONFIG
674LIBFFI_LIBS
675LIBFFI_CFLAGS
676ALSA_LIBS
677ALSA_CFLAGS
678FREETYPE_BUNDLE_LIB_PATH
679FREETYPE_LIBS
680FREETYPE_CFLAGS
681CUPS_CFLAGS
682X_EXTRA_LIBS
683X_LIBS
684X_PRE_LIBS
685X_CFLAGS
686XMKMF
687MSVCP_DLL
688MSVCR_DLL
689LIBCXX
690STATIC_CXX_SETTING
691FIXPATH_DETACH_FLAG
692FIXPATH
693BUILD_GTEST
694VALID_JVM_FEATURES
695JVM_FEATURES_custom
696JVM_FEATURES_zeroshark
697JVM_FEATURES_zero
698JVM_FEATURES_minimal
699JVM_FEATURES_core
700JVM_FEATURES_client
701JVM_FEATURES_server
702INCLUDE_DTRACE
703GCOV_ENABLED
704STRIP_POLICY
705DEBUG_BINARIES
706ZIP_EXTERNAL_DEBUG_SYMBOLS
707COPY_DEBUG_SYMBOLS
708COMPILE_WITH_DEBUG_SYMBOLS
709CFLAGS_WARNINGS_ARE_ERRORS
710BUILD_CC_DISABLE_WARNING_PREFIX
711DISABLE_WARNING_PREFIX
712HOTSPOT_SET_WARNINGS_AS_ERRORS
713WARNINGS_AS_ERRORS
714COMPILER_SUPPORTS_TARGET_BITS_FLAG
715ZERO_ARCHFLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MIN
752NO_LIFETIME_DSE_CFLAG
753NO_NULL_POINTER_CHECK_CFLAG
754CXXSTD_CXXFLAG
755CXX_O_FLAG_SIZE
756CXX_O_FLAG_NONE
757CXX_O_FLAG_DEBUG
758CXX_O_FLAG_NORM
759CXX_O_FLAG_HI
760CXX_O_FLAG_HIGHEST
761CXX_O_FLAG_HIGHEST_JVM
762C_O_FLAG_SIZE
763C_O_FLAG_NONE
764C_O_FLAG_DEBUG
765C_O_FLAG_NORM
766C_O_FLAG_HI
767C_O_FLAG_HIGHEST
768C_O_FLAG_HIGHEST_JVM
769JVM_CFLAGS_SYMBOLS
770CXXFLAGS_DEBUG_SYMBOLS
771CFLAGS_DEBUG_SYMBOLS
772CXX_FLAG_DEPS
773C_FLAG_DEPS
774SHARED_LIBRARY_FLAGS
775SET_SHARED_LIBRARY_MAPFILE
776SET_SHARED_LIBRARY_NAME
777SET_SHARED_LIBRARY_ORIGIN
778SET_EXECUTABLE_ORIGIN
779CXX_FLAG_REORDER
780C_FLAG_REORDER
781JVM_RCFLAGS
782RC_FLAGS
783AR_OUT_OPTION
784LD_OUT_OPTION
785EXE_OUT_OPTION
786CC_OUT_OPTION
787STRIPFLAGS
788ARFLAGS
789COMPILER_BINDCMD_FILE_FLAG
790COMPILER_COMMAND_FILE_FLAG
791COMPILER_TARGET_BITS_FLAG
792JT_HOME
793JTREGEXE
794HOTSPOT_TOOLCHAIN_TYPE
795USING_BROKEN_SUSE_LD
796PACKAGE_PATH
797USE_CLANG
798HOTSPOT_LD
799HOTSPOT_CXX
800HOTSPOT_RC
801HOTSPOT_MT
802BUILD_AS
803BUILD_LDCXX
804BUILD_LD
805BUILD_STRIP
806BUILD_OBJCOPY
807BUILD_AR
808BUILD_NM
809BUILD_CXX
810BUILD_CC
811BUILD_SYSROOT_LDFLAGS
812BUILD_SYSROOT_CFLAGS
813ac_ct_OBJDUMP
814OBJDUMP
815ac_ct_OBJCOPY
816OBJCOPY
817ac_ct_NM
818ac_ct_STRIP
819GNM
820NM
821STRIP
822MSBUILD
823DUMPBIN
824RC
825MT
826LIPO
827ac_ct_AR
828AR
829AS
830LDCXX
831LD
832CXXCPP
833CPP
834CXX_VERSION_NUMBER
835CC_VERSION_NUMBER
836ac_ct_CXX
837CXXFLAGS
838CXX
839TOOLCHAIN_PATH_CXX
840POTENTIAL_CXX
841OBJEXT
842EXEEXT
843ac_ct_CC
844CPPFLAGS
845LDFLAGS
846CFLAGS
847CC
848TOOLCHAIN_PATH_CC
849POTENTIAL_CC
850TOOLCHAIN_VERSION
851VS_LIB
852VS_INCLUDE
853VS_PATH
854CYGWIN_LINK
855SYSROOT_LDFLAGS
856SYSROOT_CFLAGS
857EXTRA_LDFLAGS
858EXTRA_CXXFLAGS
859EXTRA_CFLAGS
860LEGACY_EXTRA_LDFLAGS
861LEGACY_EXTRA_CXXFLAGS
862LEGACY_EXTRA_CFLAGS
863EXE_SUFFIX
864OBJ_SUFFIX
865STATIC_LIBRARY
866SHARED_LIBRARY
867STATIC_LIBRARY_SUFFIX
868SHARED_LIBRARY_SUFFIX
869LIBRARY_PREFIX
870TOOLCHAIN_TYPE
871STATIC_BUILD
872IMPORT_MODULES_MAKE
873IMPORT_MODULES_SRC
874IMPORT_MODULES_CONF
875IMPORT_MODULES_LIBS
876IMPORT_MODULES_CMDS
877IMPORT_MODULES_CLASSES
878BUILD_HOTSPOT
879HOTSPOT_DIST
880BUILD_OUTPUT
881JDK_TOPDIR
882NASHORN_TOPDIR
883HOTSPOT_TOPDIR
884JAXWS_TOPDIR
885JAXP_TOPDIR
886CORBA_TOPDIR
887LANGTOOLS_TOPDIR
888EXTERNAL_BUILDJDK
889BUILD_JDK
890CREATE_BUILDJDK
891JLINK
892JMOD
893BOOT_JDK_BITS
894JAVAC_FLAGS
895BOOT_JDK_MODULAR
896BOOT_JDK_SOURCETARGET
897JARSIGNER
898JAR
899JAVAH
900JAVAC
901JAVA
902BOOT_JDK
903JAVA_CHECK
904JAVAC_CHECK
905VERSION_IS_GA
906VERSION_SHORT
907VERSION_STRING
908VERSION_NUMBER_FOUR_POSITIONS
909VERSION_NUMBER
910VERSION_OPT
911VERSION_BUILD
912VERSION_PRE
913VERSION_PATCH
914VERSION_SECURITY
915VERSION_MINOR
916VERSION_MAJOR
917MACOSX_BUNDLE_ID_BASE
918MACOSX_BUNDLE_NAME_BASE
919HOTSPOT_VM_DISTRO
920COMPANY_NAME
921JDK_RC_PLATFORM_NAME
922PRODUCT_SUFFIX
923PRODUCT_NAME
924LAUNCHER_NAME
925JLINK_KEEP_PACKAGED_MODULES
926COPYRIGHT_YEAR
927COMPRESS_JARS
928INCLUDE_SA
929UNLIMITED_CRYPTO
930CACERTS_FILE
931BUILD_HEADLESS
932SUPPORT_HEADFUL
933SUPPORT_HEADLESS
934DEFAULT_MAKE_TARGET
935OS_VERSION_MICRO
936OS_VERSION_MINOR
937OS_VERSION_MAJOR
938PKG_CONFIG
939BASH_ARGS
940SETFILE
941CODESIGN
942XATTR
943DSYMUTIL
944IS_GNU_TIME
945PATCH
946DTRACE
947TIME
948STAT
949HG
950READELF
951OTOOL
952LDD
953ZIP
954UNZIP
955TAR_SUPPORTS_TRANSFORM
956TAR_INCLUDE_PARAM
957TAR_CREATE_EXTRA_PARAM
958TAR_TYPE
959FIND_DELETE
960OUTPUT_SYNC
961OUTPUT_SYNC_SUPPORTED
962CHECK_TOOLSDIR_MAKE
963CHECK_TOOLSDIR_GMAKE
964CHECK_MAKE
965CHECK_GMAKE
966MAKE
967PKGHANDLER
968CONFIGURESUPPORT_OUTPUTDIR
969OUTPUT_ROOT
970CONF_NAME
971SPEC
972SDKROOT
973XCODEBUILD
974VALID_JVM_VARIANTS
975JVM_VARIANTS
976DEBUG_LEVEL
977HOTSPOT_DEBUG_LEVEL
978JDK_VARIANT
979USERNAME
980CANONICAL_TOPDIR
981ORIGINAL_TOPDIR
982TOPDIR
983PATH_SEP
984ZERO_ARCHDEF
985HOTSPOT_BUILD_CPU_DEFINE
986HOTSPOT_BUILD_CPU_ARCH
987HOTSPOT_BUILD_CPU
988HOTSPOT_BUILD_OS_TYPE
989HOTSPOT_BUILD_OS
990OPENJDK_BUILD_BUNDLE_PLATFORM
991OPENJDK_BUILD_CPU_BUNDLE
992OPENJDK_BUILD_OS_BUNDLE
993OPENJDK_BUILD_OS_EXPORT_DIR
994OPENJDK_BUILD_CPU_JLI_CFLAGS
995OPENJDK_BUILD_CPU_OSARCH
996OPENJDK_BUILD_CPU_ISADIR
997OPENJDK_BUILD_CPU_LIBDIR
998OPENJDK_BUILD_CPU_LEGACY_LIB
999OPENJDK_BUILD_CPU_LEGACY
1000HOTSPOT_TARGET_CPU_DEFINE
1001HOTSPOT_TARGET_CPU_ARCH
1002HOTSPOT_TARGET_CPU
1003HOTSPOT_TARGET_OS_TYPE
1004HOTSPOT_TARGET_OS
1005DEFINE_CROSS_COMPILE_ARCH
1006LP64
1007OPENJDK_TARGET_BUNDLE_PLATFORM
1008OPENJDK_TARGET_CPU_BUNDLE
1009OPENJDK_TARGET_OS_BUNDLE
1010OPENJDK_TARGET_OS_EXPORT_DIR
1011OPENJDK_TARGET_CPU_JLI_CFLAGS
1012OPENJDK_TARGET_CPU_OSARCH
1013OPENJDK_TARGET_CPU_ISADIR
1014OPENJDK_TARGET_CPU_LIBDIR
1015OPENJDK_TARGET_CPU_LEGACY_LIB
1016OPENJDK_TARGET_CPU_LEGACY
1017REQUIRED_OS_VERSION
1018REQUIRED_OS_NAME
1019COMPILE_TYPE
1020OPENJDK_TARGET_CPU_ENDIAN
1021OPENJDK_TARGET_CPU_BITS
1022OPENJDK_TARGET_CPU_ARCH
1023OPENJDK_TARGET_CPU
1024OPENJDK_TARGET_OS_ENV
1025OPENJDK_TARGET_OS_TYPE
1026OPENJDK_TARGET_OS
1027OPENJDK_BUILD_CPU_ENDIAN
1028OPENJDK_BUILD_CPU_BITS
1029OPENJDK_BUILD_CPU_ARCH
1030OPENJDK_BUILD_CPU
1031OPENJDK_BUILD_OS_ENV
1032OPENJDK_BUILD_OS_TYPE
1033OPENJDK_BUILD_OS
1034OPENJDK_BUILD_AUTOCONF_NAME
1035OPENJDK_TARGET_AUTOCONF_NAME
1036target_os
1037target_vendor
1038target_cpu
1039target
1040host_os
1041host_vendor
1042host_cpu
1043host
1044build_os
1045build_vendor
1046build_cpu
1047build
1048NICE
1049CPIO
1050DF
1051READLINK
1052CYGPATH
1053SED
1054FGREP
1055EGREP
1056GREP
1057AWK
1058XARGS
1059WHICH
1060WC
1061UNIQ
1062UNAME
1063TR
1064TOUCH
1065TEE
1066TAR
1067TAIL
1068SORT
1069SH
1070RMDIR
1071RM
1072PRINTF
1073NAWK
1074MV
1075MKTEMP
1076MKDIR
1077LS
1078LN
1079GZIP
1080GUNZIP
1081HEAD
1082FIND
1083FILE
1084EXPR
1085ECHO
1086DIRNAME
1087DIFF
1088DATE
1089CUT
1090CP
1091COMM
1092CMP
1093CHMOD
1094CAT
1095BASH
1096BASENAME
1097DATE_WHEN_CONFIGURED
1098ORIGINAL_PATH
1099CONFIGURE_COMMAND_LINE
1100target_alias
1101host_alias
1102build_alias
1103LIBS
1104ECHO_T
1105ECHO_N
1106ECHO_C
1107DEFS
1108mandir
1109localedir
1110libdir
1111psdir
1112pdfdir
1113dvidir
1114htmldir
1115infodir
1116docdir
1117oldincludedir
1118includedir
1119localstatedir
1120sharedstatedir
1121sysconfdir
1122datadir
1123datarootdir
1124libexecdir
1125sbindir
1126bindir
1127program_transform_name
1128prefix
1129exec_prefix
1130PACKAGE_URL
1131PACKAGE_BUGREPORT
1132PACKAGE_STRING
1133PACKAGE_VERSION
1134PACKAGE_TARNAME
1135PACKAGE_NAME
1136PATH_SEPARATOR
1137SHELL'
1138ac_subst_files=''
1139ac_user_opts='
1140enable_option_checking
1141with_target_bits
1142enable_openjdk_only
1143with_custom_make_dir
1144with_jdk_variant
1145enable_debug
1146with_debug_level
1147with_jvm_variants
1148with_devkit
1149with_sys_root
1150with_sysroot
1151with_tools_dir
1152with_toolchain_path
1153with_extra_path
1154with_sdk_name
1155with_conf_name
1156with_output_sync
1157with_default_make_target
1158enable_headful
1159with_cacerts_file
1160enable_unlimited_crypto
1161with_copyright_year
1162enable_keep_packaged_modules
1163with_milestone
1164with_update_version
1165with_user_release_suffix
1166with_build_number
1167with_version_string
1168with_version_pre
1169with_version_opt
1170with_version_build
1171with_version_major
1172with_version_minor
1173with_version_security
1174with_version_patch
1175with_boot_jdk
1176with_build_jdk
1177with_add_source_root
1178with_override_source_root
1179with_adds_and_overrides
1180with_override_langtools
1181with_override_corba
1182with_override_jaxp
1183with_override_jaxws
1184with_override_hotspot
1185with_override_nashorn
1186with_override_jdk
1187with_import_hotspot
1188with_import_modules
1189enable_static_build
1190with_toolchain_type
1191with_extra_cflags
1192with_extra_cxxflags
1193with_extra_ldflags
1194with_toolchain_version
1195with_build_devkit
1196with_jtreg
1197enable_warnings_as_errors
1198with_native_debug_symbols
1199enable_debug_symbols
1200enable_zip_debug_info
1201enable_native_coverage
1202enable_dtrace
1203with_jvm_features
1204with_jvm_interpreter
1205enable_hotspot_gtest
1206with_stdc__lib
1207with_msvcr_dll
1208with_msvcp_dll
1209with_x
1210with_cups
1211with_cups_include
1212with_freetype
1213with_freetype_include
1214with_freetype_lib
1215with_freetype_src
1216enable_freetype_bundling
1217with_alsa
1218with_alsa_include
1219with_alsa_lib
1220with_libffi
1221with_libffi_include
1222with_libffi_lib
1223with_libjpeg
1224with_giflib
1225with_libpng
1226with_zlib
1227with_lcms
1228with_dxsdk
1229with_dxsdk_lib
1230with_dxsdk_include
1231enable_jtreg_failure_handler
1232enable_generate_classlist
1233with_num_cores
1234with_memory_size
1235with_jobs
1236with_test_jobs
1237with_boot_jdk_jvmargs
1238with_sjavac_server_java
1239enable_sjavac
1240enable_javac_server
1241enable_icecc
1242enable_precompiled_headers
1243enable_ccache
1244with_ccache_dir
1245'
1246      ac_precious_vars='build_alias
1247host_alias
1248target_alias
1249BASENAME
1250BASH
1251CAT
1252CHMOD
1253CMP
1254COMM
1255CP
1256CUT
1257DATE
1258DIFF
1259DIRNAME
1260ECHO
1261EXPR
1262FILE
1263FIND
1264HEAD
1265GUNZIP
1266GZIP
1267LN
1268LS
1269MKDIR
1270MKTEMP
1271MV
1272NAWK
1273PRINTF
1274RM
1275RMDIR
1276SH
1277SORT
1278TAIL
1279TAR
1280TEE
1281TOUCH
1282TR
1283UNAME
1284UNIQ
1285WC
1286WHICH
1287XARGS
1288AWK
1289GREP
1290EGREP
1291FGREP
1292SED
1293CYGPATH
1294READLINK
1295DF
1296CPIO
1297NICE
1298MAKE
1299UNZIP
1300ZIP
1301LDD
1302OTOOL
1303READELF
1304HG
1305STAT
1306TIME
1307DTRACE
1308PATCH
1309DSYMUTIL
1310XATTR
1311CODESIGN
1312SETFILE
1313PKG_CONFIG
1314JAVA
1315JAVAC
1316JAVAH
1317JAR
1318JARSIGNER
1319CC
1320CFLAGS
1321LDFLAGS
1322LIBS
1323CPPFLAGS
1324CXX
1325CXXFLAGS
1326CCC
1327CPP
1328CXXCPP
1329AS
1330AR
1331LIPO
1332STRIP
1333NM
1334GNM
1335OBJCOPY
1336OBJDUMP
1337BUILD_CC
1338BUILD_CXX
1339BUILD_NM
1340BUILD_AR
1341BUILD_OBJCOPY
1342BUILD_STRIP
1343JTREGEXE
1344XMKMF
1345FREETYPE_CFLAGS
1346FREETYPE_LIBS
1347ALSA_CFLAGS
1348ALSA_LIBS
1349LIBFFI_CFLAGS
1350LIBFFI_LIBS
1351PNG_CFLAGS
1352PNG_LIBS
1353LCMS_CFLAGS
1354LCMS_LIBS
1355ICECC_CMD
1356ICECC_CREATE_ENV
1357ICECC_WRAPPER
1358CCACHE'
1359
1360
1361# Initialize some variables set by options.
1362ac_init_help=
1363ac_init_version=false
1364ac_unrecognized_opts=
1365ac_unrecognized_sep=
1366# The variables have the same names as the options, with
1367# dashes changed to underlines.
1368cache_file=/dev/null
1369exec_prefix=NONE
1370no_create=
1371no_recursion=
1372prefix=NONE
1373program_prefix=NONE
1374program_suffix=NONE
1375program_transform_name=s,x,x,
1376silent=
1377site=
1378srcdir=
1379verbose=
1380x_includes=NONE
1381x_libraries=NONE
1382
1383# Installation directory options.
1384# These are left unexpanded so users can "make install exec_prefix=/foo"
1385# and all the variables that are supposed to be based on exec_prefix
1386# by default will actually change.
1387# Use braces instead of parens because sh, perl, etc. also accept them.
1388# (The list follows the same order as the GNU Coding Standards.)
1389bindir='${exec_prefix}/bin'
1390sbindir='${exec_prefix}/sbin'
1391libexecdir='${exec_prefix}/libexec'
1392datarootdir='${prefix}/share'
1393datadir='${datarootdir}'
1394sysconfdir='${prefix}/etc'
1395sharedstatedir='${prefix}/com'
1396localstatedir='${prefix}/var'
1397includedir='${prefix}/include'
1398oldincludedir='/usr/include'
1399docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1400infodir='${datarootdir}/info'
1401htmldir='${docdir}'
1402dvidir='${docdir}'
1403pdfdir='${docdir}'
1404psdir='${docdir}'
1405libdir='${exec_prefix}/lib'
1406localedir='${datarootdir}/locale'
1407mandir='${datarootdir}/man'
1408
1409ac_prev=
1410ac_dashdash=
1411for ac_option
1412do
1413  # If the previous option needs an argument, assign it.
1414  if test -n "$ac_prev"; then
1415    eval $ac_prev=\$ac_option
1416    ac_prev=
1417    continue
1418  fi
1419
1420  case $ac_option in
1421  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1422  *=)   ac_optarg= ;;
1423  *)    ac_optarg=yes ;;
1424  esac
1425
1426  # Accept the important Cygnus configure options, so we can diagnose typos.
1427
1428  case $ac_dashdash$ac_option in
1429  --)
1430    ac_dashdash=yes ;;
1431
1432  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1433    ac_prev=bindir ;;
1434  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1435    bindir=$ac_optarg ;;
1436
1437  -build | --build | --buil | --bui | --bu)
1438    ac_prev=build_alias ;;
1439  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1440    build_alias=$ac_optarg ;;
1441
1442  -cache-file | --cache-file | --cache-fil | --cache-fi \
1443  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1444    ac_prev=cache_file ;;
1445  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1446  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1447    cache_file=$ac_optarg ;;
1448
1449  --config-cache | -C)
1450    cache_file=config.cache ;;
1451
1452  -datadir | --datadir | --datadi | --datad)
1453    ac_prev=datadir ;;
1454  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1455    datadir=$ac_optarg ;;
1456
1457  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1458  | --dataroo | --dataro | --datar)
1459    ac_prev=datarootdir ;;
1460  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1461  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1462    datarootdir=$ac_optarg ;;
1463
1464  -disable-* | --disable-*)
1465    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1466    # Reject names that are not valid shell variable names.
1467    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1468      as_fn_error $? "invalid feature name: $ac_useropt"
1469    ac_useropt_orig=$ac_useropt
1470    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1471    case $ac_user_opts in
1472      *"
1473"enable_$ac_useropt"
1474"*) ;;
1475      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1476	 ac_unrecognized_sep=', ';;
1477    esac
1478    eval enable_$ac_useropt=no ;;
1479
1480  -docdir | --docdir | --docdi | --doc | --do)
1481    ac_prev=docdir ;;
1482  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1483    docdir=$ac_optarg ;;
1484
1485  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1486    ac_prev=dvidir ;;
1487  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1488    dvidir=$ac_optarg ;;
1489
1490  -enable-* | --enable-*)
1491    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1492    # Reject names that are not valid shell variable names.
1493    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1494      as_fn_error $? "invalid feature name: $ac_useropt"
1495    ac_useropt_orig=$ac_useropt
1496    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1497    case $ac_user_opts in
1498      *"
1499"enable_$ac_useropt"
1500"*) ;;
1501      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1502	 ac_unrecognized_sep=', ';;
1503    esac
1504    eval enable_$ac_useropt=\$ac_optarg ;;
1505
1506  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1507  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1508  | --exec | --exe | --ex)
1509    ac_prev=exec_prefix ;;
1510  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1511  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1512  | --exec=* | --exe=* | --ex=*)
1513    exec_prefix=$ac_optarg ;;
1514
1515  -gas | --gas | --ga | --g)
1516    # Obsolete; use --with-gas.
1517    with_gas=yes ;;
1518
1519  -help | --help | --hel | --he | -h)
1520    ac_init_help=long ;;
1521  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1522    ac_init_help=recursive ;;
1523  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1524    ac_init_help=short ;;
1525
1526  -host | --host | --hos | --ho)
1527    ac_prev=host_alias ;;
1528  -host=* | --host=* | --hos=* | --ho=*)
1529    host_alias=$ac_optarg ;;
1530
1531  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1532    ac_prev=htmldir ;;
1533  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1534  | --ht=*)
1535    htmldir=$ac_optarg ;;
1536
1537  -includedir | --includedir | --includedi | --included | --include \
1538  | --includ | --inclu | --incl | --inc)
1539    ac_prev=includedir ;;
1540  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1541  | --includ=* | --inclu=* | --incl=* | --inc=*)
1542    includedir=$ac_optarg ;;
1543
1544  -infodir | --infodir | --infodi | --infod | --info | --inf)
1545    ac_prev=infodir ;;
1546  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1547    infodir=$ac_optarg ;;
1548
1549  -libdir | --libdir | --libdi | --libd)
1550    ac_prev=libdir ;;
1551  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1552    libdir=$ac_optarg ;;
1553
1554  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1555  | --libexe | --libex | --libe)
1556    ac_prev=libexecdir ;;
1557  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1558  | --libexe=* | --libex=* | --libe=*)
1559    libexecdir=$ac_optarg ;;
1560
1561  -localedir | --localedir | --localedi | --localed | --locale)
1562    ac_prev=localedir ;;
1563  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1564    localedir=$ac_optarg ;;
1565
1566  -localstatedir | --localstatedir | --localstatedi | --localstated \
1567  | --localstate | --localstat | --localsta | --localst | --locals)
1568    ac_prev=localstatedir ;;
1569  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1570  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1571    localstatedir=$ac_optarg ;;
1572
1573  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1574    ac_prev=mandir ;;
1575  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1576    mandir=$ac_optarg ;;
1577
1578  -nfp | --nfp | --nf)
1579    # Obsolete; use --without-fp.
1580    with_fp=no ;;
1581
1582  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1583  | --no-cr | --no-c | -n)
1584    no_create=yes ;;
1585
1586  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1587  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1588    no_recursion=yes ;;
1589
1590  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1591  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1592  | --oldin | --oldi | --old | --ol | --o)
1593    ac_prev=oldincludedir ;;
1594  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1595  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1596  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1597    oldincludedir=$ac_optarg ;;
1598
1599  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1600    ac_prev=prefix ;;
1601  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1602    prefix=$ac_optarg ;;
1603
1604  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1605  | --program-pre | --program-pr | --program-p)
1606    ac_prev=program_prefix ;;
1607  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1608  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1609    program_prefix=$ac_optarg ;;
1610
1611  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1612  | --program-suf | --program-su | --program-s)
1613    ac_prev=program_suffix ;;
1614  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1615  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1616    program_suffix=$ac_optarg ;;
1617
1618  -program-transform-name | --program-transform-name \
1619  | --program-transform-nam | --program-transform-na \
1620  | --program-transform-n | --program-transform- \
1621  | --program-transform | --program-transfor \
1622  | --program-transfo | --program-transf \
1623  | --program-trans | --program-tran \
1624  | --progr-tra | --program-tr | --program-t)
1625    ac_prev=program_transform_name ;;
1626  -program-transform-name=* | --program-transform-name=* \
1627  | --program-transform-nam=* | --program-transform-na=* \
1628  | --program-transform-n=* | --program-transform-=* \
1629  | --program-transform=* | --program-transfor=* \
1630  | --program-transfo=* | --program-transf=* \
1631  | --program-trans=* | --program-tran=* \
1632  | --progr-tra=* | --program-tr=* | --program-t=*)
1633    program_transform_name=$ac_optarg ;;
1634
1635  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1636    ac_prev=pdfdir ;;
1637  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1638    pdfdir=$ac_optarg ;;
1639
1640  -psdir | --psdir | --psdi | --psd | --ps)
1641    ac_prev=psdir ;;
1642  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1643    psdir=$ac_optarg ;;
1644
1645  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1646  | -silent | --silent | --silen | --sile | --sil)
1647    silent=yes ;;
1648
1649  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1650    ac_prev=sbindir ;;
1651  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1652  | --sbi=* | --sb=*)
1653    sbindir=$ac_optarg ;;
1654
1655  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1656  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1657  | --sharedst | --shareds | --shared | --share | --shar \
1658  | --sha | --sh)
1659    ac_prev=sharedstatedir ;;
1660  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1661  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1662  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1663  | --sha=* | --sh=*)
1664    sharedstatedir=$ac_optarg ;;
1665
1666  -site | --site | --sit)
1667    ac_prev=site ;;
1668  -site=* | --site=* | --sit=*)
1669    site=$ac_optarg ;;
1670
1671  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1672    ac_prev=srcdir ;;
1673  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1674    srcdir=$ac_optarg ;;
1675
1676  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1677  | --syscon | --sysco | --sysc | --sys | --sy)
1678    ac_prev=sysconfdir ;;
1679  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1680  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1681    sysconfdir=$ac_optarg ;;
1682
1683  -target | --target | --targe | --targ | --tar | --ta | --t)
1684    ac_prev=target_alias ;;
1685  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1686    target_alias=$ac_optarg ;;
1687
1688  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1689    verbose=yes ;;
1690
1691  -version | --version | --versio | --versi | --vers | -V)
1692    ac_init_version=: ;;
1693
1694  -with-* | --with-*)
1695    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1696    # Reject names that are not valid shell variable names.
1697    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1698      as_fn_error $? "invalid package name: $ac_useropt"
1699    ac_useropt_orig=$ac_useropt
1700    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1701    case $ac_user_opts in
1702      *"
1703"with_$ac_useropt"
1704"*) ;;
1705      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1706	 ac_unrecognized_sep=', ';;
1707    esac
1708    eval with_$ac_useropt=\$ac_optarg ;;
1709
1710  -without-* | --without-*)
1711    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1712    # Reject names that are not valid shell variable names.
1713    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1714      as_fn_error $? "invalid package name: $ac_useropt"
1715    ac_useropt_orig=$ac_useropt
1716    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1717    case $ac_user_opts in
1718      *"
1719"with_$ac_useropt"
1720"*) ;;
1721      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1722	 ac_unrecognized_sep=', ';;
1723    esac
1724    eval with_$ac_useropt=no ;;
1725
1726  --x)
1727    # Obsolete; use --with-x.
1728    with_x=yes ;;
1729
1730  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1731  | --x-incl | --x-inc | --x-in | --x-i)
1732    ac_prev=x_includes ;;
1733  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1734  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1735    x_includes=$ac_optarg ;;
1736
1737  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1738  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1739    ac_prev=x_libraries ;;
1740  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1741  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1742    x_libraries=$ac_optarg ;;
1743
1744  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1745Try \`$0 --help' for more information"
1746    ;;
1747
1748  *=*)
1749    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1750    # Reject names that are not valid shell variable names.
1751    case $ac_envvar in #(
1752      '' | [0-9]* | *[!_$as_cr_alnum]* )
1753      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1754    esac
1755    eval $ac_envvar=\$ac_optarg
1756    export $ac_envvar ;;
1757
1758  *)
1759    # FIXME: should be removed in autoconf 3.0.
1760    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1761    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1762      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1763    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1764    ;;
1765
1766  esac
1767done
1768
1769if test -n "$ac_prev"; then
1770  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1771  as_fn_error $? "missing argument to $ac_option"
1772fi
1773
1774if test -n "$ac_unrecognized_opts"; then
1775  case $enable_option_checking in
1776    no) ;;
1777    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1778    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1779  esac
1780fi
1781
1782# Check all directory arguments for consistency.
1783for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1784		datadir sysconfdir sharedstatedir localstatedir includedir \
1785		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1786		libdir localedir mandir
1787do
1788  eval ac_val=\$$ac_var
1789  # Remove trailing slashes.
1790  case $ac_val in
1791    */ )
1792      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1793      eval $ac_var=\$ac_val;;
1794  esac
1795  # Be sure to have absolute directory names.
1796  case $ac_val in
1797    [\\/$]* | ?:[\\/]* )  continue;;
1798    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1799  esac
1800  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1801done
1802
1803# There might be people who depend on the old broken behavior: `$host'
1804# used to hold the argument of --host etc.
1805# FIXME: To remove some day.
1806build=$build_alias
1807host=$host_alias
1808target=$target_alias
1809
1810# FIXME: To remove some day.
1811if test "x$host_alias" != x; then
1812  if test "x$build_alias" = x; then
1813    cross_compiling=maybe
1814  elif test "x$build_alias" != "x$host_alias"; then
1815    cross_compiling=yes
1816  fi
1817fi
1818
1819ac_tool_prefix=
1820test -n "$host_alias" && ac_tool_prefix=$host_alias-
1821
1822test "$silent" = yes && exec 6>/dev/null
1823
1824
1825ac_pwd=`pwd` && test -n "$ac_pwd" &&
1826ac_ls_di=`ls -di .` &&
1827ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1828  as_fn_error $? "working directory cannot be determined"
1829test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1830  as_fn_error $? "pwd does not report name of working directory"
1831
1832
1833# Find the source files, if location was not specified.
1834if test -z "$srcdir"; then
1835  ac_srcdir_defaulted=yes
1836  # Try the directory containing this script, then the parent directory.
1837  ac_confdir=`$as_dirname -- "$as_myself" ||
1838$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1839	 X"$as_myself" : 'X\(//\)[^/]' \| \
1840	 X"$as_myself" : 'X\(//\)$' \| \
1841	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1842$as_echo X"$as_myself" |
1843    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\/\)[^/].*/{
1848	    s//\1/
1849	    q
1850	  }
1851	  /^X\(\/\/\)$/{
1852	    s//\1/
1853	    q
1854	  }
1855	  /^X\(\/\).*/{
1856	    s//\1/
1857	    q
1858	  }
1859	  s/.*/./; q'`
1860  srcdir=$ac_confdir
1861  if test ! -r "$srcdir/$ac_unique_file"; then
1862    srcdir=..
1863  fi
1864else
1865  ac_srcdir_defaulted=no
1866fi
1867if test ! -r "$srcdir/$ac_unique_file"; then
1868  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1869  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1870fi
1871ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1872ac_abs_confdir=`(
1873	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1874	pwd)`
1875# When building in place, set srcdir=.
1876if test "$ac_abs_confdir" = "$ac_pwd"; then
1877  srcdir=.
1878fi
1879# Remove unnecessary trailing slashes from srcdir.
1880# Double slashes in file names in object file debugging info
1881# mess up M-x gdb in Emacs.
1882case $srcdir in
1883*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1884esac
1885for ac_var in $ac_precious_vars; do
1886  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_env_${ac_var}_value=\$${ac_var}
1888  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1889  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1890done
1891
1892#
1893# Report the --help message.
1894#
1895if test "$ac_init_help" = "long"; then
1896  # Omit some internal or obsolete options to make the list less imposing.
1897  # This message is too long to be a string in the A/UX 3.1 sh.
1898  cat <<_ACEOF
1899\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1900
1901Usage: $0 [OPTION]... [VAR=VALUE]...
1902
1903To assign environment variables (e.g., CC, CFLAGS...), specify them as
1904VAR=VALUE.  See below for descriptions of some of the useful variables.
1905
1906Defaults for the options are specified in brackets.
1907
1908Configuration:
1909  -h, --help              display this help and exit
1910      --help=short        display options specific to this package
1911      --help=recursive    display the short help of all the included packages
1912  -V, --version           display version information and exit
1913  -q, --quiet, --silent   do not print \`checking ...' messages
1914      --cache-file=FILE   cache test results in FILE [disabled]
1915  -C, --config-cache      alias for \`--cache-file=config.cache'
1916  -n, --no-create         do not create output files
1917      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1918
1919Installation directories:
1920  --prefix=PREFIX         install architecture-independent files in PREFIX
1921                          [$ac_default_prefix]
1922  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1923                          [PREFIX]
1924
1925By default, \`make install' will install all the files in
1926\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1927an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1928for instance \`--prefix=\$HOME'.
1929
1930For better control, use the options below.
1931
1932Fine tuning of the installation directories:
1933  --bindir=DIR            user executables [EPREFIX/bin]
1934  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1935  --libexecdir=DIR        program executables [EPREFIX/libexec]
1936  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1937  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1938  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1939  --libdir=DIR            object code libraries [EPREFIX/lib]
1940  --includedir=DIR        C header files [PREFIX/include]
1941  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1942  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1943  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1944  --infodir=DIR           info documentation [DATAROOTDIR/info]
1945  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1946  --mandir=DIR            man documentation [DATAROOTDIR/man]
1947  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1948  --htmldir=DIR           html documentation [DOCDIR]
1949  --dvidir=DIR            dvi documentation [DOCDIR]
1950  --pdfdir=DIR            pdf documentation [DOCDIR]
1951  --psdir=DIR             ps documentation [DOCDIR]
1952_ACEOF
1953
1954  cat <<\_ACEOF
1955
1956X features:
1957  --x-includes=DIR    X include files are in DIR
1958  --x-libraries=DIR   X library files are in DIR
1959
1960System types:
1961  --build=BUILD     configure for building on BUILD [guessed]
1962  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1963  --target=TARGET   configure for building compilers for TARGET [HOST]
1964_ACEOF
1965fi
1966
1967if test -n "$ac_init_help"; then
1968  case $ac_init_help in
1969     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1970   esac
1971  cat <<\_ACEOF
1972
1973Optional Features:
1974  --disable-option-checking  ignore unrecognized --enable/--with options
1975  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1976  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1977  --enable-openjdk-only   suppress building custom source even if present
1978                          [disabled]
1979  --enable-debug          set the debug level to fastdebug (shorthand for
1980                          --with-debug-level=fastdebug) [disabled]
1981  --disable-headful       disable building headful support (graphical UI
1982                          support) [enabled]
1983  --enable-unlimited-crypto
1984                          Enable unlimited crypto policy [disabled]
1985  --disable-keep-packaged-modules
1986                          Do not keep packaged modules in jdk image [enable]
1987  --enable-static-build   enable static library build [disabled]
1988  --disable-warnings-as-errors
1989                          do not consider native warnings to be an error
1990                          [enabled]
1991  --enable-debug-symbols  Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-zip-debug-info Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --enable-native-coverage
1996                          enable native compilation with code coverage
1997                          data[disabled]
1998  --enable-dtrace[=yes/no/auto]
1999                          enable dtrace. Default is auto, where dtrace is
2000                          enabled if all dependencies are present.
2001  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2002  --disable-freetype-bundling
2003                          disable bundling of the freetype library with the
2004                          build result [enabled on Windows or when using
2005                          --with-freetype, disabled otherwise]
2006  --enable-jtreg-failure-handler
2007                          forces build of the jtreg failure handler to be
2008                          enabled, missing dependencies become fatal errors.
2009                          Default is auto, where the failure handler is built
2010                          if all dependencies are present and otherwise just
2011                          disabled.
2012  --disable-generate-classlist
2013                          forces enabling or disabling of the generation of a
2014                          CDS classlist at build time. Default is to generate
2015                          it when either the server or client JVMs are built.
2016  --enable-sjavac         use sjavac to do fast incremental compiles
2017                          [disabled]
2018  --disable-javac-server  disable javac server [enabled]
2019  --enable-icecc          enable distribted compilation of native code using
2020                          icecc/icecream [disabled]
2021  --disable-precompiled-headers
2022                          disable using precompiled headers when compiling C++
2023                          [enabled]
2024  --enable-ccache         enable using ccache to speed up recompilations
2025                          [disabled]
2026
2027Optional Packages:
2028  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2029  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2030  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2031                          support it), e.g. --with-target-bits=32 [guessed]
2032  --with-custom-make-dir  Deprecated. Option is kept for backwards
2033                          compatibility and is ignored
2034  --with-jdk-variant      JDK variant to build (normal) [normal]
2035  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2036                          optimized) [release]
2037  --with-jvm-variants     JVM variants (separated by commas) to build
2038                          (server,client,minimal,core,zero,zeroshark,custom)
2039                          [server]
2040  --with-devkit           use this devkit for compilers, tools and resources
2041  --with-sys-root         alias for --with-sysroot for backwards compatability
2042  --with-sysroot          use this directory as sysroot
2043  --with-tools-dir        alias for --with-toolchain-path for backwards
2044                          compatibility
2045  --with-toolchain-path   prepend these directories when searching for
2046                          toolchain binaries (compilers etc)
2047  --with-extra-path       prepend these directories to the default path
2048  --with-sdk-name         use the platform SDK of the given name. [macosx]
2049  --with-conf-name        use this as the name of the configuration [generated
2050                          from important configuration options]
2051  --with-output-sync      set make output sync type if supported by make.
2052                          [recurse]
2053  --with-default-make-target
2054                          set the default make target [exploded-image]
2055  --with-cacerts-file     specify alternative cacerts file
2056  --with-copyright-year   Set copyright year value for build [current year]
2057  --with-milestone        Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-update-version   Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-user-release-suffix
2062                          Deprecated. Option is kept for backwards
2063                          compatibility and is ignored
2064  --with-build-number     Deprecated. Option is kept for backwards
2065                          compatibility and is ignored
2066  --with-version-string   Set version string [calculated]
2067  --with-version-pre      Set the base part of the version 'PRE' field
2068                          (pre-release identifier) ['internal']
2069  --with-version-opt      Set version 'OPT' field (build metadata)
2070                          [<timestamp>.<user>.<dirname>]
2071  --with-version-build    Set version 'BUILD' field (build number) [not
2072                          specified]
2073  --with-version-major    Set version 'MAJOR' field (first number) [current
2074                          source value]
2075  --with-version-minor    Set version 'MINOR' field (second number) [current
2076                          source value]
2077  --with-version-security Set version 'SECURITY' field (third number) [current
2078                          source value]
2079  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2080                          specified]
2081  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2082  --with-build-jdk        path to JDK of same version as is being built[the
2083                          newly built JDK]
2084  --with-add-source-root  Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-source-root
2087                          Deprecated. Option is kept for backwards
2088                          compatibility and is ignored
2089  --with-adds-and-overrides
2090                          Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-langtools
2093                          Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-corba   Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-jaxp    Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-jaxws   Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-hotspot Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-nashorn Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-jdk     Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-import-hotspot   import hotspot binaries from this jdk image or
2108                          hotspot build dist dir instead of building from
2109                          source
2110  --with-import-modules   import a set of prebuilt modules either as a zip
2111                          file or an exploded directory
2112  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2113                          to show possible values [platform dependent]
2114  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2115  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2116  --with-extra-ldflags    extra flags to be used when linking jdk
2117  --with-toolchain-version
2118                          the version of the toolchain to look for, use
2119                          '--help' to show possible values [platform
2120                          dependent]
2121  --with-build-devkit     Devkit to use for the build platform toolchain
2122  --with-jtreg            Regression Test Harness [probed]
2123  --with-native-debug-symbols
2124                          set the native debug symbol configuration (none,
2125                          internal, external, zipped) [varying]
2126  --with-jvm-features     additional JVM features to enable (separated by
2127                          comma), use '--help' to show possible values [none]
2128  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2129                          compatibility and is ignored
2130  --with-stdc++lib=<static>,<dynamic>,<default>
2131                          force linking of the C++ runtime on Linux to either
2132                          static or dynamic, default is static with dynamic as
2133                          fallback
2134  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2135                          (Windows only) [probed]
2136  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2137                          (Windows only) [probed]
2138  --with-x                use the X Window System
2139  --with-cups             specify prefix directory for the cups package
2140                          (expecting the headers under PATH/include)
2141  --with-cups-include     specify directory for the cups include files
2142  --with-freetype         specify prefix directory for the freetype package
2143                          (expecting the libraries under PATH/lib and the
2144                          headers under PATH/include)
2145  --with-freetype-include specify directory for the freetype include files
2146  --with-freetype-lib     specify directory for the freetype library
2147  --with-freetype-src     specify directory with freetype sources to
2148                          automatically build the library (experimental,
2149                          Windows-only)
2150  --with-alsa             specify prefix directory for the alsa package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-alsa-include     specify directory for the alsa include files
2154  --with-alsa-lib         specify directory for the alsa library
2155  --with-libffi           specify prefix directory for the libffi package
2156                          (expecting the libraries under PATH/lib and the
2157                          headers under PATH/include)
2158  --with-libffi-include   specify directory for the libffi include files
2159  --with-libffi-lib       specify directory for the libffi library
2160  --with-libjpeg          use libjpeg from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-giflib           use giflib from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-libpng           use libpng from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-zlib             use zlib from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-lcms             use lcms2 from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-dxsdk            Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-dxsdk-include    Deprecated. Option is kept for backwards
2175                          compatibility and is ignored
2176  --with-num-cores        number of cores in the build system, e.g.
2177                          --with-num-cores=8 [probed]
2178  --with-memory-size      memory (in MB) available in the build system, e.g.
2179                          --with-memory-size=1024 [probed]
2180  --with-jobs             number of parallel jobs to let make run [calculated
2181                          based on cores and memory]
2182  --with-test-jobs        number of parallel tests jobs to run [based on build
2183                          jobs]
2184  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2185                          invocations of boot JDK, overriding the default
2186                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2187                          -enableassertions"
2188  --with-sjavac-server-java
2189                          use this java binary for running the sjavac
2190                          background server [Boot JDK java]
2191  --with-ccache-dir       where to store ccache files [~/.ccache]
2192
2193Some influential environment variables:
2194  BASENAME    Override default value for BASENAME
2195  BASH        Override default value for BASH
2196  CAT         Override default value for CAT
2197  CHMOD       Override default value for CHMOD
2198  CMP         Override default value for CMP
2199  COMM        Override default value for COMM
2200  CP          Override default value for CP
2201  CUT         Override default value for CUT
2202  DATE        Override default value for DATE
2203  DIFF        Override default value for DIFF
2204  DIRNAME     Override default value for DIRNAME
2205  ECHO        Override default value for ECHO
2206  EXPR        Override default value for EXPR
2207  FILE        Override default value for FILE
2208  FIND        Override default value for FIND
2209  HEAD        Override default value for HEAD
2210  GUNZIP      Override default value for GUNZIP
2211  GZIP        Override default value for GZIP
2212  LN          Override default value for LN
2213  LS          Override default value for LS
2214  MKDIR       Override default value for MKDIR
2215  MKTEMP      Override default value for MKTEMP
2216  MV          Override default value for MV
2217  NAWK        Override default value for NAWK
2218  PRINTF      Override default value for PRINTF
2219  RM          Override default value for RM
2220  RMDIR       Override default value for RMDIR
2221  SH          Override default value for SH
2222  SORT        Override default value for SORT
2223  TAIL        Override default value for TAIL
2224  TAR         Override default value for TAR
2225  TEE         Override default value for TEE
2226  TOUCH       Override default value for TOUCH
2227  TR          Override default value for TR
2228  UNAME       Override default value for UNAME
2229  UNIQ        Override default value for UNIQ
2230  WC          Override default value for WC
2231  WHICH       Override default value for WHICH
2232  XARGS       Override default value for XARGS
2233  AWK         Override default value for AWK
2234  GREP        Override default value for GREP
2235  EGREP       Override default value for EGREP
2236  FGREP       Override default value for FGREP
2237  SED         Override default value for SED
2238  CYGPATH     Override default value for CYGPATH
2239  READLINK    Override default value for READLINK
2240  DF          Override default value for DF
2241  CPIO        Override default value for CPIO
2242  NICE        Override default value for NICE
2243  MAKE        Override default value for MAKE
2244  UNZIP       Override default value for UNZIP
2245  ZIP         Override default value for ZIP
2246  LDD         Override default value for LDD
2247  OTOOL       Override default value for OTOOL
2248  READELF     Override default value for READELF
2249  HG          Override default value for HG
2250  STAT        Override default value for STAT
2251  TIME        Override default value for TIME
2252  DTRACE      Override default value for DTRACE
2253  PATCH       Override default value for PATCH
2254  DSYMUTIL    Override default value for DSYMUTIL
2255  XATTR       Override default value for XATTR
2256  CODESIGN    Override default value for CODESIGN
2257  SETFILE     Override default value for SETFILE
2258  PKG_CONFIG  path to pkg-config utility
2259  JAVA        Override default value for JAVA
2260  JAVAC       Override default value for JAVAC
2261  JAVAH       Override default value for JAVAH
2262  JAR         Override default value for JAR
2263  JARSIGNER   Override default value for JARSIGNER
2264  CC          C compiler command
2265  CFLAGS      C compiler flags
2266  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2267              nonstandard directory <lib dir>
2268  LIBS        libraries to pass to the linker, e.g. -l<library>
2269  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2270              you have headers in a nonstandard directory <include dir>
2271  CXX         C++ compiler command
2272  CXXFLAGS    C++ compiler flags
2273  CPP         C preprocessor
2274  CXXCPP      C++ preprocessor
2275  AS          Override default value for AS
2276  AR          Override default value for AR
2277  LIPO        Override default value for LIPO
2278  STRIP       Override default value for STRIP
2279  NM          Override default value for NM
2280  GNM         Override default value for GNM
2281  OBJCOPY     Override default value for OBJCOPY
2282  OBJDUMP     Override default value for OBJDUMP
2283  BUILD_CC    Override default value for BUILD_CC
2284  BUILD_CXX   Override default value for BUILD_CXX
2285  BUILD_NM    Override default value for BUILD_NM
2286  BUILD_AR    Override default value for BUILD_AR
2287  BUILD_OBJCOPY
2288              Override default value for BUILD_OBJCOPY
2289  BUILD_STRIP Override default value for BUILD_STRIP
2290  JTREGEXE    Override default value for JTREGEXE
2291  XMKMF       Path to xmkmf, Makefile generator for X Window System
2292  FREETYPE_CFLAGS
2293              C compiler flags for FREETYPE, overriding pkg-config
2294  FREETYPE_LIBS
2295              linker flags for FREETYPE, overriding pkg-config
2296  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2297  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2298  LIBFFI_CFLAGS
2299              C compiler flags for LIBFFI, overriding pkg-config
2300  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2301  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2302  PNG_LIBS    linker flags for PNG, overriding pkg-config
2303  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2304  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2305  ICECC_CMD   Override default value for ICECC_CMD
2306  ICECC_CREATE_ENV
2307              Override default value for ICECC_CREATE_ENV
2308  ICECC_WRAPPER
2309              Override default value for ICECC_WRAPPER
2310  CCACHE      Override default value for CCACHE
2311
2312Use these variables to override the choices made by `configure' or to help
2313it to find libraries and programs with nonstandard names/locations.
2314
2315Report bugs to <build-dev@openjdk.java.net>.
2316OpenJDK home page: <http://openjdk.java.net>.
2317_ACEOF
2318ac_status=$?
2319fi
2320
2321if test "$ac_init_help" = "recursive"; then
2322  # If there are subdirs, report their specific --help.
2323  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2324    test -d "$ac_dir" ||
2325      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2326      continue
2327    ac_builddir=.
2328
2329case "$ac_dir" in
2330.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2331*)
2332  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2333  # A ".." for each directory in $ac_dir_suffix.
2334  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2335  case $ac_top_builddir_sub in
2336  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2337  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2338  esac ;;
2339esac
2340ac_abs_top_builddir=$ac_pwd
2341ac_abs_builddir=$ac_pwd$ac_dir_suffix
2342# for backward compatibility:
2343ac_top_builddir=$ac_top_build_prefix
2344
2345case $srcdir in
2346  .)  # We are building in place.
2347    ac_srcdir=.
2348    ac_top_srcdir=$ac_top_builddir_sub
2349    ac_abs_top_srcdir=$ac_pwd ;;
2350  [\\/]* | ?:[\\/]* )  # Absolute name.
2351    ac_srcdir=$srcdir$ac_dir_suffix;
2352    ac_top_srcdir=$srcdir
2353    ac_abs_top_srcdir=$srcdir ;;
2354  *) # Relative name.
2355    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2356    ac_top_srcdir=$ac_top_build_prefix$srcdir
2357    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2358esac
2359ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2360
2361    cd "$ac_dir" || { ac_status=$?; continue; }
2362    # Check for guested configure.
2363    if test -f "$ac_srcdir/configure.gnu"; then
2364      echo &&
2365      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2366    elif test -f "$ac_srcdir/configure"; then
2367      echo &&
2368      $SHELL "$ac_srcdir/configure" --help=recursive
2369    else
2370      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2371    fi || ac_status=$?
2372    cd "$ac_pwd" || { ac_status=$?; break; }
2373  done
2374fi
2375
2376test -n "$ac_init_help" && exit $ac_status
2377if $ac_init_version; then
2378  cat <<\_ACEOF
2379OpenJDK configure jdk9
2380generated by GNU Autoconf 2.69
2381
2382Copyright (C) 2012 Free Software Foundation, Inc.
2383This configure script is free software; the Free Software Foundation
2384gives unlimited permission to copy, distribute and modify it.
2385_ACEOF
2386  exit
2387fi
2388
2389## ------------------------ ##
2390## Autoconf initialization. ##
2391## ------------------------ ##
2392
2393# ac_fn_c_try_compile LINENO
2394# --------------------------
2395# Try to compile conftest.$ac_ext, and return whether this succeeded.
2396ac_fn_c_try_compile ()
2397{
2398  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399  rm -f conftest.$ac_objext
2400  if { { ac_try="$ac_compile"
2401case "(($ac_try" in
2402  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2403  *) ac_try_echo=$ac_try;;
2404esac
2405eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2406$as_echo "$ac_try_echo"; } >&5
2407  (eval "$ac_compile") 2>conftest.err
2408  ac_status=$?
2409  if test -s conftest.err; then
2410    grep -v '^ *+' conftest.err >conftest.er1
2411    cat conftest.er1 >&5
2412    mv -f conftest.er1 conftest.err
2413  fi
2414  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2415  test $ac_status = 0; } && {
2416	 test -z "$ac_c_werror_flag" ||
2417	 test ! -s conftest.err
2418       } && test -s conftest.$ac_objext; then :
2419  ac_retval=0
2420else
2421  $as_echo "$as_me: failed program was:" >&5
2422sed 's/^/| /' conftest.$ac_ext >&5
2423
2424	ac_retval=1
2425fi
2426  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2427  as_fn_set_status $ac_retval
2428
2429} # ac_fn_c_try_compile
2430
2431# ac_fn_cxx_try_compile LINENO
2432# ----------------------------
2433# Try to compile conftest.$ac_ext, and return whether this succeeded.
2434ac_fn_cxx_try_compile ()
2435{
2436  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2437  rm -f conftest.$ac_objext
2438  if { { ac_try="$ac_compile"
2439case "(($ac_try" in
2440  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2441  *) ac_try_echo=$ac_try;;
2442esac
2443eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2444$as_echo "$ac_try_echo"; } >&5
2445  (eval "$ac_compile") 2>conftest.err
2446  ac_status=$?
2447  if test -s conftest.err; then
2448    grep -v '^ *+' conftest.err >conftest.er1
2449    cat conftest.er1 >&5
2450    mv -f conftest.er1 conftest.err
2451  fi
2452  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2453  test $ac_status = 0; } && {
2454	 test -z "$ac_cxx_werror_flag" ||
2455	 test ! -s conftest.err
2456       } && test -s conftest.$ac_objext; then :
2457  ac_retval=0
2458else
2459  $as_echo "$as_me: failed program was:" >&5
2460sed 's/^/| /' conftest.$ac_ext >&5
2461
2462	ac_retval=1
2463fi
2464  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2465  as_fn_set_status $ac_retval
2466
2467} # ac_fn_cxx_try_compile
2468
2469# ac_fn_c_try_cpp LINENO
2470# ----------------------
2471# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2472ac_fn_c_try_cpp ()
2473{
2474  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2475  if { { ac_try="$ac_cpp conftest.$ac_ext"
2476case "(($ac_try" in
2477  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2478  *) ac_try_echo=$ac_try;;
2479esac
2480eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2481$as_echo "$ac_try_echo"; } >&5
2482  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2483  ac_status=$?
2484  if test -s conftest.err; then
2485    grep -v '^ *+' conftest.err >conftest.er1
2486    cat conftest.er1 >&5
2487    mv -f conftest.er1 conftest.err
2488  fi
2489  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2490  test $ac_status = 0; } > conftest.i && {
2491	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2492	 test ! -s conftest.err
2493       }; then :
2494  ac_retval=0
2495else
2496  $as_echo "$as_me: failed program was:" >&5
2497sed 's/^/| /' conftest.$ac_ext >&5
2498
2499    ac_retval=1
2500fi
2501  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2502  as_fn_set_status $ac_retval
2503
2504} # ac_fn_c_try_cpp
2505
2506# ac_fn_cxx_try_cpp LINENO
2507# ------------------------
2508# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2509ac_fn_cxx_try_cpp ()
2510{
2511  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2512  if { { ac_try="$ac_cpp conftest.$ac_ext"
2513case "(($ac_try" in
2514  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2515  *) ac_try_echo=$ac_try;;
2516esac
2517eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2518$as_echo "$ac_try_echo"; } >&5
2519  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2520  ac_status=$?
2521  if test -s conftest.err; then
2522    grep -v '^ *+' conftest.err >conftest.er1
2523    cat conftest.er1 >&5
2524    mv -f conftest.er1 conftest.err
2525  fi
2526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2527  test $ac_status = 0; } > conftest.i && {
2528	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2529	 test ! -s conftest.err
2530       }; then :
2531  ac_retval=0
2532else
2533  $as_echo "$as_me: failed program was:" >&5
2534sed 's/^/| /' conftest.$ac_ext >&5
2535
2536    ac_retval=1
2537fi
2538  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2539  as_fn_set_status $ac_retval
2540
2541} # ac_fn_cxx_try_cpp
2542
2543# ac_fn_c_try_link LINENO
2544# -----------------------
2545# Try to link conftest.$ac_ext, and return whether this succeeded.
2546ac_fn_c_try_link ()
2547{
2548  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2549  rm -f conftest.$ac_objext conftest$ac_exeext
2550  if { { ac_try="$ac_link"
2551case "(($ac_try" in
2552  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2553  *) ac_try_echo=$ac_try;;
2554esac
2555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2556$as_echo "$ac_try_echo"; } >&5
2557  (eval "$ac_link") 2>conftest.err
2558  ac_status=$?
2559  if test -s conftest.err; then
2560    grep -v '^ *+' conftest.err >conftest.er1
2561    cat conftest.er1 >&5
2562    mv -f conftest.er1 conftest.err
2563  fi
2564  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2565  test $ac_status = 0; } && {
2566	 test -z "$ac_c_werror_flag" ||
2567	 test ! -s conftest.err
2568       } && test -s conftest$ac_exeext && {
2569	 test "$cross_compiling" = yes ||
2570	 test -x conftest$ac_exeext
2571       }; then :
2572  ac_retval=0
2573else
2574  $as_echo "$as_me: failed program was:" >&5
2575sed 's/^/| /' conftest.$ac_ext >&5
2576
2577	ac_retval=1
2578fi
2579  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2580  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2581  # interfere with the next link command; also delete a directory that is
2582  # left behind by Apple's compiler.  We do this before executing the actions.
2583  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585  as_fn_set_status $ac_retval
2586
2587} # ac_fn_c_try_link
2588
2589# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2590# ---------------------------------------------------------
2591# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2592# the include files in INCLUDES and setting the cache variable VAR
2593# accordingly.
2594ac_fn_cxx_check_header_mongrel ()
2595{
2596  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2597  if eval \${$3+:} false; then :
2598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2599$as_echo_n "checking for $2... " >&6; }
2600if eval \${$3+:} false; then :
2601  $as_echo_n "(cached) " >&6
2602fi
2603eval ac_res=\$$3
2604	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2605$as_echo "$ac_res" >&6; }
2606else
2607  # Is the header compilable?
2608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2609$as_echo_n "checking $2 usability... " >&6; }
2610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2611/* end confdefs.h.  */
2612$4
2613#include <$2>
2614_ACEOF
2615if ac_fn_cxx_try_compile "$LINENO"; then :
2616  ac_header_compiler=yes
2617else
2618  ac_header_compiler=no
2619fi
2620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2622$as_echo "$ac_header_compiler" >&6; }
2623
2624# Is the header present?
2625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2626$as_echo_n "checking $2 presence... " >&6; }
2627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2628/* end confdefs.h.  */
2629#include <$2>
2630_ACEOF
2631if ac_fn_cxx_try_cpp "$LINENO"; then :
2632  ac_header_preproc=yes
2633else
2634  ac_header_preproc=no
2635fi
2636rm -f conftest.err conftest.i conftest.$ac_ext
2637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2638$as_echo "$ac_header_preproc" >&6; }
2639
2640# So?  What about this header?
2641case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2642  yes:no: )
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2644$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2646$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2647    ;;
2648  no:yes:* )
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2650$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2652$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2653    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2654$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2656$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2658$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2659( $as_echo "## ----------------------------------------- ##
2660## Report this to build-dev@openjdk.java.net ##
2661## ----------------------------------------- ##"
2662     ) | sed "s/^/$as_me: WARNING:     /" >&2
2663    ;;
2664esac
2665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2666$as_echo_n "checking for $2... " >&6; }
2667if eval \${$3+:} false; then :
2668  $as_echo_n "(cached) " >&6
2669else
2670  eval "$3=\$ac_header_compiler"
2671fi
2672eval ac_res=\$$3
2673	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2674$as_echo "$ac_res" >&6; }
2675fi
2676  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2677
2678} # ac_fn_cxx_check_header_mongrel
2679
2680# ac_fn_cxx_try_run LINENO
2681# ------------------------
2682# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2683# that executables *can* be run.
2684ac_fn_cxx_try_run ()
2685{
2686  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2687  if { { ac_try="$ac_link"
2688case "(($ac_try" in
2689  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690  *) ac_try_echo=$ac_try;;
2691esac
2692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2693$as_echo "$ac_try_echo"; } >&5
2694  (eval "$ac_link") 2>&5
2695  ac_status=$?
2696  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2697  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2698  { { case "(($ac_try" in
2699  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2700  *) ac_try_echo=$ac_try;;
2701esac
2702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2703$as_echo "$ac_try_echo"; } >&5
2704  (eval "$ac_try") 2>&5
2705  ac_status=$?
2706  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2707  test $ac_status = 0; }; }; then :
2708  ac_retval=0
2709else
2710  $as_echo "$as_me: program exited with status $ac_status" >&5
2711       $as_echo "$as_me: failed program was:" >&5
2712sed 's/^/| /' conftest.$ac_ext >&5
2713
2714       ac_retval=$ac_status
2715fi
2716  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2717  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2718  as_fn_set_status $ac_retval
2719
2720} # ac_fn_cxx_try_run
2721
2722# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2723# ---------------------------------------------------------
2724# Tests whether HEADER exists and can be compiled using the include files in
2725# INCLUDES, setting the cache variable VAR accordingly.
2726ac_fn_cxx_check_header_compile ()
2727{
2728  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2730$as_echo_n "checking for $2... " >&6; }
2731if eval \${$3+:} false; then :
2732  $as_echo_n "(cached) " >&6
2733else
2734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2735/* end confdefs.h.  */
2736$4
2737#include <$2>
2738_ACEOF
2739if ac_fn_cxx_try_compile "$LINENO"; then :
2740  eval "$3=yes"
2741else
2742  eval "$3=no"
2743fi
2744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2745fi
2746eval ac_res=\$$3
2747	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2748$as_echo "$ac_res" >&6; }
2749  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2750
2751} # ac_fn_cxx_check_header_compile
2752
2753# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2754# ----------------------------------------------
2755# Tries to find the compile-time value of EXPR in a program that includes
2756# INCLUDES, setting VAR accordingly. Returns whether the value could be
2757# computed
2758ac_fn_cxx_compute_int ()
2759{
2760  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2761  if test "$cross_compiling" = yes; then
2762    # Depending upon the size, compute the lo and hi bounds.
2763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2764/* end confdefs.h.  */
2765$4
2766int
2767main ()
2768{
2769static int test_array [1 - 2 * !(($2) >= 0)];
2770test_array [0] = 0;
2771return test_array [0];
2772
2773  ;
2774  return 0;
2775}
2776_ACEOF
2777if ac_fn_cxx_try_compile "$LINENO"; then :
2778  ac_lo=0 ac_mid=0
2779  while :; do
2780    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2781/* end confdefs.h.  */
2782$4
2783int
2784main ()
2785{
2786static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2787test_array [0] = 0;
2788return test_array [0];
2789
2790  ;
2791  return 0;
2792}
2793_ACEOF
2794if ac_fn_cxx_try_compile "$LINENO"; then :
2795  ac_hi=$ac_mid; break
2796else
2797  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2798			if test $ac_lo -le $ac_mid; then
2799			  ac_lo= ac_hi=
2800			  break
2801			fi
2802			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2803fi
2804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2805  done
2806else
2807  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2808/* end confdefs.h.  */
2809$4
2810int
2811main ()
2812{
2813static int test_array [1 - 2 * !(($2) < 0)];
2814test_array [0] = 0;
2815return test_array [0];
2816
2817  ;
2818  return 0;
2819}
2820_ACEOF
2821if ac_fn_cxx_try_compile "$LINENO"; then :
2822  ac_hi=-1 ac_mid=-1
2823  while :; do
2824    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2825/* end confdefs.h.  */
2826$4
2827int
2828main ()
2829{
2830static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2831test_array [0] = 0;
2832return test_array [0];
2833
2834  ;
2835  return 0;
2836}
2837_ACEOF
2838if ac_fn_cxx_try_compile "$LINENO"; then :
2839  ac_lo=$ac_mid; break
2840else
2841  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2842			if test $ac_mid -le $ac_hi; then
2843			  ac_lo= ac_hi=
2844			  break
2845			fi
2846			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2847fi
2848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2849  done
2850else
2851  ac_lo= ac_hi=
2852fi
2853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2854fi
2855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2856# Binary search between lo and hi bounds.
2857while test "x$ac_lo" != "x$ac_hi"; do
2858  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2860/* end confdefs.h.  */
2861$4
2862int
2863main ()
2864{
2865static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2866test_array [0] = 0;
2867return test_array [0];
2868
2869  ;
2870  return 0;
2871}
2872_ACEOF
2873if ac_fn_cxx_try_compile "$LINENO"; then :
2874  ac_hi=$ac_mid
2875else
2876  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2877fi
2878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2879done
2880case $ac_lo in #((
2881?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2882'') ac_retval=1 ;;
2883esac
2884  else
2885    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2886/* end confdefs.h.  */
2887$4
2888static long int longval () { return $2; }
2889static unsigned long int ulongval () { return $2; }
2890#include <stdio.h>
2891#include <stdlib.h>
2892int
2893main ()
2894{
2895
2896  FILE *f = fopen ("conftest.val", "w");
2897  if (! f)
2898    return 1;
2899  if (($2) < 0)
2900    {
2901      long int i = longval ();
2902      if (i != ($2))
2903	return 1;
2904      fprintf (f, "%ld", i);
2905    }
2906  else
2907    {
2908      unsigned long int i = ulongval ();
2909      if (i != ($2))
2910	return 1;
2911      fprintf (f, "%lu", i);
2912    }
2913  /* Do not output a trailing newline, as this causes \r\n confusion
2914     on some platforms.  */
2915  return ferror (f) || fclose (f) != 0;
2916
2917  ;
2918  return 0;
2919}
2920_ACEOF
2921if ac_fn_cxx_try_run "$LINENO"; then :
2922  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2923else
2924  ac_retval=1
2925fi
2926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2927  conftest.$ac_objext conftest.beam conftest.$ac_ext
2928rm -f conftest.val
2929
2930  fi
2931  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2932  as_fn_set_status $ac_retval
2933
2934} # ac_fn_cxx_compute_int
2935
2936# ac_fn_cxx_try_link LINENO
2937# -------------------------
2938# Try to link conftest.$ac_ext, and return whether this succeeded.
2939ac_fn_cxx_try_link ()
2940{
2941  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2942  rm -f conftest.$ac_objext conftest$ac_exeext
2943  if { { ac_try="$ac_link"
2944case "(($ac_try" in
2945  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2946  *) ac_try_echo=$ac_try;;
2947esac
2948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2949$as_echo "$ac_try_echo"; } >&5
2950  (eval "$ac_link") 2>conftest.err
2951  ac_status=$?
2952  if test -s conftest.err; then
2953    grep -v '^ *+' conftest.err >conftest.er1
2954    cat conftest.er1 >&5
2955    mv -f conftest.er1 conftest.err
2956  fi
2957  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2958  test $ac_status = 0; } && {
2959	 test -z "$ac_cxx_werror_flag" ||
2960	 test ! -s conftest.err
2961       } && test -s conftest$ac_exeext && {
2962	 test "$cross_compiling" = yes ||
2963	 test -x conftest$ac_exeext
2964       }; then :
2965  ac_retval=0
2966else
2967  $as_echo "$as_me: failed program was:" >&5
2968sed 's/^/| /' conftest.$ac_ext >&5
2969
2970	ac_retval=1
2971fi
2972  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2973  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2974  # interfere with the next link command; also delete a directory that is
2975  # left behind by Apple's compiler.  We do this before executing the actions.
2976  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2977  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2978  as_fn_set_status $ac_retval
2979
2980} # ac_fn_cxx_try_link
2981
2982# ac_fn_cxx_check_func LINENO FUNC VAR
2983# ------------------------------------
2984# Tests whether FUNC exists, setting the cache variable VAR accordingly
2985ac_fn_cxx_check_func ()
2986{
2987  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2988  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2989$as_echo_n "checking for $2... " >&6; }
2990if eval \${$3+:} false; then :
2991  $as_echo_n "(cached) " >&6
2992else
2993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2994/* end confdefs.h.  */
2995/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2996   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2997#define $2 innocuous_$2
2998
2999/* System header to define __stub macros and hopefully few prototypes,
3000    which can conflict with char $2 (); below.
3001    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3002    <limits.h> exists even on freestanding compilers.  */
3003
3004#ifdef __STDC__
3005# include <limits.h>
3006#else
3007# include <assert.h>
3008#endif
3009
3010#undef $2
3011
3012/* Override any GCC internal prototype to avoid an error.
3013   Use char because int might match the return type of a GCC
3014   builtin and then its argument prototype would still apply.  */
3015#ifdef __cplusplus
3016extern "C"
3017#endif
3018char $2 ();
3019/* The GNU C library defines this for functions which it implements
3020    to always fail with ENOSYS.  Some functions are actually named
3021    something starting with __ and the normal name is an alias.  */
3022#if defined __stub_$2 || defined __stub___$2
3023choke me
3024#endif
3025
3026int
3027main ()
3028{
3029return $2 ();
3030  ;
3031  return 0;
3032}
3033_ACEOF
3034if ac_fn_cxx_try_link "$LINENO"; then :
3035  eval "$3=yes"
3036else
3037  eval "$3=no"
3038fi
3039rm -f core conftest.err conftest.$ac_objext \
3040    conftest$ac_exeext conftest.$ac_ext
3041fi
3042eval ac_res=\$$3
3043	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3044$as_echo "$ac_res" >&6; }
3045  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3046
3047} # ac_fn_cxx_check_func
3048
3049# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3050# -------------------------------------------------------
3051# Tests whether HEADER exists and can be compiled using the include files in
3052# INCLUDES, setting the cache variable VAR accordingly.
3053ac_fn_c_check_header_compile ()
3054{
3055  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3056  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3057$as_echo_n "checking for $2... " >&6; }
3058if eval \${$3+:} false; then :
3059  $as_echo_n "(cached) " >&6
3060else
3061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3062/* end confdefs.h.  */
3063$4
3064#include <$2>
3065_ACEOF
3066if ac_fn_c_try_compile "$LINENO"; then :
3067  eval "$3=yes"
3068else
3069  eval "$3=no"
3070fi
3071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3072fi
3073eval ac_res=\$$3
3074	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3075$as_echo "$ac_res" >&6; }
3076  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3077
3078} # ac_fn_c_check_header_compile
3079cat >config.log <<_ACEOF
3080This file contains any messages produced by compilers while
3081running configure, to aid debugging if configure makes a mistake.
3082
3083It was created by OpenJDK $as_me jdk9, which was
3084generated by GNU Autoconf 2.69.  Invocation command line was
3085
3086  $ $0 $@
3087
3088_ACEOF
3089exec 5>>config.log
3090{
3091cat <<_ASUNAME
3092## --------- ##
3093## Platform. ##
3094## --------- ##
3095
3096hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3097uname -m = `(uname -m) 2>/dev/null || echo unknown`
3098uname -r = `(uname -r) 2>/dev/null || echo unknown`
3099uname -s = `(uname -s) 2>/dev/null || echo unknown`
3100uname -v = `(uname -v) 2>/dev/null || echo unknown`
3101
3102/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3103/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3104
3105/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3106/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3107/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3108/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3109/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3110/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3111/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3112
3113_ASUNAME
3114
3115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3116for as_dir in $PATH
3117do
3118  IFS=$as_save_IFS
3119  test -z "$as_dir" && as_dir=.
3120    $as_echo "PATH: $as_dir"
3121  done
3122IFS=$as_save_IFS
3123
3124} >&5
3125
3126cat >&5 <<_ACEOF
3127
3128
3129## ----------- ##
3130## Core tests. ##
3131## ----------- ##
3132
3133_ACEOF
3134
3135
3136# Keep a trace of the command line.
3137# Strip out --no-create and --no-recursion so they do not pile up.
3138# Strip out --silent because we don't want to record it for future runs.
3139# Also quote any args containing shell meta-characters.
3140# Make two passes to allow for proper duplicate-argument suppression.
3141ac_configure_args=
3142ac_configure_args0=
3143ac_configure_args1=
3144ac_must_keep_next=false
3145for ac_pass in 1 2
3146do
3147  for ac_arg
3148  do
3149    case $ac_arg in
3150    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3151    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3152    | -silent | --silent | --silen | --sile | --sil)
3153      continue ;;
3154    *\'*)
3155      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3156    esac
3157    case $ac_pass in
3158    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3159    2)
3160      as_fn_append ac_configure_args1 " '$ac_arg'"
3161      if test $ac_must_keep_next = true; then
3162	ac_must_keep_next=false # Got value, back to normal.
3163      else
3164	case $ac_arg in
3165	  *=* | --config-cache | -C | -disable-* | --disable-* \
3166	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3167	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3168	  | -with-* | --with-* | -without-* | --without-* | --x)
3169	    case "$ac_configure_args0 " in
3170	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3171	    esac
3172	    ;;
3173	  -* ) ac_must_keep_next=true ;;
3174	esac
3175      fi
3176      as_fn_append ac_configure_args " '$ac_arg'"
3177      ;;
3178    esac
3179  done
3180done
3181{ ac_configure_args0=; unset ac_configure_args0;}
3182{ ac_configure_args1=; unset ac_configure_args1;}
3183
3184# When interrupted or exit'd, cleanup temporary files, and complete
3185# config.log.  We remove comments because anyway the quotes in there
3186# would cause problems or look ugly.
3187# WARNING: Use '\'' to represent an apostrophe within the trap.
3188# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3189trap 'exit_status=$?
3190  # Save into config.log some information that might help in debugging.
3191  {
3192    echo
3193
3194    $as_echo "## ---------------- ##
3195## Cache variables. ##
3196## ---------------- ##"
3197    echo
3198    # The following way of writing the cache mishandles newlines in values,
3199(
3200  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3201    eval ac_val=\$$ac_var
3202    case $ac_val in #(
3203    *${as_nl}*)
3204      case $ac_var in #(
3205      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3206$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3207      esac
3208      case $ac_var in #(
3209      _ | IFS | as_nl) ;; #(
3210      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3211      *) { eval $ac_var=; unset $ac_var;} ;;
3212      esac ;;
3213    esac
3214  done
3215  (set) 2>&1 |
3216    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3217    *${as_nl}ac_space=\ *)
3218      sed -n \
3219	"s/'\''/'\''\\\\'\'''\''/g;
3220	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3221      ;; #(
3222    *)
3223      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3224      ;;
3225    esac |
3226    sort
3227)
3228    echo
3229
3230    $as_echo "## ----------------- ##
3231## Output variables. ##
3232## ----------------- ##"
3233    echo
3234    for ac_var in $ac_subst_vars
3235    do
3236      eval ac_val=\$$ac_var
3237      case $ac_val in
3238      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3239      esac
3240      $as_echo "$ac_var='\''$ac_val'\''"
3241    done | sort
3242    echo
3243
3244    if test -n "$ac_subst_files"; then
3245      $as_echo "## ------------------- ##
3246## File substitutions. ##
3247## ------------------- ##"
3248      echo
3249      for ac_var in $ac_subst_files
3250      do
3251	eval ac_val=\$$ac_var
3252	case $ac_val in
3253	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3254	esac
3255	$as_echo "$ac_var='\''$ac_val'\''"
3256      done | sort
3257      echo
3258    fi
3259
3260    if test -s confdefs.h; then
3261      $as_echo "## ----------- ##
3262## confdefs.h. ##
3263## ----------- ##"
3264      echo
3265      cat confdefs.h
3266      echo
3267    fi
3268    test "$ac_signal" != 0 &&
3269      $as_echo "$as_me: caught signal $ac_signal"
3270    $as_echo "$as_me: exit $exit_status"
3271  } >&5
3272  rm -f core *.core core.conftest.* &&
3273    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3274    exit $exit_status
3275' 0
3276for ac_signal in 1 2 13 15; do
3277  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3278done
3279ac_signal=0
3280
3281# confdefs.h avoids OS command line length limits that DEFS can exceed.
3282rm -f -r conftest* confdefs.h
3283
3284$as_echo "/* confdefs.h */" > confdefs.h
3285
3286# Predefined preprocessor variables.
3287
3288cat >>confdefs.h <<_ACEOF
3289#define PACKAGE_NAME "$PACKAGE_NAME"
3290_ACEOF
3291
3292cat >>confdefs.h <<_ACEOF
3293#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3294_ACEOF
3295
3296cat >>confdefs.h <<_ACEOF
3297#define PACKAGE_VERSION "$PACKAGE_VERSION"
3298_ACEOF
3299
3300cat >>confdefs.h <<_ACEOF
3301#define PACKAGE_STRING "$PACKAGE_STRING"
3302_ACEOF
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_URL "$PACKAGE_URL"
3310_ACEOF
3311
3312
3313# Let the site file select an alternate cache file if it wants to.
3314# Prefer an explicitly selected file to automatically selected ones.
3315ac_site_file1=NONE
3316ac_site_file2=NONE
3317if test -n "$CONFIG_SITE"; then
3318  # We do not want a PATH search for config.site.
3319  case $CONFIG_SITE in #((
3320    -*)  ac_site_file1=./$CONFIG_SITE;;
3321    */*) ac_site_file1=$CONFIG_SITE;;
3322    *)   ac_site_file1=./$CONFIG_SITE;;
3323  esac
3324elif test "x$prefix" != xNONE; then
3325  ac_site_file1=$prefix/share/config.site
3326  ac_site_file2=$prefix/etc/config.site
3327else
3328  ac_site_file1=$ac_default_prefix/share/config.site
3329  ac_site_file2=$ac_default_prefix/etc/config.site
3330fi
3331for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3332do
3333  test "x$ac_site_file" = xNONE && continue
3334  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3335    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3336$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3337    sed 's/^/| /' "$ac_site_file" >&5
3338    . "$ac_site_file" \
3339      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3341as_fn_error $? "failed to load site script $ac_site_file
3342See \`config.log' for more details" "$LINENO" 5; }
3343  fi
3344done
3345
3346if test -r "$cache_file"; then
3347  # Some versions of bash will fail to source /dev/null (special files
3348  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3349  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3350    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3351$as_echo "$as_me: loading cache $cache_file" >&6;}
3352    case $cache_file in
3353      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3354      *)                      . "./$cache_file";;
3355    esac
3356  fi
3357else
3358  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3359$as_echo "$as_me: creating cache $cache_file" >&6;}
3360  >$cache_file
3361fi
3362
3363# Check that the precious variables saved in the cache have kept the same
3364# value.
3365ac_cache_corrupted=false
3366for ac_var in $ac_precious_vars; do
3367  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3368  eval ac_new_set=\$ac_env_${ac_var}_set
3369  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3370  eval ac_new_val=\$ac_env_${ac_var}_value
3371  case $ac_old_set,$ac_new_set in
3372    set,)
3373      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3374$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3375      ac_cache_corrupted=: ;;
3376    ,set)
3377      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3378$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3379      ac_cache_corrupted=: ;;
3380    ,);;
3381    *)
3382      if test "x$ac_old_val" != "x$ac_new_val"; then
3383	# differences in whitespace do not lead to failure.
3384	ac_old_val_w=`echo x $ac_old_val`
3385	ac_new_val_w=`echo x $ac_new_val`
3386	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3387	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3388$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3389	  ac_cache_corrupted=:
3390	else
3391	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3392$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3393	  eval $ac_var=\$ac_old_val
3394	fi
3395	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3396$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3397	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3398$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3399      fi;;
3400  esac
3401  # Pass precious variables to config.status.
3402  if test "$ac_new_set" = set; then
3403    case $ac_new_val in
3404    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3405    *) ac_arg=$ac_var=$ac_new_val ;;
3406    esac
3407    case " $ac_configure_args " in
3408      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3409      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3410    esac
3411  fi
3412done
3413if $ac_cache_corrupted; then
3414  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3415$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3416  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3417$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3418  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3419fi
3420## -------------------- ##
3421## Main body of script. ##
3422## -------------------- ##
3423
3424ac_ext=c
3425ac_cpp='$CPP $CPPFLAGS'
3426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3428ac_compiler_gnu=$ac_cv_c_compiler_gnu
3429
3430
3431
3432ac_aux_dir=
3433for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3434  if test -f "$ac_dir/install-sh"; then
3435    ac_aux_dir=$ac_dir
3436    ac_install_sh="$ac_aux_dir/install-sh -c"
3437    break
3438  elif test -f "$ac_dir/install.sh"; then
3439    ac_aux_dir=$ac_dir
3440    ac_install_sh="$ac_aux_dir/install.sh -c"
3441    break
3442  elif test -f "$ac_dir/shtool"; then
3443    ac_aux_dir=$ac_dir
3444    ac_install_sh="$ac_aux_dir/shtool install -c"
3445    break
3446  fi
3447done
3448if test -z "$ac_aux_dir"; then
3449  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3450fi
3451
3452# These three variables are undocumented and unsupported,
3453# and are intended to be withdrawn in a future Autoconf release.
3454# They can cause serious problems if a builder's source tree is in a directory
3455# whose full name contains unusual characters.
3456ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3457ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3458ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3459
3460
3461# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3462
3463#
3464# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3465# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3466#
3467# This code is free software; you can redistribute it and/or modify it
3468# under the terms of the GNU General Public License version 2 only, as
3469# published by the Free Software Foundation.  Oracle designates this
3470# particular file as subject to the "Classpath" exception as provided
3471# by Oracle in the LICENSE file that accompanied this code.
3472#
3473# This code is distributed in the hope that it will be useful, but WITHOUT
3474# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3475# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3476# version 2 for more details (a copy is included in the LICENSE file that
3477# accompanied this code).
3478#
3479# You should have received a copy of the GNU General Public License version
3480# 2 along with this work; if not, write to the Free Software Foundation,
3481# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3482#
3483# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3484# or visit www.oracle.com if you need additional information or have any
3485# questions.
3486#
3487
3488#
3489# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3490#
3491# This program is free software; you can redistribute it and/or modify
3492# it under the terms of the GNU General Public License as published by
3493# the Free Software Foundation; either version 2 of the License, or
3494# (at your option) any later version.
3495#
3496# This program is distributed in the hope that it will be useful, but
3497# WITHOUT ANY WARRANTY; without even the implied warranty of
3498# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3499# General Public License for more details.
3500#
3501# You should have received a copy of the GNU General Public License
3502# along with this program; if not, write to the Free Software
3503# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3504#
3505# As a special exception to the GNU General Public License, if you
3506# distribute this file as part of a program that contains a
3507# configuration script generated by Autoconf, you may include it under
3508# the same distribution terms that you use for the rest of that program.
3509
3510# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3511# ----------------------------------
3512# PKG_PROG_PKG_CONFIG
3513
3514# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3515#
3516# Check to see whether a particular set of modules exists.  Similar
3517# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3518#
3519#
3520# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3521# this or PKG_CHECK_MODULES is called, or make sure to call
3522# PKG_CHECK_EXISTS manually
3523# --------------------------------------------------------------
3524
3525
3526
3527# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3528# ---------------------------------------------
3529# _PKG_CONFIG
3530
3531# _PKG_SHORT_ERRORS_SUPPORTED
3532# -----------------------------
3533# _PKG_SHORT_ERRORS_SUPPORTED
3534
3535
3536# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3537# [ACTION-IF-NOT-FOUND])
3538#
3539#
3540# Note that if there is a possibility the first call to
3541# PKG_CHECK_MODULES might not happen, you should be sure to include an
3542# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3543#
3544#
3545# --------------------------------------------------------------
3546# PKG_CHECK_MODULES
3547
3548
3549# Include these first...
3550#
3551# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3552# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3553#
3554# This code is free software; you can redistribute it and/or modify it
3555# under the terms of the GNU General Public License version 2 only, as
3556# published by the Free Software Foundation.  Oracle designates this
3557# particular file as subject to the "Classpath" exception as provided
3558# by Oracle in the LICENSE file that accompanied this code.
3559#
3560# This code is distributed in the hope that it will be useful, but WITHOUT
3561# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3562# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3563# version 2 for more details (a copy is included in the LICENSE file that
3564# accompanied this code).
3565#
3566# You should have received a copy of the GNU General Public License version
3567# 2 along with this work; if not, write to the Free Software Foundation,
3568# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3569#
3570# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3571# or visit www.oracle.com if you need additional information or have any
3572# questions.
3573#
3574
3575# Create a function/macro that takes a series of named arguments. The call is
3576# similar to AC_DEFUN, but the setup of the function looks like this:
3577# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3578# ... do something
3579#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3580# ])
3581# A star (*) in front of a named argument means that it is required and it's
3582# presence will be verified. To pass e.g. the first value as a normal indexed
3583# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3584# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3585# "ARG_FOO".
3586#
3587# The generated function can be called like this:
3588# MYFUNC(FOO: [foo-val],
3589#     BAR: [
3590#         $ECHO hello world
3591#     ])
3592# Note that the argument value must start on the same line as the argument name.
3593#
3594# Argument 1: Name of the function to define
3595# Argument 2: List of legal named arguments, with a * prefix for required arguments
3596# Argument 3: Argument array to treat as named, typically $@
3597# Argument 4: The main function body
3598
3599
3600# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3601# If so, then append $1 to $2 \
3602# Also set JVM_ARG_OK to true/false depending on outcome.
3603
3604
3605# Appends a string to a path variable, only adding the : when needed.
3606
3607
3608# Prepends a string to a path variable, only adding the : when needed.
3609
3610
3611# This will make sure the given variable points to a full and proper
3612# path. This means:
3613# 1) There will be no spaces in the path. On unix platforms,
3614#    spaces in the path will result in an error. On Windows,
3615#    the path will be rewritten using short-style to be space-free.
3616# 2) The path will be absolute, and it will be in unix-style (on
3617#     cygwin).
3618# $1: The name of the variable to fix
3619
3620
3621# This will make sure the given variable points to a executable
3622# with a full and proper path. This means:
3623# 1) There will be no spaces in the path. On unix platforms,
3624#    spaces in the path will result in an error. On Windows,
3625#    the path will be rewritten using short-style to be space-free.
3626# 2) The path will be absolute, and it will be in unix-style (on
3627#     cygwin).
3628# Any arguments given to the executable is preserved.
3629# If the input variable does not have a directory specification, then
3630# it need to be in the PATH.
3631# $1: The name of the variable to fix
3632
3633
3634
3635
3636# Register a --with argument but mark it as deprecated
3637# $1: The name of the with argument to deprecate, not including --with-
3638
3639
3640# Register a --enable argument but mark it as deprecated
3641# $1: The name of the with argument to deprecate, not including --enable-
3642# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3643# $3: Messages to user.
3644
3645
3646
3647
3648# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3649# $1: variable to check
3650
3651
3652# Check that there are no unprocessed overridden variables left.
3653# If so, they are an incorrect argument and we will exit with an error.
3654
3655
3656# Setup a tool for the given variable. If correctly specified by the user,
3657# use that value, otherwise search for the tool using the supplied code snippet.
3658# $1: variable to set
3659# $2: code snippet to call to look for the tool
3660# $3: code snippet to call if variable was used to find tool
3661
3662
3663# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3664# $1: variable to set
3665# $2: executable name (or list of names) to look for
3666
3667
3668# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3669# $1: variable to set
3670# $2: executable name (or list of names) to look for
3671
3672
3673# Like BASIC_PATH_PROGS but fails if no tool was found.
3674# $1: variable to set
3675# $2: executable name (or list of names) to look for
3676
3677
3678# Like BASIC_SETUP_TOOL but fails if no tool was found.
3679# $1: variable to set
3680# $2: autoconf macro to call to look for the special tool
3681
3682
3683# Setup the most fundamental tools that relies on not much else to set up,
3684# but is used by much of the early bootstrap code.
3685
3686
3687# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3688
3689
3690# Evaluates platform specific overrides for devkit variables.
3691# $1: Name of variable
3692
3693
3694
3695
3696
3697
3698#%%% Simple tools %%%
3699
3700# Check if we have found a usable version of make
3701# $1: the path to a potential make binary (or empty)
3702# $2: the description on how we found this
3703
3704
3705
3706
3707# Goes looking for a usable version of GNU make.
3708
3709
3710
3711
3712
3713
3714
3715
3716# Check if build directory is on local disk. If not possible to determine,
3717# we prefer to claim it's local.
3718# Argument 1: directory to test
3719# Argument 2: what to do if it is on local disk
3720# Argument 3: what to do otherwise (remote disk or failure)
3721
3722
3723# Check that source files have basic read permissions set. This might
3724# not be the case in cygwin in certain conditions.
3725
3726
3727
3728
3729# Check for support for specific options in bash
3730
3731
3732################################################################################
3733#
3734# Default make target
3735#
3736
3737
3738# Code to run after AC_OUTPUT
3739
3740
3741#
3742# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3743# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3744#
3745# This code is free software; you can redistribute it and/or modify it
3746# under the terms of the GNU General Public License version 2 only, as
3747# published by the Free Software Foundation.  Oracle designates this
3748# particular file as subject to the "Classpath" exception as provided
3749# by Oracle in the LICENSE file that accompanied this code.
3750#
3751# This code is distributed in the hope that it will be useful, but WITHOUT
3752# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3753# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3754# version 2 for more details (a copy is included in the LICENSE file that
3755# accompanied this code).
3756#
3757# You should have received a copy of the GNU General Public License version
3758# 2 along with this work; if not, write to the Free Software Foundation,
3759# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3760#
3761# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3762# or visit www.oracle.com if you need additional information or have any
3763# questions.
3764#
3765
3766
3767
3768
3769
3770# Helper function which possibly converts a path using DOS-style short mode.
3771# If so, the updated path is stored in $new_path.
3772# $1: The path to check
3773
3774
3775# Helper function which possibly converts a path using DOS-style short mode.
3776# If so, the updated path is stored in $new_path.
3777# $1: The path to check
3778
3779
3780# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3781# and could probably be heavily simplified. However, all changes in this
3782# area tend to need lot of testing in different scenarios, and in lack of
3783# proper unit testing, cleaning this up has not been deemed worth the effort
3784# at the moment.
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3795
3796
3797
3798
3799# ... then the rest
3800#
3801# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3802# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3803#
3804# This code is free software; you can redistribute it and/or modify it
3805# under the terms of the GNU General Public License version 2 only, as
3806# published by the Free Software Foundation.  Oracle designates this
3807# particular file as subject to the "Classpath" exception as provided
3808# by Oracle in the LICENSE file that accompanied this code.
3809#
3810# This code is distributed in the hope that it will be useful, but WITHOUT
3811# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3812# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3813# version 2 for more details (a copy is included in the LICENSE file that
3814# accompanied this code).
3815#
3816# You should have received a copy of the GNU General Public License version
3817# 2 along with this work; if not, write to the Free Software Foundation,
3818# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3819#
3820# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3821# or visit www.oracle.com if you need additional information or have any
3822# questions.
3823#
3824
3825########################################################################
3826# This file handles detection of the Boot JDK. The Boot JDK detection
3827# process has been developed as a response to solve a complex real-world
3828# problem. Initially, it was simple, but it has grown as platform after
3829# platform, idiosyncracy after idiosyncracy has been supported.
3830#
3831# The basic idea is this:
3832# 1) You need an acceptable *) JDK to use as a Boot JDK
3833# 2) There are several ways to locate a JDK, that are mostly platform
3834#    dependent **)
3835# 3) You can have multiple JDKs installed
3836# 4) If possible, configure should try to dig out an acceptable JDK
3837#    automatically, without having to resort to command-line options
3838#
3839# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3840#     javac) and not a JRE, etc.
3841#
3842# **) On Windows we typically use a well-known path.
3843#     On MacOSX we typically use the tool java_home.
3844#     On Linux we typically find javac in the $PATH, and then follow a
3845#     chain of symlinks that often ends up in a real JDK.
3846#
3847# This leads to the code where we check in different ways to locate a
3848# JDK, and if one is found, check if it is acceptable. If not, we print
3849# our reasons for rejecting it (useful when debugging non-working
3850# configure situations) and continue checking the next one.
3851########################################################################
3852
3853# Execute the check given as argument, and verify the result
3854# If the Boot JDK was previously found, do nothing
3855# $1 A command line (typically autoconf macro) to execute
3856
3857
3858# Test: Is bootjdk explicitely set by command line arguments?
3859
3860
3861# Test: Is $JAVA_HOME set?
3862
3863
3864# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3865
3866
3867# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3868# $1: Argument to the java_home binary (optional)
3869
3870
3871# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3872
3873
3874# Look for a jdk in the given path. If there are multiple, try to select the newest.
3875# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3876# $1 = Path to directory containing jdk installations.
3877# $2 = String to append to the found JDK directory to get the proper JDK home
3878
3879
3880# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3881# environmental variable as base for where to look.
3882# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3883
3884
3885# Test: Is there a JDK installed in default, well-known locations?
3886
3887
3888# Check that a command-line tool in the Boot JDK is correct
3889# $1 = name of variable to assign
3890# $2 = name of binary
3891
3892
3893###############################################################################
3894#
3895# We need a Boot JDK to bootstrap the build.
3896#
3897
3898
3899
3900
3901
3902# BUILD_JDK: the location of the latest JDK that can run
3903#   on the host system and supports the target class file version
3904#   generated in this JDK build.  This variable should only be
3905#   used after the launchers are built.
3906#
3907
3908# Execute the check given as argument, and verify the result.
3909# If the JDK was previously found, do nothing.
3910# $1 A command line (typically autoconf macro) to execute
3911
3912
3913# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3914# is different than the host system doing the build (e.g. cross-compilation),
3915# a special BUILD_JDK is built as part of the build process.  An external
3916# prebuilt BUILD_JDK can also be supplied.
3917
3918
3919#
3920# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3921# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3922#
3923# This code is free software; you can redistribute it and/or modify it
3924# under the terms of the GNU General Public License version 2 only, as
3925# published by the Free Software Foundation.  Oracle designates this
3926# particular file as subject to the "Classpath" exception as provided
3927# by Oracle in the LICENSE file that accompanied this code.
3928#
3929# This code is distributed in the hope that it will be useful, but WITHOUT
3930# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3931# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3932# version 2 for more details (a copy is included in the LICENSE file that
3933# accompanied this code).
3934#
3935# You should have received a copy of the GNU General Public License version
3936# 2 along with this work; if not, write to the Free Software Foundation,
3937# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3938#
3939# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3940# or visit www.oracle.com if you need additional information or have any
3941# questions.
3942#
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960################################################################################
3961#
3962# Runs icecc-create-env once and prints the error if it fails
3963#
3964# $1: arguments to icecc-create-env
3965# $2: log file
3966#
3967
3968
3969################################################################################
3970#
3971# Optionally enable distributed compilation of native code using icecc/icecream
3972#
3973
3974
3975
3976
3977
3978
3979
3980#
3981# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3982# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3983#
3984# This code is free software; you can redistribute it and/or modify it
3985# under the terms of the GNU General Public License version 2 only, as
3986# published by the Free Software Foundation.  Oracle designates this
3987# particular file as subject to the "Classpath" exception as provided
3988# by Oracle in the LICENSE file that accompanied this code.
3989#
3990# This code is distributed in the hope that it will be useful, but WITHOUT
3991# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3992# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3993# version 2 for more details (a copy is included in the LICENSE file that
3994# accompanied this code).
3995#
3996# You should have received a copy of the GNU General Public License version
3997# 2 along with this work; if not, write to the Free Software Foundation,
3998# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3999#
4000# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4001# or visit www.oracle.com if you need additional information or have any
4002# questions.
4003#
4004
4005# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4006# corresponding configure arguments instead
4007
4008
4009# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4010# that configure can use them while detecting compilers.
4011# TOOLCHAIN_TYPE is available here.
4012# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4013
4014
4015
4016
4017
4018
4019# Documentation on common flags used for solstudio in HIGHEST.
4020#
4021# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4022#          done with care, there are some assumptions below that need to
4023#          be understood about the use of pointers, and IEEE behavior.
4024#
4025# -fns: Use non-standard floating point mode (not IEEE 754)
4026# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4027# -fsingle: Use single precision floating point with 'float'
4028# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4029#   (Source with excessing pointer casting and data access with mixed
4030#    pointer types are not recommended)
4031# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4032#   (If you expect perfect errno behavior, do not use this)
4033# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4034# -xrestrict: Pointer parameters to functions do not overlap
4035#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4036#    If you pass in multiple pointers to the same data, do not use this)
4037# -xlibmil: Inline some library routines
4038#   (If you expect perfect errno behavior, do not use this)
4039# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4040#   (If you expect perfect errno behavior, do not use this)
4041#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4042
4043    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4044    # Bug?
4045    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4046    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4047    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4048    #fi
4049
4050
4051
4052
4053
4054
4055################################################################################
4056# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4057#      conditionals against.
4058# $2 - Optional prefix for each variable defined.
4059
4060
4061# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4062#                                  IF_FALSE: [RUN-IF-FALSE])
4063# ------------------------------------------------------------
4064# Check that the C compiler supports an argument
4065
4066
4067
4068
4069# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4070#                                    IF_FALSE: [RUN-IF-FALSE])
4071# ------------------------------------------------------------
4072# Check that the C++ compiler supports an argument
4073
4074
4075
4076
4077# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4078#                                IF_FALSE: [RUN-IF-FALSE])
4079# ------------------------------------------------------------
4080# Check that the C and C++ compilers support an argument
4081
4082
4083
4084
4085# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4086#                                   IF_FALSE: [RUN-IF-FALSE])
4087# ------------------------------------------------------------
4088# Check that the linker support an argument
4089
4090
4091
4092
4093
4094
4095
4096
4097#
4098# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4099# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4100#
4101# This code is free software; you can redistribute it and/or modify it
4102# under the terms of the GNU General Public License version 2 only, as
4103# published by the Free Software Foundation.  Oracle designates this
4104# particular file as subject to the "Classpath" exception as provided
4105# by Oracle in the LICENSE file that accompanied this code.
4106#
4107# This code is distributed in the hope that it will be useful, but WITHOUT
4108# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4109# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4110# version 2 for more details (a copy is included in the LICENSE file that
4111# accompanied this code).
4112#
4113# You should have received a copy of the GNU General Public License version
4114# 2 along with this work; if not, write to the Free Software Foundation,
4115# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4116#
4117# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4118# or visit www.oracle.com if you need additional information or have any
4119# questions.
4120#
4121
4122
4123
4124
4125
4126cygwin_help() {
4127  case $1 in
4128    unzip)
4129      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4130      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4131      ;;
4132    zip)
4133      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4134      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4135      ;;
4136    make)
4137      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4138      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4139      ;;
4140    freetype)
4141      HELP_MSG="
4142The freetype library can now be build during the configure process.
4143Download the freetype sources and unpack them into an arbitrary directory:
4144
4145wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4146tar -xzf freetype-2.5.3.tar.gz
4147
4148Then run configure with '--with-freetype-src=<freetype_src>'. This will
4149automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4150builds or into '<freetype_src>/lib32' for 32-bit builds.
4151Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4152and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4153
4154Alternatively you can unpack the sources like this to use the default directory:
4155
4156tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4157      ;;
4158  esac
4159}
4160
4161msys_help() {
4162  PKGHANDLER_COMMAND=""
4163}
4164
4165apt_help() {
4166  case $1 in
4167    reduced)
4168      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4169    devkit)
4170      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4171    openjdk)
4172      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4173    alsa)
4174      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4175    cups)
4176      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4177    freetype)
4178      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4179    ffi)
4180      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4181    x11)
4182      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4183    ccache)
4184      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4185    dtrace)
4186      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4187  esac
4188}
4189
4190yum_help() {
4191  case $1 in
4192    devkit)
4193      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4194    openjdk)
4195      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4196    alsa)
4197      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4198    cups)
4199      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4200    freetype)
4201      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4202    x11)
4203      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4204    ccache)
4205      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4206  esac
4207}
4208
4209port_help() {
4210  PKGHANDLER_COMMAND=""
4211}
4212
4213pkgutil_help() {
4214  PKGHANDLER_COMMAND=""
4215}
4216
4217pkgadd_help() {
4218  PKGHANDLER_COMMAND=""
4219}
4220
4221# This function will check if we're called from the "configure" wrapper while
4222# printing --help. If so, we will print out additional information that can
4223# only be extracted within the autoconf script, and then exit. This must be
4224# called at the very beginning in configure.ac.
4225
4226
4227
4228
4229
4230
4231#
4232# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4233# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4234#
4235# This code is free software; you can redistribute it and/or modify it
4236# under the terms of the GNU General Public License version 2 only, as
4237# published by the Free Software Foundation.  Oracle designates this
4238# particular file as subject to the "Classpath" exception as provided
4239# by Oracle in the LICENSE file that accompanied this code.
4240#
4241# This code is distributed in the hope that it will be useful, but WITHOUT
4242# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4243# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4244# version 2 for more details (a copy is included in the LICENSE file that
4245# accompanied this code).
4246#
4247# You should have received a copy of the GNU General Public License version
4248# 2 along with this work; if not, write to the Free Software Foundation,
4249# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4250#
4251# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4252# or visit www.oracle.com if you need additional information or have any
4253# questions.
4254#
4255
4256# All valid JVM features, regardless of platform
4257VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4258    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4259
4260# All valid JVM variants
4261VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4262
4263###############################################################################
4264# Check if the specified JVM variant should be built. To be used in shell if
4265# constructs, like this:
4266# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4267#
4268# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4269
4270# Definition kept in one line to allow inlining in if statements.
4271# Additional [] needed to keep m4 from mangling shell constructs.
4272
4273
4274###############################################################################
4275# Check if the specified JVM features are explicitly enabled. To be used in
4276# shell if constructs, like this:
4277# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4278#
4279# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4280
4281# Definition kept in one line to allow inlining in if statements.
4282# Additional [] needed to keep m4 from mangling shell constructs.
4283
4284
4285###############################################################################
4286# Check which variants of the JVM that we want to build. Available variants are:
4287#   server: normal interpreter, and a tiered C1/C2 compiler
4288#   client: normal interpreter, and C1 (no C2 compiler)
4289#   minimal: reduced form of client with optional features stripped out
4290#   core: normal interpreter only, no compiler
4291#   zero: C++ based interpreter only, no compiler
4292#   zeroshark: C++ based interpreter, and a llvm-based compiler
4293#   custom: baseline JVM with no default features
4294#
4295
4296
4297###############################################################################
4298# Check if dtrace should be enabled and has all prerequisites present.
4299#
4300
4301
4302###############################################################################
4303# Set up all JVM features for each JVM variant.
4304#
4305
4306
4307###############################################################################
4308# Validate JVM features once all setup is complete, including custom setup.
4309#
4310
4311
4312################################################################################
4313# Check if gtest should be built
4314#
4315
4316
4317#
4318# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4319# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4320#
4321# This code is free software; you can redistribute it and/or modify it
4322# under the terms of the GNU General Public License version 2 only, as
4323# published by the Free Software Foundation.  Oracle designates this
4324# particular file as subject to the "Classpath" exception as provided
4325# by Oracle in the LICENSE file that accompanied this code.
4326#
4327# This code is distributed in the hope that it will be useful, but WITHOUT
4328# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4329# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4330# version 2 for more details (a copy is included in the LICENSE file that
4331# accompanied this code).
4332#
4333# You should have received a copy of the GNU General Public License version
4334# 2 along with this work; if not, write to the Free Software Foundation,
4335# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4336#
4337# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4338# or visit www.oracle.com if you need additional information or have any
4339# questions.
4340#
4341
4342###############################################################################
4343# Check which variant of the JDK that we want to build.
4344# Currently we have:
4345#    normal:   standard edition
4346# but the custom make system may add other variants
4347#
4348# Effectively the JDK variant gives a name to a specific set of
4349# modules to compile into the JDK.
4350
4351
4352###############################################################################
4353# Set the debug level
4354#    release: no debug information, all optimizations, no asserts.
4355#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4356#    fastdebug: debug information (-g), all optimizations, all asserts
4357#    slowdebug: debug information (-g), no optimizations, all asserts
4358
4359
4360###############################################################################
4361#
4362# Should we build only OpenJDK even if closed sources are present?
4363#
4364
4365
4366
4367
4368###############################################################################
4369#
4370# Enable or disable the elliptic curve crypto implementation
4371#
4372
4373
4374
4375
4376################################################################################
4377#
4378# Gcov coverage data for hotspot
4379#
4380
4381
4382################################################################################
4383#
4384# Static build support.  When enabled will generate static
4385# libraries instead of shared libraries for all JDK libs.
4386#
4387
4388
4389################################################################################
4390#
4391# jlink options.
4392# We always keep packaged modules in JDK image.
4393#
4394
4395
4396################################################################################
4397#
4398# Check if building of the jtreg failure handler should be enabled.
4399#
4400
4401
4402################################################################################
4403#
4404# Enable or disable generation of the classlist at build time
4405#
4406
4407
4408#
4409# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4410# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4411#
4412# This code is free software; you can redistribute it and/or modify it
4413# under the terms of the GNU General Public License version 2 only, as
4414# published by the Free Software Foundation.  Oracle designates this
4415# particular file as subject to the "Classpath" exception as provided
4416# by Oracle in the LICENSE file that accompanied this code.
4417#
4418# This code is distributed in the hope that it will be useful, but WITHOUT
4419# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4420# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4421# version 2 for more details (a copy is included in the LICENSE file that
4422# accompanied this code).
4423#
4424# You should have received a copy of the GNU General Public License version
4425# 2 along with this work; if not, write to the Free Software Foundation,
4426# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4427#
4428# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4429# or visit www.oracle.com if you need additional information or have any
4430# questions.
4431#
4432
4433###############################################################################
4434#
4435# Setup version numbers
4436#
4437
4438# Verify that a given string represents a valid version number, and assign it
4439# to a variable.
4440
4441# Argument 1: the variable to assign to
4442# Argument 2: the value given by the user
4443
4444
4445
4446
4447#
4448# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4449# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4450#
4451# This code is free software; you can redistribute it and/or modify it
4452# under the terms of the GNU General Public License version 2 only, as
4453# published by the Free Software Foundation.  Oracle designates this
4454# particular file as subject to the "Classpath" exception as provided
4455# by Oracle in the LICENSE file that accompanied this code.
4456#
4457# This code is distributed in the hope that it will be useful, but WITHOUT
4458# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4459# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4460# version 2 for more details (a copy is included in the LICENSE file that
4461# accompanied this code).
4462#
4463# You should have received a copy of the GNU General Public License version
4464# 2 along with this work; if not, write to the Free Software Foundation,
4465# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4466#
4467# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4468# or visit www.oracle.com if you need additional information or have any
4469# questions.
4470#
4471
4472# Major library component reside in separate files.
4473#
4474# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4475# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4476#
4477# This code is free software; you can redistribute it and/or modify it
4478# under the terms of the GNU General Public License version 2 only, as
4479# published by the Free Software Foundation.  Oracle designates this
4480# particular file as subject to the "Classpath" exception as provided
4481# by Oracle in the LICENSE file that accompanied this code.
4482#
4483# This code is distributed in the hope that it will be useful, but WITHOUT
4484# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4485# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4486# version 2 for more details (a copy is included in the LICENSE file that
4487# accompanied this code).
4488#
4489# You should have received a copy of the GNU General Public License version
4490# 2 along with this work; if not, write to the Free Software Foundation,
4491# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4492#
4493# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4494# or visit www.oracle.com if you need additional information or have any
4495# questions.
4496#
4497
4498################################################################################
4499# Setup alsa (Advanced Linux Sound Architecture)
4500################################################################################
4501
4502
4503#
4504# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4505# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4506#
4507# This code is free software; you can redistribute it and/or modify it
4508# under the terms of the GNU General Public License version 2 only, as
4509# published by the Free Software Foundation.  Oracle designates this
4510# particular file as subject to the "Classpath" exception as provided
4511# by Oracle in the LICENSE file that accompanied this code.
4512#
4513# This code is distributed in the hope that it will be useful, but WITHOUT
4514# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4515# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4516# version 2 for more details (a copy is included in the LICENSE file that
4517# accompanied this code).
4518#
4519# You should have received a copy of the GNU General Public License version
4520# 2 along with this work; if not, write to the Free Software Foundation,
4521# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4522#
4523# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4524# or visit www.oracle.com if you need additional information or have any
4525# questions.
4526#
4527
4528################################################################################
4529# Setup bundled libraries.
4530#
4531# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4532# OpenJDK repository. Default is to use these libraries as bundled, but they
4533# might be replaced by en external version by the user.
4534################################################################################
4535
4536
4537################################################################################
4538# Setup libjpeg
4539################################################################################
4540
4541
4542################################################################################
4543# Setup giflib
4544################################################################################
4545
4546
4547################################################################################
4548# Setup libpng
4549################################################################################
4550
4551
4552################################################################################
4553# Setup zlib
4554################################################################################
4555
4556
4557################################################################################
4558# Setup lcms (Little CMS)
4559################################################################################
4560
4561
4562#
4563# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4564# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4565#
4566# This code is free software; you can redistribute it and/or modify it
4567# under the terms of the GNU General Public License version 2 only, as
4568# published by the Free Software Foundation.  Oracle designates this
4569# particular file as subject to the "Classpath" exception as provided
4570# by Oracle in the LICENSE file that accompanied this code.
4571#
4572# This code is distributed in the hope that it will be useful, but WITHOUT
4573# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4574# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4575# version 2 for more details (a copy is included in the LICENSE file that
4576# accompanied this code).
4577#
4578# You should have received a copy of the GNU General Public License version
4579# 2 along with this work; if not, write to the Free Software Foundation,
4580# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4581#
4582# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4583# or visit www.oracle.com if you need additional information or have any
4584# questions.
4585#
4586
4587################################################################################
4588# Setup cups (Common Unix Printing System)
4589################################################################################
4590
4591
4592#
4593# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4594# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4595#
4596# This code is free software; you can redistribute it and/or modify it
4597# under the terms of the GNU General Public License version 2 only, as
4598# published by the Free Software Foundation.  Oracle designates this
4599# particular file as subject to the "Classpath" exception as provided
4600# by Oracle in the LICENSE file that accompanied this code.
4601#
4602# This code is distributed in the hope that it will be useful, but WITHOUT
4603# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4604# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4605# version 2 for more details (a copy is included in the LICENSE file that
4606# accompanied this code).
4607#
4608# You should have received a copy of the GNU General Public License version
4609# 2 along with this work; if not, write to the Free Software Foundation,
4610# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4611#
4612# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4613# or visit www.oracle.com if you need additional information or have any
4614# questions.
4615#
4616
4617################################################################################
4618# Setup libffi (Foreign Function Interface)
4619################################################################################
4620
4621
4622#
4623# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4624# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4625#
4626# This code is free software; you can redistribute it and/or modify it
4627# under the terms of the GNU General Public License version 2 only, as
4628# published by the Free Software Foundation.  Oracle designates this
4629# particular file as subject to the "Classpath" exception as provided
4630# by Oracle in the LICENSE file that accompanied this code.
4631#
4632# This code is distributed in the hope that it will be useful, but WITHOUT
4633# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4634# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4635# version 2 for more details (a copy is included in the LICENSE file that
4636# accompanied this code).
4637#
4638# You should have received a copy of the GNU General Public License version
4639# 2 along with this work; if not, write to the Free Software Foundation,
4640# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4641#
4642# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4643# or visit www.oracle.com if you need additional information or have any
4644# questions.
4645#
4646
4647################################################################################
4648# Build the freetype lib from source
4649################################################################################
4650
4651
4652################################################################################
4653# Check if a potential freeype library match is correct and usable
4654################################################################################
4655
4656
4657################################################################################
4658# Setup freetype (The FreeType2 font rendering library)
4659################################################################################
4660
4661
4662#
4663# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4664# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4665#
4666# This code is free software; you can redistribute it and/or modify it
4667# under the terms of the GNU General Public License version 2 only, as
4668# published by the Free Software Foundation.  Oracle designates this
4669# particular file as subject to the "Classpath" exception as provided
4670# by Oracle in the LICENSE file that accompanied this code.
4671#
4672# This code is distributed in the hope that it will be useful, but WITHOUT
4673# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4674# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4675# version 2 for more details (a copy is included in the LICENSE file that
4676# accompanied this code).
4677#
4678# You should have received a copy of the GNU General Public License version
4679# 2 along with this work; if not, write to the Free Software Foundation,
4680# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4681#
4682# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4683# or visit www.oracle.com if you need additional information or have any
4684# questions.
4685#
4686
4687################################################################################
4688# Setup the standard C/C++ runtime libraries.
4689#
4690# Most importantly, determine if stdc++ should be linked statically or
4691# dynamically.
4692################################################################################
4693
4694
4695#
4696# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4697# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4698#
4699# This code is free software; you can redistribute it and/or modify it
4700# under the terms of the GNU General Public License version 2 only, as
4701# published by the Free Software Foundation.  Oracle designates this
4702# particular file as subject to the "Classpath" exception as provided
4703# by Oracle in the LICENSE file that accompanied this code.
4704#
4705# This code is distributed in the hope that it will be useful, but WITHOUT
4706# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4707# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4708# version 2 for more details (a copy is included in the LICENSE file that
4709# accompanied this code).
4710#
4711# You should have received a copy of the GNU General Public License version
4712# 2 along with this work; if not, write to the Free Software Foundation,
4713# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4714#
4715# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4716# or visit www.oracle.com if you need additional information or have any
4717# questions.
4718#
4719
4720################################################################################
4721# Setup X11 Windows system
4722################################################################################
4723
4724
4725
4726################################################################################
4727# Determine which libraries are needed for this configuration
4728################################################################################
4729
4730
4731################################################################################
4732# Parse library options, and setup needed libraries
4733################################################################################
4734
4735
4736################################################################################
4737# Setup llvm (Low-Level VM)
4738################################################################################
4739
4740
4741################################################################################
4742# Setup various libraries, typically small system libraries
4743################################################################################
4744
4745
4746################################################################################
4747# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4748# redistribute it in the test image.
4749################################################################################
4750
4751
4752
4753#
4754# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4755# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4756#
4757# This code is free software; you can redistribute it and/or modify it
4758# under the terms of the GNU General Public License version 2 only, as
4759# published by the Free Software Foundation.  Oracle designates this
4760# particular file as subject to the "Classpath" exception as provided
4761# by Oracle in the LICENSE file that accompanied this code.
4762#
4763# This code is distributed in the hope that it will be useful, but WITHOUT
4764# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4765# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4766# version 2 for more details (a copy is included in the LICENSE file that
4767# accompanied this code).
4768#
4769# You should have received a copy of the GNU General Public License version
4770# 2 along with this work; if not, write to the Free Software Foundation,
4771# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4772#
4773# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4774# or visit www.oracle.com if you need additional information or have any
4775# questions.
4776#
4777
4778# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4779# Converts autoconf style CPU name to OpenJDK style, into
4780# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4781
4782
4783# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4784# Converts autoconf style OS name to OpenJDK style, into
4785# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4786
4787
4788# Expects $host_os $host_cpu $build_os and $build_cpu
4789# and $with_target_bits to have been setup!
4790#
4791# Translate the standard triplet(quadruplet) definition
4792# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4793# OPENJDK_BUILD_OS, etc.
4794
4795
4796# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4797# accordingly. Must be done after setting up build and target system, but before
4798# doing anything else with these values.
4799
4800
4801# Setup the legacy variables, for controlling the old makefiles.
4802#
4803
4804
4805# $1 - Either TARGET or BUILD to setup the variables for.
4806
4807
4808
4809
4810#%%% Build and target systems %%%
4811
4812
4813
4814
4815# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4816# Add -mX to various FLAGS variables.
4817
4818
4819
4820
4821
4822
4823#
4824# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4825# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4826#
4827# This code is free software; you can redistribute it and/or modify it
4828# under the terms of the GNU General Public License version 2 only, as
4829# published by the Free Software Foundation.  Oracle designates this
4830# particular file as subject to the "Classpath" exception as provided
4831# by Oracle in the LICENSE file that accompanied this code.
4832#
4833# This code is distributed in the hope that it will be useful, but WITHOUT
4834# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4835# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4836# version 2 for more details (a copy is included in the LICENSE file that
4837# accompanied this code).
4838#
4839# You should have received a copy of the GNU General Public License version
4840# 2 along with this work; if not, write to the Free Software Foundation,
4841# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4842#
4843# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4844# or visit www.oracle.com if you need additional information or have any
4845# questions.
4846#
4847
4848
4849
4850
4851
4852
4853
4854################################################################################
4855# Define a mechanism for importing extra prebuilt modules
4856#
4857
4858
4859
4860#
4861# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4862# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4863#
4864# This code is free software; you can redistribute it and/or modify it
4865# under the terms of the GNU General Public License version 2 only, as
4866# published by the Free Software Foundation.  Oracle designates this
4867# particular file as subject to the "Classpath" exception as provided
4868# by Oracle in the LICENSE file that accompanied this code.
4869#
4870# This code is distributed in the hope that it will be useful, but WITHOUT
4871# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4872# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4873# version 2 for more details (a copy is included in the LICENSE file that
4874# accompanied this code).
4875#
4876# You should have received a copy of the GNU General Public License version
4877# 2 along with this work; if not, write to the Free Software Foundation,
4878# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4879#
4880# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4881# or visit www.oracle.com if you need additional information or have any
4882# questions.
4883#
4884
4885########################################################################
4886# This file is responsible for detecting, verifying and setting up the
4887# toolchain, i.e. the compiler, linker and related utilities. It will setup
4888# proper paths to the binaries, but it will not setup any flags.
4889#
4890# The binaries used is determined by the toolchain type, which is the family of
4891# compilers and related tools that are used.
4892########################################################################
4893
4894
4895# All valid toolchains, regardless of platform (used by help.m4)
4896VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4897
4898# These toolchains are valid on different platforms
4899VALID_TOOLCHAINS_linux="gcc clang"
4900VALID_TOOLCHAINS_solaris="solstudio"
4901VALID_TOOLCHAINS_macosx="gcc clang"
4902VALID_TOOLCHAINS_aix="xlc"
4903VALID_TOOLCHAINS_windows="microsoft"
4904
4905# Toolchain descriptions
4906TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4907TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4908TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4909TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4910TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4911
4912# Minimum supported versions, empty means unspecified
4913TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4914TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4915TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4916TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4917TOOLCHAIN_MINIMUM_VERSION_xlc=""
4918
4919# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4920# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4921# $1 - optional variable prefix for compiler and version variables (BUILD_)
4922# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4923
4924
4925# Check if the configured compiler (C and C++) is of a specific version or
4926# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4927#
4928# Arguments:
4929#   VERSION:   The version string to check against the found version
4930#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4931#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4932#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4933
4934
4935
4936
4937# Setup a number of variables describing how native output files are
4938# named on this platform/toolchain.
4939
4940
4941# Determine which toolchain type to use, and make sure it is valid for this
4942# platform. Setup various information about the selected toolchain.
4943
4944
4945# Before we start detecting the toolchain executables, we might need some
4946# special setup, e.g. additional paths etc.
4947
4948
4949# Restore path, etc
4950
4951
4952# Check if a compiler is of the toolchain type we expect, and save the version
4953# information from it. If the compiler does not match the expected type,
4954# this function will abort using AC_MSG_ERROR. If it matches, the version will
4955# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4956# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4957#
4958# $1 = compiler to test (CC or CXX)
4959# $2 = human readable name of compiler (C or C++)
4960
4961
4962# Try to locate the given C or C++ compiler in the path, or otherwise.
4963#
4964# $1 = compiler to test (CC or CXX)
4965# $2 = human readable name of compiler (C or C++)
4966# $3 = list of compiler names to search for
4967
4968
4969# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4970# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4971# archiver (AR). Verify that the compilers are correct according to the
4972# toolchain type.
4973
4974
4975# Setup additional tools that is considered a part of the toolchain, but not the
4976# core part. Many of these are highly platform-specific and do not exist,
4977# and/or are not needed on all platforms.
4978
4979
4980# Setup the build tools (i.e, the compiler and linker used to build programs
4981# that should be run on the build platform, not the target platform, as a build
4982# helper). Since the non-cross-compile case uses the normal, target compilers
4983# for this, we can only do this after these have been setup.
4984
4985
4986# Setup legacy variables that are still needed as alternative ways to refer to
4987# parts of the toolchain.
4988
4989
4990# Do some additional checks on the detected tools.
4991
4992
4993# Setup the JTReg Regression Test Harness.
4994
4995
4996#
4997# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4998# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4999#
5000# This code is free software; you can redistribute it and/or modify it
5001# under the terms of the GNU General Public License version 2 only, as
5002# published by the Free Software Foundation.  Oracle designates this
5003# particular file as subject to the "Classpath" exception as provided
5004# by Oracle in the LICENSE file that accompanied this code.
5005#
5006# This code is distributed in the hope that it will be useful, but WITHOUT
5007# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5008# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5009# version 2 for more details (a copy is included in the LICENSE file that
5010# accompanied this code).
5011#
5012# You should have received a copy of the GNU General Public License version
5013# 2 along with this work; if not, write to the Free Software Foundation,
5014# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5015#
5016# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5017# or visit www.oracle.com if you need additional information or have any
5018# questions.
5019#
5020
5021################################################################################
5022# The order of these defines the priority by which we try to find them.
5023VALID_VS_VERSIONS="2013 2012 2010"
5024
5025VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5026VS_VERSION_INTERNAL_2010=100
5027VS_MSVCR_2010=msvcr100.dll
5028# We don't use msvcp on Visual Studio 2010
5029#VS_MSVCP_2010=msvcp100.dll
5030VS_ENVVAR_2010="VS100COMNTOOLS"
5031VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5032VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5033VS_VS_PLATFORM_NAME_2010="v100"
5034VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5035
5036VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5037VS_VERSION_INTERNAL_2012=110
5038VS_MSVCR_2012=msvcr110.dll
5039VS_MSVCP_2012=msvcp110.dll
5040VS_ENVVAR_2012="VS110COMNTOOLS"
5041VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5042VS_SDK_INSTALLDIR_2012=
5043VS_VS_PLATFORM_NAME_2012="v110"
5044VS_SDK_PLATFORM_NAME_2012=
5045
5046VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5047VS_VERSION_INTERNAL_2013=120
5048VS_MSVCR_2013=msvcr120.dll
5049VS_MSVCP_2013=msvcp120.dll
5050VS_ENVVAR_2013="VS120COMNTOOLS"
5051VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5052VS_SDK_INSTALLDIR_2013=
5053VS_VS_PLATFORM_NAME_2013="v120"
5054VS_SDK_PLATFORM_NAME_2013=
5055
5056################################################################################
5057
5058
5059
5060################################################################################
5061
5062
5063
5064################################################################################
5065# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5066# build environment and assigns it to VS_ENV_CMD
5067
5068
5069################################################################################
5070
5071
5072
5073################################################################################
5074# Check if the VS env variables were setup prior to running configure.
5075# If not, then find vcvarsall.bat and run it automatically, and integrate
5076# the set env variables into the spec file.
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091# This line needs to be here, verbatim, after all includes and the dummy hook
5092# definitions. It is replaced with custom functionality when building
5093# custom sources.
5094#CUSTOM_AUTOCONF_INCLUDE
5095
5096# Do not change or remove the following line, it is needed for consistency checks:
5097DATE_WHEN_GENERATED=1468235634
5098
5099###############################################################################
5100#
5101# Initialization / Boot-strapping
5102#
5103# The bootstrapping process needs to solve the "chicken or the egg" problem,
5104# thus it jumps back and forth, each time gaining something needed later on.
5105#
5106###############################################################################
5107
5108# If we are requested to print additional help, do that and then exit.
5109# This must be the very first call.
5110
5111  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5112
5113    # Print available toolchains
5114    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5115    $PRINTF "Which are valid to use depends on the build platform.\n"
5116    for toolchain in $VALID_TOOLCHAINS_all; do
5117      # Use indirect variable referencing
5118      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5119      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5120      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5121    done
5122    $PRINTF "\n"
5123
5124    # Print available jvm features
5125    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5126    $PRINTF "Which are valid to use depends on the target platform.\n  "
5127    $PRINTF "%s " $VALID_JVM_FEATURES
5128    $PRINTF "\n"
5129
5130    # And now exit directly
5131    exit 0
5132  fi
5133
5134
5135# Basic initialization that must happen first of all in the normal process.
5136
5137  # Save the original command line. This is passed to us by the wrapper configure script.
5138
5139  # Save the path variable before it gets changed
5140  ORIGINAL_PATH="$PATH"
5141
5142  DATE_WHEN_CONFIGURED=`LANG=C date`
5143
5144  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5145$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5146  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5147$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5148
5149
5150  # Start with tools that do not need have cross compilation support
5151  # and can be expected to be found in the default PATH. These tools are
5152  # used by configure.
5153
5154  # First are all the simple required tools.
5155
5156
5157
5158  # Publish this variable in the help.
5159
5160
5161  if [ -z "${BASENAME+x}" ]; then
5162    # The variable is not set by user, try to locate tool using the code snippet
5163    for ac_prog in basename
5164do
5165  # Extract the first word of "$ac_prog", so it can be a program name with args.
5166set dummy $ac_prog; ac_word=$2
5167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5168$as_echo_n "checking for $ac_word... " >&6; }
5169if ${ac_cv_path_BASENAME+:} false; then :
5170  $as_echo_n "(cached) " >&6
5171else
5172  case $BASENAME in
5173  [\\/]* | ?:[\\/]*)
5174  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5175  ;;
5176  *)
5177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5178for as_dir in $PATH
5179do
5180  IFS=$as_save_IFS
5181  test -z "$as_dir" && as_dir=.
5182    for ac_exec_ext in '' $ac_executable_extensions; do
5183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5184    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5186    break 2
5187  fi
5188done
5189  done
5190IFS=$as_save_IFS
5191
5192  ;;
5193esac
5194fi
5195BASENAME=$ac_cv_path_BASENAME
5196if test -n "$BASENAME"; then
5197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5198$as_echo "$BASENAME" >&6; }
5199else
5200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5201$as_echo "no" >&6; }
5202fi
5203
5204
5205  test -n "$BASENAME" && break
5206done
5207
5208  else
5209    # The variable is set, but is it from the command line or the environment?
5210
5211    # Try to remove the string !BASENAME! from our list.
5212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5214      # If it failed, the variable was not from the command line. Ignore it,
5215      # but warn the user (except for BASH, which is always set by the calling BASH).
5216      if test "xBASENAME" != xBASH; then
5217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5218$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5219      fi
5220      # Try to locate tool using the code snippet
5221      for ac_prog in basename
5222do
5223  # Extract the first word of "$ac_prog", so it can be a program name with args.
5224set dummy $ac_prog; ac_word=$2
5225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5226$as_echo_n "checking for $ac_word... " >&6; }
5227if ${ac_cv_path_BASENAME+:} false; then :
5228  $as_echo_n "(cached) " >&6
5229else
5230  case $BASENAME in
5231  [\\/]* | ?:[\\/]*)
5232  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5233  ;;
5234  *)
5235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5236for as_dir in $PATH
5237do
5238  IFS=$as_save_IFS
5239  test -z "$as_dir" && as_dir=.
5240    for ac_exec_ext in '' $ac_executable_extensions; do
5241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5242    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5244    break 2
5245  fi
5246done
5247  done
5248IFS=$as_save_IFS
5249
5250  ;;
5251esac
5252fi
5253BASENAME=$ac_cv_path_BASENAME
5254if test -n "$BASENAME"; then
5255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5256$as_echo "$BASENAME" >&6; }
5257else
5258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5259$as_echo "no" >&6; }
5260fi
5261
5262
5263  test -n "$BASENAME" && break
5264done
5265
5266    else
5267      # If it succeeded, then it was overridden by the user. We will use it
5268      # for the tool.
5269
5270      # First remove it from the list of overridden variables, so we can test
5271      # for unknown variables in the end.
5272      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5273
5274      # Check if we try to supply an empty value
5275      if test "x$BASENAME" = x; then
5276        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5277$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5278        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5279$as_echo_n "checking for BASENAME... " >&6; }
5280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5281$as_echo "disabled" >&6; }
5282      else
5283        # Check if the provided tool contains a complete path.
5284        tool_specified="$BASENAME"
5285        tool_basename="${tool_specified##*/}"
5286        if test "x$tool_basename" = "x$tool_specified"; then
5287          # A command without a complete path is provided, search $PATH.
5288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5289$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5290          # Extract the first word of "$tool_basename", so it can be a program name with args.
5291set dummy $tool_basename; ac_word=$2
5292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5293$as_echo_n "checking for $ac_word... " >&6; }
5294if ${ac_cv_path_BASENAME+:} false; then :
5295  $as_echo_n "(cached) " >&6
5296else
5297  case $BASENAME in
5298  [\\/]* | ?:[\\/]*)
5299  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5300  ;;
5301  *)
5302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5303for as_dir in $PATH
5304do
5305  IFS=$as_save_IFS
5306  test -z "$as_dir" && as_dir=.
5307    for ac_exec_ext in '' $ac_executable_extensions; do
5308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5309    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5311    break 2
5312  fi
5313done
5314  done
5315IFS=$as_save_IFS
5316
5317  ;;
5318esac
5319fi
5320BASENAME=$ac_cv_path_BASENAME
5321if test -n "$BASENAME"; then
5322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5323$as_echo "$BASENAME" >&6; }
5324else
5325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326$as_echo "no" >&6; }
5327fi
5328
5329
5330          if test "x$BASENAME" = x; then
5331            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5332          fi
5333        else
5334          # Otherwise we believe it is a complete path. Use it as it is.
5335          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5336$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5337          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5338$as_echo_n "checking for BASENAME... " >&6; }
5339          if test ! -x "$tool_specified"; then
5340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5341$as_echo "not found" >&6; }
5342            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5343          fi
5344          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5345$as_echo "$tool_specified" >&6; }
5346        fi
5347      fi
5348    fi
5349
5350  fi
5351
5352
5353
5354  if test "x$BASENAME" = x; then
5355    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5356  fi
5357
5358
5359
5360
5361
5362  # Publish this variable in the help.
5363
5364
5365  if [ -z "${BASH+x}" ]; then
5366    # The variable is not set by user, try to locate tool using the code snippet
5367    for ac_prog in bash
5368do
5369  # Extract the first word of "$ac_prog", so it can be a program name with args.
5370set dummy $ac_prog; ac_word=$2
5371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5372$as_echo_n "checking for $ac_word... " >&6; }
5373if ${ac_cv_path_BASH+:} false; then :
5374  $as_echo_n "(cached) " >&6
5375else
5376  case $BASH in
5377  [\\/]* | ?:[\\/]*)
5378  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5379  ;;
5380  *)
5381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5382for as_dir in $PATH
5383do
5384  IFS=$as_save_IFS
5385  test -z "$as_dir" && as_dir=.
5386    for ac_exec_ext in '' $ac_executable_extensions; do
5387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5388    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5390    break 2
5391  fi
5392done
5393  done
5394IFS=$as_save_IFS
5395
5396  ;;
5397esac
5398fi
5399BASH=$ac_cv_path_BASH
5400if test -n "$BASH"; then
5401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5402$as_echo "$BASH" >&6; }
5403else
5404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5405$as_echo "no" >&6; }
5406fi
5407
5408
5409  test -n "$BASH" && break
5410done
5411
5412  else
5413    # The variable is set, but is it from the command line or the environment?
5414
5415    # Try to remove the string !BASH! from our list.
5416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5418      # If it failed, the variable was not from the command line. Ignore it,
5419      # but warn the user (except for BASH, which is always set by the calling BASH).
5420      if test "xBASH" != xBASH; then
5421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5422$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5423      fi
5424      # Try to locate tool using the code snippet
5425      for ac_prog in bash
5426do
5427  # Extract the first word of "$ac_prog", so it can be a program name with args.
5428set dummy $ac_prog; ac_word=$2
5429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5430$as_echo_n "checking for $ac_word... " >&6; }
5431if ${ac_cv_path_BASH+:} false; then :
5432  $as_echo_n "(cached) " >&6
5433else
5434  case $BASH in
5435  [\\/]* | ?:[\\/]*)
5436  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5437  ;;
5438  *)
5439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5440for as_dir in $PATH
5441do
5442  IFS=$as_save_IFS
5443  test -z "$as_dir" && as_dir=.
5444    for ac_exec_ext in '' $ac_executable_extensions; do
5445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5446    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5448    break 2
5449  fi
5450done
5451  done
5452IFS=$as_save_IFS
5453
5454  ;;
5455esac
5456fi
5457BASH=$ac_cv_path_BASH
5458if test -n "$BASH"; then
5459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5460$as_echo "$BASH" >&6; }
5461else
5462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5463$as_echo "no" >&6; }
5464fi
5465
5466
5467  test -n "$BASH" && break
5468done
5469
5470    else
5471      # If it succeeded, then it was overridden by the user. We will use it
5472      # for the tool.
5473
5474      # First remove it from the list of overridden variables, so we can test
5475      # for unknown variables in the end.
5476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5477
5478      # Check if we try to supply an empty value
5479      if test "x$BASH" = x; then
5480        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5481$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5483$as_echo_n "checking for BASH... " >&6; }
5484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5485$as_echo "disabled" >&6; }
5486      else
5487        # Check if the provided tool contains a complete path.
5488        tool_specified="$BASH"
5489        tool_basename="${tool_specified##*/}"
5490        if test "x$tool_basename" = "x$tool_specified"; then
5491          # A command without a complete path is provided, search $PATH.
5492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5493$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5494          # Extract the first word of "$tool_basename", so it can be a program name with args.
5495set dummy $tool_basename; ac_word=$2
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497$as_echo_n "checking for $ac_word... " >&6; }
5498if ${ac_cv_path_BASH+:} false; then :
5499  $as_echo_n "(cached) " >&6
5500else
5501  case $BASH in
5502  [\\/]* | ?:[\\/]*)
5503  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5504  ;;
5505  *)
5506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5507for as_dir in $PATH
5508do
5509  IFS=$as_save_IFS
5510  test -z "$as_dir" && as_dir=.
5511    for ac_exec_ext in '' $ac_executable_extensions; do
5512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5513    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5515    break 2
5516  fi
5517done
5518  done
5519IFS=$as_save_IFS
5520
5521  ;;
5522esac
5523fi
5524BASH=$ac_cv_path_BASH
5525if test -n "$BASH"; then
5526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5527$as_echo "$BASH" >&6; }
5528else
5529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530$as_echo "no" >&6; }
5531fi
5532
5533
5534          if test "x$BASH" = x; then
5535            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5536          fi
5537        else
5538          # Otherwise we believe it is a complete path. Use it as it is.
5539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5540$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5541          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5542$as_echo_n "checking for BASH... " >&6; }
5543          if test ! -x "$tool_specified"; then
5544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5545$as_echo "not found" >&6; }
5546            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5547          fi
5548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5549$as_echo "$tool_specified" >&6; }
5550        fi
5551      fi
5552    fi
5553
5554  fi
5555
5556
5557
5558  if test "x$BASH" = x; then
5559    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5560  fi
5561
5562
5563
5564
5565
5566  # Publish this variable in the help.
5567
5568
5569  if [ -z "${CAT+x}" ]; then
5570    # The variable is not set by user, try to locate tool using the code snippet
5571    for ac_prog in cat
5572do
5573  # Extract the first word of "$ac_prog", so it can be a program name with args.
5574set dummy $ac_prog; ac_word=$2
5575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5576$as_echo_n "checking for $ac_word... " >&6; }
5577if ${ac_cv_path_CAT+:} false; then :
5578  $as_echo_n "(cached) " >&6
5579else
5580  case $CAT in
5581  [\\/]* | ?:[\\/]*)
5582  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5583  ;;
5584  *)
5585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5586for as_dir in $PATH
5587do
5588  IFS=$as_save_IFS
5589  test -z "$as_dir" && as_dir=.
5590    for ac_exec_ext in '' $ac_executable_extensions; do
5591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5592    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5594    break 2
5595  fi
5596done
5597  done
5598IFS=$as_save_IFS
5599
5600  ;;
5601esac
5602fi
5603CAT=$ac_cv_path_CAT
5604if test -n "$CAT"; then
5605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5606$as_echo "$CAT" >&6; }
5607else
5608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5609$as_echo "no" >&6; }
5610fi
5611
5612
5613  test -n "$CAT" && break
5614done
5615
5616  else
5617    # The variable is set, but is it from the command line or the environment?
5618
5619    # Try to remove the string !CAT! from our list.
5620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5622      # If it failed, the variable was not from the command line. Ignore it,
5623      # but warn the user (except for BASH, which is always set by the calling BASH).
5624      if test "xCAT" != xBASH; then
5625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5626$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5627      fi
5628      # Try to locate tool using the code snippet
5629      for ac_prog in cat
5630do
5631  # Extract the first word of "$ac_prog", so it can be a program name with args.
5632set dummy $ac_prog; ac_word=$2
5633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5634$as_echo_n "checking for $ac_word... " >&6; }
5635if ${ac_cv_path_CAT+:} false; then :
5636  $as_echo_n "(cached) " >&6
5637else
5638  case $CAT in
5639  [\\/]* | ?:[\\/]*)
5640  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5641  ;;
5642  *)
5643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5644for as_dir in $PATH
5645do
5646  IFS=$as_save_IFS
5647  test -z "$as_dir" && as_dir=.
5648    for ac_exec_ext in '' $ac_executable_extensions; do
5649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5650    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5652    break 2
5653  fi
5654done
5655  done
5656IFS=$as_save_IFS
5657
5658  ;;
5659esac
5660fi
5661CAT=$ac_cv_path_CAT
5662if test -n "$CAT"; then
5663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5664$as_echo "$CAT" >&6; }
5665else
5666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5667$as_echo "no" >&6; }
5668fi
5669
5670
5671  test -n "$CAT" && break
5672done
5673
5674    else
5675      # If it succeeded, then it was overridden by the user. We will use it
5676      # for the tool.
5677
5678      # First remove it from the list of overridden variables, so we can test
5679      # for unknown variables in the end.
5680      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5681
5682      # Check if we try to supply an empty value
5683      if test "x$CAT" = x; then
5684        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5685$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5686        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5687$as_echo_n "checking for CAT... " >&6; }
5688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5689$as_echo "disabled" >&6; }
5690      else
5691        # Check if the provided tool contains a complete path.
5692        tool_specified="$CAT"
5693        tool_basename="${tool_specified##*/}"
5694        if test "x$tool_basename" = "x$tool_specified"; then
5695          # A command without a complete path is provided, search $PATH.
5696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5697$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5698          # Extract the first word of "$tool_basename", so it can be a program name with args.
5699set dummy $tool_basename; ac_word=$2
5700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701$as_echo_n "checking for $ac_word... " >&6; }
5702if ${ac_cv_path_CAT+:} false; then :
5703  $as_echo_n "(cached) " >&6
5704else
5705  case $CAT in
5706  [\\/]* | ?:[\\/]*)
5707  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5708  ;;
5709  *)
5710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711for as_dir in $PATH
5712do
5713  IFS=$as_save_IFS
5714  test -z "$as_dir" && as_dir=.
5715    for ac_exec_ext in '' $ac_executable_extensions; do
5716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5717    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5719    break 2
5720  fi
5721done
5722  done
5723IFS=$as_save_IFS
5724
5725  ;;
5726esac
5727fi
5728CAT=$ac_cv_path_CAT
5729if test -n "$CAT"; then
5730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5731$as_echo "$CAT" >&6; }
5732else
5733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
5735fi
5736
5737
5738          if test "x$CAT" = x; then
5739            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5740          fi
5741        else
5742          # Otherwise we believe it is a complete path. Use it as it is.
5743          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5744$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5745          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5746$as_echo_n "checking for CAT... " >&6; }
5747          if test ! -x "$tool_specified"; then
5748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5749$as_echo "not found" >&6; }
5750            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5751          fi
5752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5753$as_echo "$tool_specified" >&6; }
5754        fi
5755      fi
5756    fi
5757
5758  fi
5759
5760
5761
5762  if test "x$CAT" = x; then
5763    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5764  fi
5765
5766
5767
5768
5769
5770  # Publish this variable in the help.
5771
5772
5773  if [ -z "${CHMOD+x}" ]; then
5774    # The variable is not set by user, try to locate tool using the code snippet
5775    for ac_prog in chmod
5776do
5777  # Extract the first word of "$ac_prog", so it can be a program name with args.
5778set dummy $ac_prog; ac_word=$2
5779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5780$as_echo_n "checking for $ac_word... " >&6; }
5781if ${ac_cv_path_CHMOD+:} false; then :
5782  $as_echo_n "(cached) " >&6
5783else
5784  case $CHMOD in
5785  [\\/]* | ?:[\\/]*)
5786  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5787  ;;
5788  *)
5789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5790for as_dir in $PATH
5791do
5792  IFS=$as_save_IFS
5793  test -z "$as_dir" && as_dir=.
5794    for ac_exec_ext in '' $ac_executable_extensions; do
5795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5796    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5798    break 2
5799  fi
5800done
5801  done
5802IFS=$as_save_IFS
5803
5804  ;;
5805esac
5806fi
5807CHMOD=$ac_cv_path_CHMOD
5808if test -n "$CHMOD"; then
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5810$as_echo "$CHMOD" >&6; }
5811else
5812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5813$as_echo "no" >&6; }
5814fi
5815
5816
5817  test -n "$CHMOD" && break
5818done
5819
5820  else
5821    # The variable is set, but is it from the command line or the environment?
5822
5823    # Try to remove the string !CHMOD! from our list.
5824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5826      # If it failed, the variable was not from the command line. Ignore it,
5827      # but warn the user (except for BASH, which is always set by the calling BASH).
5828      if test "xCHMOD" != xBASH; then
5829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5830$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5831      fi
5832      # Try to locate tool using the code snippet
5833      for ac_prog in chmod
5834do
5835  # Extract the first word of "$ac_prog", so it can be a program name with args.
5836set dummy $ac_prog; ac_word=$2
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5838$as_echo_n "checking for $ac_word... " >&6; }
5839if ${ac_cv_path_CHMOD+:} false; then :
5840  $as_echo_n "(cached) " >&6
5841else
5842  case $CHMOD in
5843  [\\/]* | ?:[\\/]*)
5844  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5845  ;;
5846  *)
5847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5848for as_dir in $PATH
5849do
5850  IFS=$as_save_IFS
5851  test -z "$as_dir" && as_dir=.
5852    for ac_exec_ext in '' $ac_executable_extensions; do
5853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5854    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5856    break 2
5857  fi
5858done
5859  done
5860IFS=$as_save_IFS
5861
5862  ;;
5863esac
5864fi
5865CHMOD=$ac_cv_path_CHMOD
5866if test -n "$CHMOD"; then
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5868$as_echo "$CHMOD" >&6; }
5869else
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874
5875  test -n "$CHMOD" && break
5876done
5877
5878    else
5879      # If it succeeded, then it was overridden by the user. We will use it
5880      # for the tool.
5881
5882      # First remove it from the list of overridden variables, so we can test
5883      # for unknown variables in the end.
5884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5885
5886      # Check if we try to supply an empty value
5887      if test "x$CHMOD" = x; then
5888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5889$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5891$as_echo_n "checking for CHMOD... " >&6; }
5892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5893$as_echo "disabled" >&6; }
5894      else
5895        # Check if the provided tool contains a complete path.
5896        tool_specified="$CHMOD"
5897        tool_basename="${tool_specified##*/}"
5898        if test "x$tool_basename" = "x$tool_specified"; then
5899          # A command without a complete path is provided, search $PATH.
5900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5901$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5902          # Extract the first word of "$tool_basename", so it can be a program name with args.
5903set dummy $tool_basename; ac_word=$2
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5905$as_echo_n "checking for $ac_word... " >&6; }
5906if ${ac_cv_path_CHMOD+:} false; then :
5907  $as_echo_n "(cached) " >&6
5908else
5909  case $CHMOD in
5910  [\\/]* | ?:[\\/]*)
5911  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5912  ;;
5913  *)
5914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5915for as_dir in $PATH
5916do
5917  IFS=$as_save_IFS
5918  test -z "$as_dir" && as_dir=.
5919    for ac_exec_ext in '' $ac_executable_extensions; do
5920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5921    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5923    break 2
5924  fi
5925done
5926  done
5927IFS=$as_save_IFS
5928
5929  ;;
5930esac
5931fi
5932CHMOD=$ac_cv_path_CHMOD
5933if test -n "$CHMOD"; then
5934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5935$as_echo "$CHMOD" >&6; }
5936else
5937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5938$as_echo "no" >&6; }
5939fi
5940
5941
5942          if test "x$CHMOD" = x; then
5943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5944          fi
5945        else
5946          # Otherwise we believe it is a complete path. Use it as it is.
5947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5948$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5950$as_echo_n "checking for CHMOD... " >&6; }
5951          if test ! -x "$tool_specified"; then
5952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5953$as_echo "not found" >&6; }
5954            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5955          fi
5956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5957$as_echo "$tool_specified" >&6; }
5958        fi
5959      fi
5960    fi
5961
5962  fi
5963
5964
5965
5966  if test "x$CHMOD" = x; then
5967    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5968  fi
5969
5970
5971
5972
5973
5974  # Publish this variable in the help.
5975
5976
5977  if [ -z "${CMP+x}" ]; then
5978    # The variable is not set by user, try to locate tool using the code snippet
5979    for ac_prog in cmp
5980do
5981  # Extract the first word of "$ac_prog", so it can be a program name with args.
5982set dummy $ac_prog; ac_word=$2
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5984$as_echo_n "checking for $ac_word... " >&6; }
5985if ${ac_cv_path_CMP+:} false; then :
5986  $as_echo_n "(cached) " >&6
5987else
5988  case $CMP in
5989  [\\/]* | ?:[\\/]*)
5990  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5991  ;;
5992  *)
5993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5994for as_dir in $PATH
5995do
5996  IFS=$as_save_IFS
5997  test -z "$as_dir" && as_dir=.
5998    for ac_exec_ext in '' $ac_executable_extensions; do
5999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6000    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6002    break 2
6003  fi
6004done
6005  done
6006IFS=$as_save_IFS
6007
6008  ;;
6009esac
6010fi
6011CMP=$ac_cv_path_CMP
6012if test -n "$CMP"; then
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6014$as_echo "$CMP" >&6; }
6015else
6016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
6018fi
6019
6020
6021  test -n "$CMP" && break
6022done
6023
6024  else
6025    # The variable is set, but is it from the command line or the environment?
6026
6027    # Try to remove the string !CMP! from our list.
6028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6030      # If it failed, the variable was not from the command line. Ignore it,
6031      # but warn the user (except for BASH, which is always set by the calling BASH).
6032      if test "xCMP" != xBASH; then
6033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6034$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6035      fi
6036      # Try to locate tool using the code snippet
6037      for ac_prog in cmp
6038do
6039  # Extract the first word of "$ac_prog", so it can be a program name with args.
6040set dummy $ac_prog; ac_word=$2
6041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6042$as_echo_n "checking for $ac_word... " >&6; }
6043if ${ac_cv_path_CMP+:} false; then :
6044  $as_echo_n "(cached) " >&6
6045else
6046  case $CMP in
6047  [\\/]* | ?:[\\/]*)
6048  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6049  ;;
6050  *)
6051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6052for as_dir in $PATH
6053do
6054  IFS=$as_save_IFS
6055  test -z "$as_dir" && as_dir=.
6056    for ac_exec_ext in '' $ac_executable_extensions; do
6057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6058    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6060    break 2
6061  fi
6062done
6063  done
6064IFS=$as_save_IFS
6065
6066  ;;
6067esac
6068fi
6069CMP=$ac_cv_path_CMP
6070if test -n "$CMP"; then
6071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6072$as_echo "$CMP" >&6; }
6073else
6074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6075$as_echo "no" >&6; }
6076fi
6077
6078
6079  test -n "$CMP" && break
6080done
6081
6082    else
6083      # If it succeeded, then it was overridden by the user. We will use it
6084      # for the tool.
6085
6086      # First remove it from the list of overridden variables, so we can test
6087      # for unknown variables in the end.
6088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6089
6090      # Check if we try to supply an empty value
6091      if test "x$CMP" = x; then
6092        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6093$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6095$as_echo_n "checking for CMP... " >&6; }
6096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6097$as_echo "disabled" >&6; }
6098      else
6099        # Check if the provided tool contains a complete path.
6100        tool_specified="$CMP"
6101        tool_basename="${tool_specified##*/}"
6102        if test "x$tool_basename" = "x$tool_specified"; then
6103          # A command without a complete path is provided, search $PATH.
6104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6105$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6106          # Extract the first word of "$tool_basename", so it can be a program name with args.
6107set dummy $tool_basename; ac_word=$2
6108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6109$as_echo_n "checking for $ac_word... " >&6; }
6110if ${ac_cv_path_CMP+:} false; then :
6111  $as_echo_n "(cached) " >&6
6112else
6113  case $CMP in
6114  [\\/]* | ?:[\\/]*)
6115  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6116  ;;
6117  *)
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_exec_ext in '' $ac_executable_extensions; do
6124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6125    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127    break 2
6128  fi
6129done
6130  done
6131IFS=$as_save_IFS
6132
6133  ;;
6134esac
6135fi
6136CMP=$ac_cv_path_CMP
6137if test -n "$CMP"; then
6138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6139$as_echo "$CMP" >&6; }
6140else
6141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6142$as_echo "no" >&6; }
6143fi
6144
6145
6146          if test "x$CMP" = x; then
6147            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6148          fi
6149        else
6150          # Otherwise we believe it is a complete path. Use it as it is.
6151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6152$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6153          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6154$as_echo_n "checking for CMP... " >&6; }
6155          if test ! -x "$tool_specified"; then
6156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6157$as_echo "not found" >&6; }
6158            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6159          fi
6160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6161$as_echo "$tool_specified" >&6; }
6162        fi
6163      fi
6164    fi
6165
6166  fi
6167
6168
6169
6170  if test "x$CMP" = x; then
6171    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6172  fi
6173
6174
6175
6176
6177
6178  # Publish this variable in the help.
6179
6180
6181  if [ -z "${COMM+x}" ]; then
6182    # The variable is not set by user, try to locate tool using the code snippet
6183    for ac_prog in comm
6184do
6185  # Extract the first word of "$ac_prog", so it can be a program name with args.
6186set dummy $ac_prog; ac_word=$2
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6188$as_echo_n "checking for $ac_word... " >&6; }
6189if ${ac_cv_path_COMM+:} false; then :
6190  $as_echo_n "(cached) " >&6
6191else
6192  case $COMM in
6193  [\\/]* | ?:[\\/]*)
6194  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6195  ;;
6196  *)
6197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH
6199do
6200  IFS=$as_save_IFS
6201  test -z "$as_dir" && as_dir=.
6202    for ac_exec_ext in '' $ac_executable_extensions; do
6203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6204    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206    break 2
6207  fi
6208done
6209  done
6210IFS=$as_save_IFS
6211
6212  ;;
6213esac
6214fi
6215COMM=$ac_cv_path_COMM
6216if test -n "$COMM"; then
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6218$as_echo "$COMM" >&6; }
6219else
6220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221$as_echo "no" >&6; }
6222fi
6223
6224
6225  test -n "$COMM" && break
6226done
6227
6228  else
6229    # The variable is set, but is it from the command line or the environment?
6230
6231    # Try to remove the string !COMM! from our list.
6232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6234      # If it failed, the variable was not from the command line. Ignore it,
6235      # but warn the user (except for BASH, which is always set by the calling BASH).
6236      if test "xCOMM" != xBASH; then
6237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6238$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6239      fi
6240      # Try to locate tool using the code snippet
6241      for ac_prog in comm
6242do
6243  # Extract the first word of "$ac_prog", so it can be a program name with args.
6244set dummy $ac_prog; ac_word=$2
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6246$as_echo_n "checking for $ac_word... " >&6; }
6247if ${ac_cv_path_COMM+:} false; then :
6248  $as_echo_n "(cached) " >&6
6249else
6250  case $COMM in
6251  [\\/]* | ?:[\\/]*)
6252  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6253  ;;
6254  *)
6255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6256for as_dir in $PATH
6257do
6258  IFS=$as_save_IFS
6259  test -z "$as_dir" && as_dir=.
6260    for ac_exec_ext in '' $ac_executable_extensions; do
6261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6262    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6264    break 2
6265  fi
6266done
6267  done
6268IFS=$as_save_IFS
6269
6270  ;;
6271esac
6272fi
6273COMM=$ac_cv_path_COMM
6274if test -n "$COMM"; then
6275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6276$as_echo "$COMM" >&6; }
6277else
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6279$as_echo "no" >&6; }
6280fi
6281
6282
6283  test -n "$COMM" && break
6284done
6285
6286    else
6287      # If it succeeded, then it was overridden by the user. We will use it
6288      # for the tool.
6289
6290      # First remove it from the list of overridden variables, so we can test
6291      # for unknown variables in the end.
6292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6293
6294      # Check if we try to supply an empty value
6295      if test "x$COMM" = x; then
6296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6297$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6299$as_echo_n "checking for COMM... " >&6; }
6300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6301$as_echo "disabled" >&6; }
6302      else
6303        # Check if the provided tool contains a complete path.
6304        tool_specified="$COMM"
6305        tool_basename="${tool_specified##*/}"
6306        if test "x$tool_basename" = "x$tool_specified"; then
6307          # A command without a complete path is provided, search $PATH.
6308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6309$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6310          # Extract the first word of "$tool_basename", so it can be a program name with args.
6311set dummy $tool_basename; ac_word=$2
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6313$as_echo_n "checking for $ac_word... " >&6; }
6314if ${ac_cv_path_COMM+:} false; then :
6315  $as_echo_n "(cached) " >&6
6316else
6317  case $COMM in
6318  [\\/]* | ?:[\\/]*)
6319  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6320  ;;
6321  *)
6322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323for as_dir in $PATH
6324do
6325  IFS=$as_save_IFS
6326  test -z "$as_dir" && as_dir=.
6327    for ac_exec_ext in '' $ac_executable_extensions; do
6328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6329    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6331    break 2
6332  fi
6333done
6334  done
6335IFS=$as_save_IFS
6336
6337  ;;
6338esac
6339fi
6340COMM=$ac_cv_path_COMM
6341if test -n "$COMM"; then
6342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6343$as_echo "$COMM" >&6; }
6344else
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346$as_echo "no" >&6; }
6347fi
6348
6349
6350          if test "x$COMM" = x; then
6351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6352          fi
6353        else
6354          # Otherwise we believe it is a complete path. Use it as it is.
6355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6356$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6358$as_echo_n "checking for COMM... " >&6; }
6359          if test ! -x "$tool_specified"; then
6360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6361$as_echo "not found" >&6; }
6362            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6363          fi
6364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6365$as_echo "$tool_specified" >&6; }
6366        fi
6367      fi
6368    fi
6369
6370  fi
6371
6372
6373
6374  if test "x$COMM" = x; then
6375    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6376  fi
6377
6378
6379
6380
6381
6382  # Publish this variable in the help.
6383
6384
6385  if [ -z "${CP+x}" ]; then
6386    # The variable is not set by user, try to locate tool using the code snippet
6387    for ac_prog in cp
6388do
6389  # Extract the first word of "$ac_prog", so it can be a program name with args.
6390set dummy $ac_prog; ac_word=$2
6391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6392$as_echo_n "checking for $ac_word... " >&6; }
6393if ${ac_cv_path_CP+:} false; then :
6394  $as_echo_n "(cached) " >&6
6395else
6396  case $CP in
6397  [\\/]* | ?:[\\/]*)
6398  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6399  ;;
6400  *)
6401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6402for as_dir in $PATH
6403do
6404  IFS=$as_save_IFS
6405  test -z "$as_dir" && as_dir=.
6406    for ac_exec_ext in '' $ac_executable_extensions; do
6407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6408    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6410    break 2
6411  fi
6412done
6413  done
6414IFS=$as_save_IFS
6415
6416  ;;
6417esac
6418fi
6419CP=$ac_cv_path_CP
6420if test -n "$CP"; then
6421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6422$as_echo "$CP" >&6; }
6423else
6424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6425$as_echo "no" >&6; }
6426fi
6427
6428
6429  test -n "$CP" && break
6430done
6431
6432  else
6433    # The variable is set, but is it from the command line or the environment?
6434
6435    # Try to remove the string !CP! from our list.
6436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6438      # If it failed, the variable was not from the command line. Ignore it,
6439      # but warn the user (except for BASH, which is always set by the calling BASH).
6440      if test "xCP" != xBASH; then
6441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6442$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6443      fi
6444      # Try to locate tool using the code snippet
6445      for ac_prog in cp
6446do
6447  # Extract the first word of "$ac_prog", so it can be a program name with args.
6448set dummy $ac_prog; ac_word=$2
6449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6450$as_echo_n "checking for $ac_word... " >&6; }
6451if ${ac_cv_path_CP+:} false; then :
6452  $as_echo_n "(cached) " >&6
6453else
6454  case $CP in
6455  [\\/]* | ?:[\\/]*)
6456  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6457  ;;
6458  *)
6459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6460for as_dir in $PATH
6461do
6462  IFS=$as_save_IFS
6463  test -z "$as_dir" && as_dir=.
6464    for ac_exec_ext in '' $ac_executable_extensions; do
6465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6466    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6468    break 2
6469  fi
6470done
6471  done
6472IFS=$as_save_IFS
6473
6474  ;;
6475esac
6476fi
6477CP=$ac_cv_path_CP
6478if test -n "$CP"; then
6479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6480$as_echo "$CP" >&6; }
6481else
6482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6483$as_echo "no" >&6; }
6484fi
6485
6486
6487  test -n "$CP" && break
6488done
6489
6490    else
6491      # If it succeeded, then it was overridden by the user. We will use it
6492      # for the tool.
6493
6494      # First remove it from the list of overridden variables, so we can test
6495      # for unknown variables in the end.
6496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6497
6498      # Check if we try to supply an empty value
6499      if test "x$CP" = x; then
6500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6501$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6503$as_echo_n "checking for CP... " >&6; }
6504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6505$as_echo "disabled" >&6; }
6506      else
6507        # Check if the provided tool contains a complete path.
6508        tool_specified="$CP"
6509        tool_basename="${tool_specified##*/}"
6510        if test "x$tool_basename" = "x$tool_specified"; then
6511          # A command without a complete path is provided, search $PATH.
6512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6513$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6514          # Extract the first word of "$tool_basename", so it can be a program name with args.
6515set dummy $tool_basename; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_CP+:} false; then :
6519  $as_echo_n "(cached) " >&6
6520else
6521  case $CP in
6522  [\\/]* | ?:[\\/]*)
6523  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6524  ;;
6525  *)
6526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in $PATH
6528do
6529  IFS=$as_save_IFS
6530  test -z "$as_dir" && as_dir=.
6531    for ac_exec_ext in '' $ac_executable_extensions; do
6532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535    break 2
6536  fi
6537done
6538  done
6539IFS=$as_save_IFS
6540
6541  ;;
6542esac
6543fi
6544CP=$ac_cv_path_CP
6545if test -n "$CP"; then
6546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6547$as_echo "$CP" >&6; }
6548else
6549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
6554          if test "x$CP" = x; then
6555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6556          fi
6557        else
6558          # Otherwise we believe it is a complete path. Use it as it is.
6559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6560$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6562$as_echo_n "checking for CP... " >&6; }
6563          if test ! -x "$tool_specified"; then
6564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6565$as_echo "not found" >&6; }
6566            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6567          fi
6568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6569$as_echo "$tool_specified" >&6; }
6570        fi
6571      fi
6572    fi
6573
6574  fi
6575
6576
6577
6578  if test "x$CP" = x; then
6579    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6580  fi
6581
6582
6583
6584
6585
6586  # Publish this variable in the help.
6587
6588
6589  if [ -z "${CUT+x}" ]; then
6590    # The variable is not set by user, try to locate tool using the code snippet
6591    for ac_prog in cut
6592do
6593  # Extract the first word of "$ac_prog", so it can be a program name with args.
6594set dummy $ac_prog; ac_word=$2
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6596$as_echo_n "checking for $ac_word... " >&6; }
6597if ${ac_cv_path_CUT+:} false; then :
6598  $as_echo_n "(cached) " >&6
6599else
6600  case $CUT in
6601  [\\/]* | ?:[\\/]*)
6602  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6603  ;;
6604  *)
6605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6606for as_dir in $PATH
6607do
6608  IFS=$as_save_IFS
6609  test -z "$as_dir" && as_dir=.
6610    for ac_exec_ext in '' $ac_executable_extensions; do
6611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6612    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6614    break 2
6615  fi
6616done
6617  done
6618IFS=$as_save_IFS
6619
6620  ;;
6621esac
6622fi
6623CUT=$ac_cv_path_CUT
6624if test -n "$CUT"; then
6625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6626$as_echo "$CUT" >&6; }
6627else
6628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6629$as_echo "no" >&6; }
6630fi
6631
6632
6633  test -n "$CUT" && break
6634done
6635
6636  else
6637    # The variable is set, but is it from the command line or the environment?
6638
6639    # Try to remove the string !CUT! from our list.
6640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6642      # If it failed, the variable was not from the command line. Ignore it,
6643      # but warn the user (except for BASH, which is always set by the calling BASH).
6644      if test "xCUT" != xBASH; then
6645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6646$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6647      fi
6648      # Try to locate tool using the code snippet
6649      for ac_prog in cut
6650do
6651  # Extract the first word of "$ac_prog", so it can be a program name with args.
6652set dummy $ac_prog; ac_word=$2
6653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6654$as_echo_n "checking for $ac_word... " >&6; }
6655if ${ac_cv_path_CUT+:} false; then :
6656  $as_echo_n "(cached) " >&6
6657else
6658  case $CUT in
6659  [\\/]* | ?:[\\/]*)
6660  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6661  ;;
6662  *)
6663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6664for as_dir in $PATH
6665do
6666  IFS=$as_save_IFS
6667  test -z "$as_dir" && as_dir=.
6668    for ac_exec_ext in '' $ac_executable_extensions; do
6669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6670    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6672    break 2
6673  fi
6674done
6675  done
6676IFS=$as_save_IFS
6677
6678  ;;
6679esac
6680fi
6681CUT=$ac_cv_path_CUT
6682if test -n "$CUT"; then
6683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6684$as_echo "$CUT" >&6; }
6685else
6686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6687$as_echo "no" >&6; }
6688fi
6689
6690
6691  test -n "$CUT" && break
6692done
6693
6694    else
6695      # If it succeeded, then it was overridden by the user. We will use it
6696      # for the tool.
6697
6698      # First remove it from the list of overridden variables, so we can test
6699      # for unknown variables in the end.
6700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6701
6702      # Check if we try to supply an empty value
6703      if test "x$CUT" = x; then
6704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6705$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6707$as_echo_n "checking for CUT... " >&6; }
6708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6709$as_echo "disabled" >&6; }
6710      else
6711        # Check if the provided tool contains a complete path.
6712        tool_specified="$CUT"
6713        tool_basename="${tool_specified##*/}"
6714        if test "x$tool_basename" = "x$tool_specified"; then
6715          # A command without a complete path is provided, search $PATH.
6716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6717$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6718          # Extract the first word of "$tool_basename", so it can be a program name with args.
6719set dummy $tool_basename; ac_word=$2
6720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6721$as_echo_n "checking for $ac_word... " >&6; }
6722if ${ac_cv_path_CUT+:} false; then :
6723  $as_echo_n "(cached) " >&6
6724else
6725  case $CUT in
6726  [\\/]* | ?:[\\/]*)
6727  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6728  ;;
6729  *)
6730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6731for as_dir in $PATH
6732do
6733  IFS=$as_save_IFS
6734  test -z "$as_dir" && as_dir=.
6735    for ac_exec_ext in '' $ac_executable_extensions; do
6736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6737    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6739    break 2
6740  fi
6741done
6742  done
6743IFS=$as_save_IFS
6744
6745  ;;
6746esac
6747fi
6748CUT=$ac_cv_path_CUT
6749if test -n "$CUT"; then
6750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6751$as_echo "$CUT" >&6; }
6752else
6753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6754$as_echo "no" >&6; }
6755fi
6756
6757
6758          if test "x$CUT" = x; then
6759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6760          fi
6761        else
6762          # Otherwise we believe it is a complete path. Use it as it is.
6763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6764$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6766$as_echo_n "checking for CUT... " >&6; }
6767          if test ! -x "$tool_specified"; then
6768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6769$as_echo "not found" >&6; }
6770            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6771          fi
6772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6773$as_echo "$tool_specified" >&6; }
6774        fi
6775      fi
6776    fi
6777
6778  fi
6779
6780
6781
6782  if test "x$CUT" = x; then
6783    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6784  fi
6785
6786
6787
6788
6789
6790  # Publish this variable in the help.
6791
6792
6793  if [ -z "${DATE+x}" ]; then
6794    # The variable is not set by user, try to locate tool using the code snippet
6795    for ac_prog in date
6796do
6797  # Extract the first word of "$ac_prog", so it can be a program name with args.
6798set dummy $ac_prog; ac_word=$2
6799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6800$as_echo_n "checking for $ac_word... " >&6; }
6801if ${ac_cv_path_DATE+:} false; then :
6802  $as_echo_n "(cached) " >&6
6803else
6804  case $DATE in
6805  [\\/]* | ?:[\\/]*)
6806  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6807  ;;
6808  *)
6809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6810for as_dir in $PATH
6811do
6812  IFS=$as_save_IFS
6813  test -z "$as_dir" && as_dir=.
6814    for ac_exec_ext in '' $ac_executable_extensions; do
6815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6816    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6818    break 2
6819  fi
6820done
6821  done
6822IFS=$as_save_IFS
6823
6824  ;;
6825esac
6826fi
6827DATE=$ac_cv_path_DATE
6828if test -n "$DATE"; then
6829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6830$as_echo "$DATE" >&6; }
6831else
6832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6833$as_echo "no" >&6; }
6834fi
6835
6836
6837  test -n "$DATE" && break
6838done
6839
6840  else
6841    # The variable is set, but is it from the command line or the environment?
6842
6843    # Try to remove the string !DATE! from our list.
6844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6846      # If it failed, the variable was not from the command line. Ignore it,
6847      # but warn the user (except for BASH, which is always set by the calling BASH).
6848      if test "xDATE" != xBASH; then
6849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6850$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6851      fi
6852      # Try to locate tool using the code snippet
6853      for ac_prog in date
6854do
6855  # Extract the first word of "$ac_prog", so it can be a program name with args.
6856set dummy $ac_prog; ac_word=$2
6857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6858$as_echo_n "checking for $ac_word... " >&6; }
6859if ${ac_cv_path_DATE+:} false; then :
6860  $as_echo_n "(cached) " >&6
6861else
6862  case $DATE in
6863  [\\/]* | ?:[\\/]*)
6864  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6865  ;;
6866  *)
6867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6868for as_dir in $PATH
6869do
6870  IFS=$as_save_IFS
6871  test -z "$as_dir" && as_dir=.
6872    for ac_exec_ext in '' $ac_executable_extensions; do
6873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6874    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6876    break 2
6877  fi
6878done
6879  done
6880IFS=$as_save_IFS
6881
6882  ;;
6883esac
6884fi
6885DATE=$ac_cv_path_DATE
6886if test -n "$DATE"; then
6887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6888$as_echo "$DATE" >&6; }
6889else
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6891$as_echo "no" >&6; }
6892fi
6893
6894
6895  test -n "$DATE" && break
6896done
6897
6898    else
6899      # If it succeeded, then it was overridden by the user. We will use it
6900      # for the tool.
6901
6902      # First remove it from the list of overridden variables, so we can test
6903      # for unknown variables in the end.
6904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6905
6906      # Check if we try to supply an empty value
6907      if test "x$DATE" = x; then
6908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6909$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6911$as_echo_n "checking for DATE... " >&6; }
6912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6913$as_echo "disabled" >&6; }
6914      else
6915        # Check if the provided tool contains a complete path.
6916        tool_specified="$DATE"
6917        tool_basename="${tool_specified##*/}"
6918        if test "x$tool_basename" = "x$tool_specified"; then
6919          # A command without a complete path is provided, search $PATH.
6920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6921$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6922          # Extract the first word of "$tool_basename", so it can be a program name with args.
6923set dummy $tool_basename; ac_word=$2
6924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6925$as_echo_n "checking for $ac_word... " >&6; }
6926if ${ac_cv_path_DATE+:} false; then :
6927  $as_echo_n "(cached) " >&6
6928else
6929  case $DATE in
6930  [\\/]* | ?:[\\/]*)
6931  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6932  ;;
6933  *)
6934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6935for as_dir in $PATH
6936do
6937  IFS=$as_save_IFS
6938  test -z "$as_dir" && as_dir=.
6939    for ac_exec_ext in '' $ac_executable_extensions; do
6940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6941    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6943    break 2
6944  fi
6945done
6946  done
6947IFS=$as_save_IFS
6948
6949  ;;
6950esac
6951fi
6952DATE=$ac_cv_path_DATE
6953if test -n "$DATE"; then
6954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6955$as_echo "$DATE" >&6; }
6956else
6957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6958$as_echo "no" >&6; }
6959fi
6960
6961
6962          if test "x$DATE" = x; then
6963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6964          fi
6965        else
6966          # Otherwise we believe it is a complete path. Use it as it is.
6967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6968$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6970$as_echo_n "checking for DATE... " >&6; }
6971          if test ! -x "$tool_specified"; then
6972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6973$as_echo "not found" >&6; }
6974            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6975          fi
6976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6977$as_echo "$tool_specified" >&6; }
6978        fi
6979      fi
6980    fi
6981
6982  fi
6983
6984
6985
6986  if test "x$DATE" = x; then
6987    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6988  fi
6989
6990
6991
6992
6993
6994  # Publish this variable in the help.
6995
6996
6997  if [ -z "${DIFF+x}" ]; then
6998    # The variable is not set by user, try to locate tool using the code snippet
6999    for ac_prog in gdiff diff
7000do
7001  # Extract the first word of "$ac_prog", so it can be a program name with args.
7002set dummy $ac_prog; ac_word=$2
7003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7004$as_echo_n "checking for $ac_word... " >&6; }
7005if ${ac_cv_path_DIFF+:} false; then :
7006  $as_echo_n "(cached) " >&6
7007else
7008  case $DIFF in
7009  [\\/]* | ?:[\\/]*)
7010  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7011  ;;
7012  *)
7013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7014for as_dir in $PATH
7015do
7016  IFS=$as_save_IFS
7017  test -z "$as_dir" && as_dir=.
7018    for ac_exec_ext in '' $ac_executable_extensions; do
7019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7020    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7022    break 2
7023  fi
7024done
7025  done
7026IFS=$as_save_IFS
7027
7028  ;;
7029esac
7030fi
7031DIFF=$ac_cv_path_DIFF
7032if test -n "$DIFF"; then
7033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7034$as_echo "$DIFF" >&6; }
7035else
7036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7037$as_echo "no" >&6; }
7038fi
7039
7040
7041  test -n "$DIFF" && break
7042done
7043
7044  else
7045    # The variable is set, but is it from the command line or the environment?
7046
7047    # Try to remove the string !DIFF! from our list.
7048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7050      # If it failed, the variable was not from the command line. Ignore it,
7051      # but warn the user (except for BASH, which is always set by the calling BASH).
7052      if test "xDIFF" != xBASH; then
7053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7054$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7055      fi
7056      # Try to locate tool using the code snippet
7057      for ac_prog in gdiff diff
7058do
7059  # Extract the first word of "$ac_prog", so it can be a program name with args.
7060set dummy $ac_prog; ac_word=$2
7061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7062$as_echo_n "checking for $ac_word... " >&6; }
7063if ${ac_cv_path_DIFF+:} false; then :
7064  $as_echo_n "(cached) " >&6
7065else
7066  case $DIFF in
7067  [\\/]* | ?:[\\/]*)
7068  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7069  ;;
7070  *)
7071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7072for as_dir in $PATH
7073do
7074  IFS=$as_save_IFS
7075  test -z "$as_dir" && as_dir=.
7076    for ac_exec_ext in '' $ac_executable_extensions; do
7077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7078    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7080    break 2
7081  fi
7082done
7083  done
7084IFS=$as_save_IFS
7085
7086  ;;
7087esac
7088fi
7089DIFF=$ac_cv_path_DIFF
7090if test -n "$DIFF"; then
7091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7092$as_echo "$DIFF" >&6; }
7093else
7094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7095$as_echo "no" >&6; }
7096fi
7097
7098
7099  test -n "$DIFF" && break
7100done
7101
7102    else
7103      # If it succeeded, then it was overridden by the user. We will use it
7104      # for the tool.
7105
7106      # First remove it from the list of overridden variables, so we can test
7107      # for unknown variables in the end.
7108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7109
7110      # Check if we try to supply an empty value
7111      if test "x$DIFF" = x; then
7112        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7113$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7115$as_echo_n "checking for DIFF... " >&6; }
7116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7117$as_echo "disabled" >&6; }
7118      else
7119        # Check if the provided tool contains a complete path.
7120        tool_specified="$DIFF"
7121        tool_basename="${tool_specified##*/}"
7122        if test "x$tool_basename" = "x$tool_specified"; then
7123          # A command without a complete path is provided, search $PATH.
7124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7125$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7126          # Extract the first word of "$tool_basename", so it can be a program name with args.
7127set dummy $tool_basename; ac_word=$2
7128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7129$as_echo_n "checking for $ac_word... " >&6; }
7130if ${ac_cv_path_DIFF+:} false; then :
7131  $as_echo_n "(cached) " >&6
7132else
7133  case $DIFF in
7134  [\\/]* | ?:[\\/]*)
7135  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7136  ;;
7137  *)
7138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7139for as_dir in $PATH
7140do
7141  IFS=$as_save_IFS
7142  test -z "$as_dir" && as_dir=.
7143    for ac_exec_ext in '' $ac_executable_extensions; do
7144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7145    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7147    break 2
7148  fi
7149done
7150  done
7151IFS=$as_save_IFS
7152
7153  ;;
7154esac
7155fi
7156DIFF=$ac_cv_path_DIFF
7157if test -n "$DIFF"; then
7158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7159$as_echo "$DIFF" >&6; }
7160else
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7162$as_echo "no" >&6; }
7163fi
7164
7165
7166          if test "x$DIFF" = x; then
7167            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7168          fi
7169        else
7170          # Otherwise we believe it is a complete path. Use it as it is.
7171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7172$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7173          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7174$as_echo_n "checking for DIFF... " >&6; }
7175          if test ! -x "$tool_specified"; then
7176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7177$as_echo "not found" >&6; }
7178            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7179          fi
7180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7181$as_echo "$tool_specified" >&6; }
7182        fi
7183      fi
7184    fi
7185
7186  fi
7187
7188
7189
7190  if test "x$DIFF" = x; then
7191    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7192  fi
7193
7194
7195
7196
7197
7198  # Publish this variable in the help.
7199
7200
7201  if [ -z "${DIRNAME+x}" ]; then
7202    # The variable is not set by user, try to locate tool using the code snippet
7203    for ac_prog in dirname
7204do
7205  # Extract the first word of "$ac_prog", so it can be a program name with args.
7206set dummy $ac_prog; ac_word=$2
7207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7208$as_echo_n "checking for $ac_word... " >&6; }
7209if ${ac_cv_path_DIRNAME+:} false; then :
7210  $as_echo_n "(cached) " >&6
7211else
7212  case $DIRNAME in
7213  [\\/]* | ?:[\\/]*)
7214  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7215  ;;
7216  *)
7217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7218for as_dir in $PATH
7219do
7220  IFS=$as_save_IFS
7221  test -z "$as_dir" && as_dir=.
7222    for ac_exec_ext in '' $ac_executable_extensions; do
7223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7224    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7226    break 2
7227  fi
7228done
7229  done
7230IFS=$as_save_IFS
7231
7232  ;;
7233esac
7234fi
7235DIRNAME=$ac_cv_path_DIRNAME
7236if test -n "$DIRNAME"; then
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7238$as_echo "$DIRNAME" >&6; }
7239else
7240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241$as_echo "no" >&6; }
7242fi
7243
7244
7245  test -n "$DIRNAME" && break
7246done
7247
7248  else
7249    # The variable is set, but is it from the command line or the environment?
7250
7251    # Try to remove the string !DIRNAME! from our list.
7252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7254      # If it failed, the variable was not from the command line. Ignore it,
7255      # but warn the user (except for BASH, which is always set by the calling BASH).
7256      if test "xDIRNAME" != xBASH; then
7257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7258$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7259      fi
7260      # Try to locate tool using the code snippet
7261      for ac_prog in dirname
7262do
7263  # Extract the first word of "$ac_prog", so it can be a program name with args.
7264set dummy $ac_prog; ac_word=$2
7265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7266$as_echo_n "checking for $ac_word... " >&6; }
7267if ${ac_cv_path_DIRNAME+:} false; then :
7268  $as_echo_n "(cached) " >&6
7269else
7270  case $DIRNAME in
7271  [\\/]* | ?:[\\/]*)
7272  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7273  ;;
7274  *)
7275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7276for as_dir in $PATH
7277do
7278  IFS=$as_save_IFS
7279  test -z "$as_dir" && as_dir=.
7280    for ac_exec_ext in '' $ac_executable_extensions; do
7281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7282    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7284    break 2
7285  fi
7286done
7287  done
7288IFS=$as_save_IFS
7289
7290  ;;
7291esac
7292fi
7293DIRNAME=$ac_cv_path_DIRNAME
7294if test -n "$DIRNAME"; then
7295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7296$as_echo "$DIRNAME" >&6; }
7297else
7298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7299$as_echo "no" >&6; }
7300fi
7301
7302
7303  test -n "$DIRNAME" && break
7304done
7305
7306    else
7307      # If it succeeded, then it was overridden by the user. We will use it
7308      # for the tool.
7309
7310      # First remove it from the list of overridden variables, so we can test
7311      # for unknown variables in the end.
7312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7313
7314      # Check if we try to supply an empty value
7315      if test "x$DIRNAME" = x; then
7316        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7317$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7318        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7319$as_echo_n "checking for DIRNAME... " >&6; }
7320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7321$as_echo "disabled" >&6; }
7322      else
7323        # Check if the provided tool contains a complete path.
7324        tool_specified="$DIRNAME"
7325        tool_basename="${tool_specified##*/}"
7326        if test "x$tool_basename" = "x$tool_specified"; then
7327          # A command without a complete path is provided, search $PATH.
7328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7329$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7330          # Extract the first word of "$tool_basename", so it can be a program name with args.
7331set dummy $tool_basename; ac_word=$2
7332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7333$as_echo_n "checking for $ac_word... " >&6; }
7334if ${ac_cv_path_DIRNAME+:} false; then :
7335  $as_echo_n "(cached) " >&6
7336else
7337  case $DIRNAME in
7338  [\\/]* | ?:[\\/]*)
7339  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7340  ;;
7341  *)
7342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7343for as_dir in $PATH
7344do
7345  IFS=$as_save_IFS
7346  test -z "$as_dir" && as_dir=.
7347    for ac_exec_ext in '' $ac_executable_extensions; do
7348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7349    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7351    break 2
7352  fi
7353done
7354  done
7355IFS=$as_save_IFS
7356
7357  ;;
7358esac
7359fi
7360DIRNAME=$ac_cv_path_DIRNAME
7361if test -n "$DIRNAME"; then
7362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7363$as_echo "$DIRNAME" >&6; }
7364else
7365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366$as_echo "no" >&6; }
7367fi
7368
7369
7370          if test "x$DIRNAME" = x; then
7371            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7372          fi
7373        else
7374          # Otherwise we believe it is a complete path. Use it as it is.
7375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7376$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7377          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7378$as_echo_n "checking for DIRNAME... " >&6; }
7379          if test ! -x "$tool_specified"; then
7380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7381$as_echo "not found" >&6; }
7382            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7383          fi
7384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7385$as_echo "$tool_specified" >&6; }
7386        fi
7387      fi
7388    fi
7389
7390  fi
7391
7392
7393
7394  if test "x$DIRNAME" = x; then
7395    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7396  fi
7397
7398
7399
7400
7401
7402  # Publish this variable in the help.
7403
7404
7405  if [ -z "${ECHO+x}" ]; then
7406    # The variable is not set by user, try to locate tool using the code snippet
7407    for ac_prog in echo
7408do
7409  # Extract the first word of "$ac_prog", so it can be a program name with args.
7410set dummy $ac_prog; ac_word=$2
7411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7412$as_echo_n "checking for $ac_word... " >&6; }
7413if ${ac_cv_path_ECHO+:} false; then :
7414  $as_echo_n "(cached) " >&6
7415else
7416  case $ECHO in
7417  [\\/]* | ?:[\\/]*)
7418  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7419  ;;
7420  *)
7421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7422for as_dir in $PATH
7423do
7424  IFS=$as_save_IFS
7425  test -z "$as_dir" && as_dir=.
7426    for ac_exec_ext in '' $ac_executable_extensions; do
7427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7428    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7430    break 2
7431  fi
7432done
7433  done
7434IFS=$as_save_IFS
7435
7436  ;;
7437esac
7438fi
7439ECHO=$ac_cv_path_ECHO
7440if test -n "$ECHO"; then
7441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7442$as_echo "$ECHO" >&6; }
7443else
7444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445$as_echo "no" >&6; }
7446fi
7447
7448
7449  test -n "$ECHO" && break
7450done
7451
7452  else
7453    # The variable is set, but is it from the command line or the environment?
7454
7455    # Try to remove the string !ECHO! from our list.
7456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7458      # If it failed, the variable was not from the command line. Ignore it,
7459      # but warn the user (except for BASH, which is always set by the calling BASH).
7460      if test "xECHO" != xBASH; then
7461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7462$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7463      fi
7464      # Try to locate tool using the code snippet
7465      for ac_prog in echo
7466do
7467  # Extract the first word of "$ac_prog", so it can be a program name with args.
7468set dummy $ac_prog; ac_word=$2
7469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7470$as_echo_n "checking for $ac_word... " >&6; }
7471if ${ac_cv_path_ECHO+:} false; then :
7472  $as_echo_n "(cached) " >&6
7473else
7474  case $ECHO in
7475  [\\/]* | ?:[\\/]*)
7476  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7477  ;;
7478  *)
7479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7480for as_dir in $PATH
7481do
7482  IFS=$as_save_IFS
7483  test -z "$as_dir" && as_dir=.
7484    for ac_exec_ext in '' $ac_executable_extensions; do
7485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7486    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7488    break 2
7489  fi
7490done
7491  done
7492IFS=$as_save_IFS
7493
7494  ;;
7495esac
7496fi
7497ECHO=$ac_cv_path_ECHO
7498if test -n "$ECHO"; then
7499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7500$as_echo "$ECHO" >&6; }
7501else
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7503$as_echo "no" >&6; }
7504fi
7505
7506
7507  test -n "$ECHO" && break
7508done
7509
7510    else
7511      # If it succeeded, then it was overridden by the user. We will use it
7512      # for the tool.
7513
7514      # First remove it from the list of overridden variables, so we can test
7515      # for unknown variables in the end.
7516      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7517
7518      # Check if we try to supply an empty value
7519      if test "x$ECHO" = x; then
7520        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7521$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7523$as_echo_n "checking for ECHO... " >&6; }
7524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7525$as_echo "disabled" >&6; }
7526      else
7527        # Check if the provided tool contains a complete path.
7528        tool_specified="$ECHO"
7529        tool_basename="${tool_specified##*/}"
7530        if test "x$tool_basename" = "x$tool_specified"; then
7531          # A command without a complete path is provided, search $PATH.
7532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7533$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7534          # Extract the first word of "$tool_basename", so it can be a program name with args.
7535set dummy $tool_basename; ac_word=$2
7536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7537$as_echo_n "checking for $ac_word... " >&6; }
7538if ${ac_cv_path_ECHO+:} false; then :
7539  $as_echo_n "(cached) " >&6
7540else
7541  case $ECHO in
7542  [\\/]* | ?:[\\/]*)
7543  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7544  ;;
7545  *)
7546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7547for as_dir in $PATH
7548do
7549  IFS=$as_save_IFS
7550  test -z "$as_dir" && as_dir=.
7551    for ac_exec_ext in '' $ac_executable_extensions; do
7552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7553    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7555    break 2
7556  fi
7557done
7558  done
7559IFS=$as_save_IFS
7560
7561  ;;
7562esac
7563fi
7564ECHO=$ac_cv_path_ECHO
7565if test -n "$ECHO"; then
7566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7567$as_echo "$ECHO" >&6; }
7568else
7569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7570$as_echo "no" >&6; }
7571fi
7572
7573
7574          if test "x$ECHO" = x; then
7575            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7576          fi
7577        else
7578          # Otherwise we believe it is a complete path. Use it as it is.
7579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7580$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7581          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7582$as_echo_n "checking for ECHO... " >&6; }
7583          if test ! -x "$tool_specified"; then
7584            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7585$as_echo "not found" >&6; }
7586            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7587          fi
7588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7589$as_echo "$tool_specified" >&6; }
7590        fi
7591      fi
7592    fi
7593
7594  fi
7595
7596
7597
7598  if test "x$ECHO" = x; then
7599    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7600  fi
7601
7602
7603
7604
7605
7606  # Publish this variable in the help.
7607
7608
7609  if [ -z "${EXPR+x}" ]; then
7610    # The variable is not set by user, try to locate tool using the code snippet
7611    for ac_prog in expr
7612do
7613  # Extract the first word of "$ac_prog", so it can be a program name with args.
7614set dummy $ac_prog; ac_word=$2
7615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7616$as_echo_n "checking for $ac_word... " >&6; }
7617if ${ac_cv_path_EXPR+:} false; then :
7618  $as_echo_n "(cached) " >&6
7619else
7620  case $EXPR in
7621  [\\/]* | ?:[\\/]*)
7622  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7623  ;;
7624  *)
7625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7626for as_dir in $PATH
7627do
7628  IFS=$as_save_IFS
7629  test -z "$as_dir" && as_dir=.
7630    for ac_exec_ext in '' $ac_executable_extensions; do
7631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7632    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7634    break 2
7635  fi
7636done
7637  done
7638IFS=$as_save_IFS
7639
7640  ;;
7641esac
7642fi
7643EXPR=$ac_cv_path_EXPR
7644if test -n "$EXPR"; then
7645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7646$as_echo "$EXPR" >&6; }
7647else
7648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7649$as_echo "no" >&6; }
7650fi
7651
7652
7653  test -n "$EXPR" && break
7654done
7655
7656  else
7657    # The variable is set, but is it from the command line or the environment?
7658
7659    # Try to remove the string !EXPR! from our list.
7660    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7661    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7662      # If it failed, the variable was not from the command line. Ignore it,
7663      # but warn the user (except for BASH, which is always set by the calling BASH).
7664      if test "xEXPR" != xBASH; then
7665        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7666$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7667      fi
7668      # Try to locate tool using the code snippet
7669      for ac_prog in expr
7670do
7671  # Extract the first word of "$ac_prog", so it can be a program name with args.
7672set dummy $ac_prog; ac_word=$2
7673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7674$as_echo_n "checking for $ac_word... " >&6; }
7675if ${ac_cv_path_EXPR+:} false; then :
7676  $as_echo_n "(cached) " >&6
7677else
7678  case $EXPR in
7679  [\\/]* | ?:[\\/]*)
7680  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7681  ;;
7682  *)
7683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684for as_dir in $PATH
7685do
7686  IFS=$as_save_IFS
7687  test -z "$as_dir" && as_dir=.
7688    for ac_exec_ext in '' $ac_executable_extensions; do
7689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7690    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7692    break 2
7693  fi
7694done
7695  done
7696IFS=$as_save_IFS
7697
7698  ;;
7699esac
7700fi
7701EXPR=$ac_cv_path_EXPR
7702if test -n "$EXPR"; then
7703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7704$as_echo "$EXPR" >&6; }
7705else
7706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7707$as_echo "no" >&6; }
7708fi
7709
7710
7711  test -n "$EXPR" && break
7712done
7713
7714    else
7715      # If it succeeded, then it was overridden by the user. We will use it
7716      # for the tool.
7717
7718      # First remove it from the list of overridden variables, so we can test
7719      # for unknown variables in the end.
7720      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7721
7722      # Check if we try to supply an empty value
7723      if test "x$EXPR" = x; then
7724        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7725$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7727$as_echo_n "checking for EXPR... " >&6; }
7728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7729$as_echo "disabled" >&6; }
7730      else
7731        # Check if the provided tool contains a complete path.
7732        tool_specified="$EXPR"
7733        tool_basename="${tool_specified##*/}"
7734        if test "x$tool_basename" = "x$tool_specified"; then
7735          # A command without a complete path is provided, search $PATH.
7736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7737$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7738          # Extract the first word of "$tool_basename", so it can be a program name with args.
7739set dummy $tool_basename; ac_word=$2
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7741$as_echo_n "checking for $ac_word... " >&6; }
7742if ${ac_cv_path_EXPR+:} false; then :
7743  $as_echo_n "(cached) " >&6
7744else
7745  case $EXPR in
7746  [\\/]* | ?:[\\/]*)
7747  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7748  ;;
7749  *)
7750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7751for as_dir in $PATH
7752do
7753  IFS=$as_save_IFS
7754  test -z "$as_dir" && as_dir=.
7755    for ac_exec_ext in '' $ac_executable_extensions; do
7756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7757    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7759    break 2
7760  fi
7761done
7762  done
7763IFS=$as_save_IFS
7764
7765  ;;
7766esac
7767fi
7768EXPR=$ac_cv_path_EXPR
7769if test -n "$EXPR"; then
7770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7771$as_echo "$EXPR" >&6; }
7772else
7773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7774$as_echo "no" >&6; }
7775fi
7776
7777
7778          if test "x$EXPR" = x; then
7779            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7780          fi
7781        else
7782          # Otherwise we believe it is a complete path. Use it as it is.
7783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7784$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7785          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7786$as_echo_n "checking for EXPR... " >&6; }
7787          if test ! -x "$tool_specified"; then
7788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7789$as_echo "not found" >&6; }
7790            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7791          fi
7792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7793$as_echo "$tool_specified" >&6; }
7794        fi
7795      fi
7796    fi
7797
7798  fi
7799
7800
7801
7802  if test "x$EXPR" = x; then
7803    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7804  fi
7805
7806
7807
7808
7809
7810  # Publish this variable in the help.
7811
7812
7813  if [ -z "${FILE+x}" ]; then
7814    # The variable is not set by user, try to locate tool using the code snippet
7815    for ac_prog in file
7816do
7817  # Extract the first word of "$ac_prog", so it can be a program name with args.
7818set dummy $ac_prog; ac_word=$2
7819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7820$as_echo_n "checking for $ac_word... " >&6; }
7821if ${ac_cv_path_FILE+:} false; then :
7822  $as_echo_n "(cached) " >&6
7823else
7824  case $FILE in
7825  [\\/]* | ?:[\\/]*)
7826  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7827  ;;
7828  *)
7829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7830for as_dir in $PATH
7831do
7832  IFS=$as_save_IFS
7833  test -z "$as_dir" && as_dir=.
7834    for ac_exec_ext in '' $ac_executable_extensions; do
7835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7836    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7838    break 2
7839  fi
7840done
7841  done
7842IFS=$as_save_IFS
7843
7844  ;;
7845esac
7846fi
7847FILE=$ac_cv_path_FILE
7848if test -n "$FILE"; then
7849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7850$as_echo "$FILE" >&6; }
7851else
7852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7853$as_echo "no" >&6; }
7854fi
7855
7856
7857  test -n "$FILE" && break
7858done
7859
7860  else
7861    # The variable is set, but is it from the command line or the environment?
7862
7863    # Try to remove the string !FILE! from our list.
7864    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7865    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7866      # If it failed, the variable was not from the command line. Ignore it,
7867      # but warn the user (except for BASH, which is always set by the calling BASH).
7868      if test "xFILE" != xBASH; then
7869        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7870$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7871      fi
7872      # Try to locate tool using the code snippet
7873      for ac_prog in file
7874do
7875  # Extract the first word of "$ac_prog", so it can be a program name with args.
7876set dummy $ac_prog; ac_word=$2
7877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7878$as_echo_n "checking for $ac_word... " >&6; }
7879if ${ac_cv_path_FILE+:} false; then :
7880  $as_echo_n "(cached) " >&6
7881else
7882  case $FILE in
7883  [\\/]* | ?:[\\/]*)
7884  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7885  ;;
7886  *)
7887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7888for as_dir in $PATH
7889do
7890  IFS=$as_save_IFS
7891  test -z "$as_dir" && as_dir=.
7892    for ac_exec_ext in '' $ac_executable_extensions; do
7893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7894    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7896    break 2
7897  fi
7898done
7899  done
7900IFS=$as_save_IFS
7901
7902  ;;
7903esac
7904fi
7905FILE=$ac_cv_path_FILE
7906if test -n "$FILE"; then
7907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7908$as_echo "$FILE" >&6; }
7909else
7910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7911$as_echo "no" >&6; }
7912fi
7913
7914
7915  test -n "$FILE" && break
7916done
7917
7918    else
7919      # If it succeeded, then it was overridden by the user. We will use it
7920      # for the tool.
7921
7922      # First remove it from the list of overridden variables, so we can test
7923      # for unknown variables in the end.
7924      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7925
7926      # Check if we try to supply an empty value
7927      if test "x$FILE" = x; then
7928        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7929$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7931$as_echo_n "checking for FILE... " >&6; }
7932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7933$as_echo "disabled" >&6; }
7934      else
7935        # Check if the provided tool contains a complete path.
7936        tool_specified="$FILE"
7937        tool_basename="${tool_specified##*/}"
7938        if test "x$tool_basename" = "x$tool_specified"; then
7939          # A command without a complete path is provided, search $PATH.
7940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7941$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7942          # Extract the first word of "$tool_basename", so it can be a program name with args.
7943set dummy $tool_basename; ac_word=$2
7944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7945$as_echo_n "checking for $ac_word... " >&6; }
7946if ${ac_cv_path_FILE+:} false; then :
7947  $as_echo_n "(cached) " >&6
7948else
7949  case $FILE in
7950  [\\/]* | ?:[\\/]*)
7951  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7952  ;;
7953  *)
7954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7955for as_dir in $PATH
7956do
7957  IFS=$as_save_IFS
7958  test -z "$as_dir" && as_dir=.
7959    for ac_exec_ext in '' $ac_executable_extensions; do
7960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7961    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7963    break 2
7964  fi
7965done
7966  done
7967IFS=$as_save_IFS
7968
7969  ;;
7970esac
7971fi
7972FILE=$ac_cv_path_FILE
7973if test -n "$FILE"; then
7974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7975$as_echo "$FILE" >&6; }
7976else
7977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7978$as_echo "no" >&6; }
7979fi
7980
7981
7982          if test "x$FILE" = x; then
7983            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7984          fi
7985        else
7986          # Otherwise we believe it is a complete path. Use it as it is.
7987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7988$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7989          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7990$as_echo_n "checking for FILE... " >&6; }
7991          if test ! -x "$tool_specified"; then
7992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7993$as_echo "not found" >&6; }
7994            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7995          fi
7996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7997$as_echo "$tool_specified" >&6; }
7998        fi
7999      fi
8000    fi
8001
8002  fi
8003
8004
8005
8006  if test "x$FILE" = x; then
8007    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8008  fi
8009
8010
8011
8012
8013
8014  # Publish this variable in the help.
8015
8016
8017  if [ -z "${FIND+x}" ]; then
8018    # The variable is not set by user, try to locate tool using the code snippet
8019    for ac_prog in find
8020do
8021  # Extract the first word of "$ac_prog", so it can be a program name with args.
8022set dummy $ac_prog; ac_word=$2
8023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8024$as_echo_n "checking for $ac_word... " >&6; }
8025if ${ac_cv_path_FIND+:} false; then :
8026  $as_echo_n "(cached) " >&6
8027else
8028  case $FIND in
8029  [\\/]* | ?:[\\/]*)
8030  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8031  ;;
8032  *)
8033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8034for as_dir in $PATH
8035do
8036  IFS=$as_save_IFS
8037  test -z "$as_dir" && as_dir=.
8038    for ac_exec_ext in '' $ac_executable_extensions; do
8039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8040    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8042    break 2
8043  fi
8044done
8045  done
8046IFS=$as_save_IFS
8047
8048  ;;
8049esac
8050fi
8051FIND=$ac_cv_path_FIND
8052if test -n "$FIND"; then
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8054$as_echo "$FIND" >&6; }
8055else
8056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8057$as_echo "no" >&6; }
8058fi
8059
8060
8061  test -n "$FIND" && break
8062done
8063
8064  else
8065    # The variable is set, but is it from the command line or the environment?
8066
8067    # Try to remove the string !FIND! from our list.
8068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8070      # If it failed, the variable was not from the command line. Ignore it,
8071      # but warn the user (except for BASH, which is always set by the calling BASH).
8072      if test "xFIND" != xBASH; then
8073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8074$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8075      fi
8076      # Try to locate tool using the code snippet
8077      for ac_prog in find
8078do
8079  # Extract the first word of "$ac_prog", so it can be a program name with args.
8080set dummy $ac_prog; ac_word=$2
8081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8082$as_echo_n "checking for $ac_word... " >&6; }
8083if ${ac_cv_path_FIND+:} false; then :
8084  $as_echo_n "(cached) " >&6
8085else
8086  case $FIND in
8087  [\\/]* | ?:[\\/]*)
8088  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8089  ;;
8090  *)
8091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8092for as_dir in $PATH
8093do
8094  IFS=$as_save_IFS
8095  test -z "$as_dir" && as_dir=.
8096    for ac_exec_ext in '' $ac_executable_extensions; do
8097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8098    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8100    break 2
8101  fi
8102done
8103  done
8104IFS=$as_save_IFS
8105
8106  ;;
8107esac
8108fi
8109FIND=$ac_cv_path_FIND
8110if test -n "$FIND"; then
8111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8112$as_echo "$FIND" >&6; }
8113else
8114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8115$as_echo "no" >&6; }
8116fi
8117
8118
8119  test -n "$FIND" && break
8120done
8121
8122    else
8123      # If it succeeded, then it was overridden by the user. We will use it
8124      # for the tool.
8125
8126      # First remove it from the list of overridden variables, so we can test
8127      # for unknown variables in the end.
8128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8129
8130      # Check if we try to supply an empty value
8131      if test "x$FIND" = x; then
8132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8133$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8135$as_echo_n "checking for FIND... " >&6; }
8136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8137$as_echo "disabled" >&6; }
8138      else
8139        # Check if the provided tool contains a complete path.
8140        tool_specified="$FIND"
8141        tool_basename="${tool_specified##*/}"
8142        if test "x$tool_basename" = "x$tool_specified"; then
8143          # A command without a complete path is provided, search $PATH.
8144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8145$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8146          # Extract the first word of "$tool_basename", so it can be a program name with args.
8147set dummy $tool_basename; ac_word=$2
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8149$as_echo_n "checking for $ac_word... " >&6; }
8150if ${ac_cv_path_FIND+:} false; then :
8151  $as_echo_n "(cached) " >&6
8152else
8153  case $FIND in
8154  [\\/]* | ?:[\\/]*)
8155  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8156  ;;
8157  *)
8158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8159for as_dir in $PATH
8160do
8161  IFS=$as_save_IFS
8162  test -z "$as_dir" && as_dir=.
8163    for ac_exec_ext in '' $ac_executable_extensions; do
8164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8165    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8167    break 2
8168  fi
8169done
8170  done
8171IFS=$as_save_IFS
8172
8173  ;;
8174esac
8175fi
8176FIND=$ac_cv_path_FIND
8177if test -n "$FIND"; then
8178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8179$as_echo "$FIND" >&6; }
8180else
8181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8182$as_echo "no" >&6; }
8183fi
8184
8185
8186          if test "x$FIND" = x; then
8187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8188          fi
8189        else
8190          # Otherwise we believe it is a complete path. Use it as it is.
8191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8192$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8194$as_echo_n "checking for FIND... " >&6; }
8195          if test ! -x "$tool_specified"; then
8196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8197$as_echo "not found" >&6; }
8198            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8199          fi
8200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8201$as_echo "$tool_specified" >&6; }
8202        fi
8203      fi
8204    fi
8205
8206  fi
8207
8208
8209
8210  if test "x$FIND" = x; then
8211    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8212  fi
8213
8214
8215
8216
8217
8218  # Publish this variable in the help.
8219
8220
8221  if [ -z "${HEAD+x}" ]; then
8222    # The variable is not set by user, try to locate tool using the code snippet
8223    for ac_prog in head
8224do
8225  # Extract the first word of "$ac_prog", so it can be a program name with args.
8226set dummy $ac_prog; ac_word=$2
8227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8228$as_echo_n "checking for $ac_word... " >&6; }
8229if ${ac_cv_path_HEAD+:} false; then :
8230  $as_echo_n "(cached) " >&6
8231else
8232  case $HEAD in
8233  [\\/]* | ?:[\\/]*)
8234  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8235  ;;
8236  *)
8237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8238for as_dir in $PATH
8239do
8240  IFS=$as_save_IFS
8241  test -z "$as_dir" && as_dir=.
8242    for ac_exec_ext in '' $ac_executable_extensions; do
8243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8244    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8246    break 2
8247  fi
8248done
8249  done
8250IFS=$as_save_IFS
8251
8252  ;;
8253esac
8254fi
8255HEAD=$ac_cv_path_HEAD
8256if test -n "$HEAD"; then
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8258$as_echo "$HEAD" >&6; }
8259else
8260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8261$as_echo "no" >&6; }
8262fi
8263
8264
8265  test -n "$HEAD" && break
8266done
8267
8268  else
8269    # The variable is set, but is it from the command line or the environment?
8270
8271    # Try to remove the string !HEAD! from our list.
8272    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8273    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8274      # If it failed, the variable was not from the command line. Ignore it,
8275      # but warn the user (except for BASH, which is always set by the calling BASH).
8276      if test "xHEAD" != xBASH; then
8277        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8278$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8279      fi
8280      # Try to locate tool using the code snippet
8281      for ac_prog in head
8282do
8283  # Extract the first word of "$ac_prog", so it can be a program name with args.
8284set dummy $ac_prog; ac_word=$2
8285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8286$as_echo_n "checking for $ac_word... " >&6; }
8287if ${ac_cv_path_HEAD+:} false; then :
8288  $as_echo_n "(cached) " >&6
8289else
8290  case $HEAD in
8291  [\\/]* | ?:[\\/]*)
8292  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8293  ;;
8294  *)
8295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8296for as_dir in $PATH
8297do
8298  IFS=$as_save_IFS
8299  test -z "$as_dir" && as_dir=.
8300    for ac_exec_ext in '' $ac_executable_extensions; do
8301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8302    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8304    break 2
8305  fi
8306done
8307  done
8308IFS=$as_save_IFS
8309
8310  ;;
8311esac
8312fi
8313HEAD=$ac_cv_path_HEAD
8314if test -n "$HEAD"; then
8315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8316$as_echo "$HEAD" >&6; }
8317else
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8319$as_echo "no" >&6; }
8320fi
8321
8322
8323  test -n "$HEAD" && break
8324done
8325
8326    else
8327      # If it succeeded, then it was overridden by the user. We will use it
8328      # for the tool.
8329
8330      # First remove it from the list of overridden variables, so we can test
8331      # for unknown variables in the end.
8332      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8333
8334      # Check if we try to supply an empty value
8335      if test "x$HEAD" = x; then
8336        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8337$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8338        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8339$as_echo_n "checking for HEAD... " >&6; }
8340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8341$as_echo "disabled" >&6; }
8342      else
8343        # Check if the provided tool contains a complete path.
8344        tool_specified="$HEAD"
8345        tool_basename="${tool_specified##*/}"
8346        if test "x$tool_basename" = "x$tool_specified"; then
8347          # A command without a complete path is provided, search $PATH.
8348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8349$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8350          # Extract the first word of "$tool_basename", so it can be a program name with args.
8351set dummy $tool_basename; ac_word=$2
8352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8353$as_echo_n "checking for $ac_word... " >&6; }
8354if ${ac_cv_path_HEAD+:} false; then :
8355  $as_echo_n "(cached) " >&6
8356else
8357  case $HEAD in
8358  [\\/]* | ?:[\\/]*)
8359  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8360  ;;
8361  *)
8362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8363for as_dir in $PATH
8364do
8365  IFS=$as_save_IFS
8366  test -z "$as_dir" && as_dir=.
8367    for ac_exec_ext in '' $ac_executable_extensions; do
8368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8369    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8371    break 2
8372  fi
8373done
8374  done
8375IFS=$as_save_IFS
8376
8377  ;;
8378esac
8379fi
8380HEAD=$ac_cv_path_HEAD
8381if test -n "$HEAD"; then
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8383$as_echo "$HEAD" >&6; }
8384else
8385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
8387fi
8388
8389
8390          if test "x$HEAD" = x; then
8391            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8392          fi
8393        else
8394          # Otherwise we believe it is a complete path. Use it as it is.
8395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8396$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8397          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8398$as_echo_n "checking for HEAD... " >&6; }
8399          if test ! -x "$tool_specified"; then
8400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8401$as_echo "not found" >&6; }
8402            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8403          fi
8404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8405$as_echo "$tool_specified" >&6; }
8406        fi
8407      fi
8408    fi
8409
8410  fi
8411
8412
8413
8414  if test "x$HEAD" = x; then
8415    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8416  fi
8417
8418
8419
8420
8421
8422  # Publish this variable in the help.
8423
8424
8425  if [ -z "${GUNZIP+x}" ]; then
8426    # The variable is not set by user, try to locate tool using the code snippet
8427    for ac_prog in gunzip
8428do
8429  # Extract the first word of "$ac_prog", so it can be a program name with args.
8430set dummy $ac_prog; ac_word=$2
8431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8432$as_echo_n "checking for $ac_word... " >&6; }
8433if ${ac_cv_path_GUNZIP+:} false; then :
8434  $as_echo_n "(cached) " >&6
8435else
8436  case $GUNZIP in
8437  [\\/]* | ?:[\\/]*)
8438  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8439  ;;
8440  *)
8441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8442for as_dir in $PATH
8443do
8444  IFS=$as_save_IFS
8445  test -z "$as_dir" && as_dir=.
8446    for ac_exec_ext in '' $ac_executable_extensions; do
8447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8448    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8450    break 2
8451  fi
8452done
8453  done
8454IFS=$as_save_IFS
8455
8456  ;;
8457esac
8458fi
8459GUNZIP=$ac_cv_path_GUNZIP
8460if test -n "$GUNZIP"; then
8461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8462$as_echo "$GUNZIP" >&6; }
8463else
8464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8465$as_echo "no" >&6; }
8466fi
8467
8468
8469  test -n "$GUNZIP" && break
8470done
8471
8472  else
8473    # The variable is set, but is it from the command line or the environment?
8474
8475    # Try to remove the string !GUNZIP! from our list.
8476    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8477    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8478      # If it failed, the variable was not from the command line. Ignore it,
8479      # but warn the user (except for BASH, which is always set by the calling BASH).
8480      if test "xGUNZIP" != xBASH; then
8481        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8482$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8483      fi
8484      # Try to locate tool using the code snippet
8485      for ac_prog in gunzip
8486do
8487  # Extract the first word of "$ac_prog", so it can be a program name with args.
8488set dummy $ac_prog; ac_word=$2
8489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8490$as_echo_n "checking for $ac_word... " >&6; }
8491if ${ac_cv_path_GUNZIP+:} false; then :
8492  $as_echo_n "(cached) " >&6
8493else
8494  case $GUNZIP in
8495  [\\/]* | ?:[\\/]*)
8496  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8497  ;;
8498  *)
8499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8500for as_dir in $PATH
8501do
8502  IFS=$as_save_IFS
8503  test -z "$as_dir" && as_dir=.
8504    for ac_exec_ext in '' $ac_executable_extensions; do
8505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8506    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8508    break 2
8509  fi
8510done
8511  done
8512IFS=$as_save_IFS
8513
8514  ;;
8515esac
8516fi
8517GUNZIP=$ac_cv_path_GUNZIP
8518if test -n "$GUNZIP"; then
8519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8520$as_echo "$GUNZIP" >&6; }
8521else
8522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8523$as_echo "no" >&6; }
8524fi
8525
8526
8527  test -n "$GUNZIP" && break
8528done
8529
8530    else
8531      # If it succeeded, then it was overridden by the user. We will use it
8532      # for the tool.
8533
8534      # First remove it from the list of overridden variables, so we can test
8535      # for unknown variables in the end.
8536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8537
8538      # Check if we try to supply an empty value
8539      if test "x$GUNZIP" = x; then
8540        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8541$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8543$as_echo_n "checking for GUNZIP... " >&6; }
8544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8545$as_echo "disabled" >&6; }
8546      else
8547        # Check if the provided tool contains a complete path.
8548        tool_specified="$GUNZIP"
8549        tool_basename="${tool_specified##*/}"
8550        if test "x$tool_basename" = "x$tool_specified"; then
8551          # A command without a complete path is provided, search $PATH.
8552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8553$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8554          # Extract the first word of "$tool_basename", so it can be a program name with args.
8555set dummy $tool_basename; ac_word=$2
8556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8557$as_echo_n "checking for $ac_word... " >&6; }
8558if ${ac_cv_path_GUNZIP+:} false; then :
8559  $as_echo_n "(cached) " >&6
8560else
8561  case $GUNZIP in
8562  [\\/]* | ?:[\\/]*)
8563  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8564  ;;
8565  *)
8566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8567for as_dir in $PATH
8568do
8569  IFS=$as_save_IFS
8570  test -z "$as_dir" && as_dir=.
8571    for ac_exec_ext in '' $ac_executable_extensions; do
8572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8573    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8575    break 2
8576  fi
8577done
8578  done
8579IFS=$as_save_IFS
8580
8581  ;;
8582esac
8583fi
8584GUNZIP=$ac_cv_path_GUNZIP
8585if test -n "$GUNZIP"; then
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8587$as_echo "$GUNZIP" >&6; }
8588else
8589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
8591fi
8592
8593
8594          if test "x$GUNZIP" = x; then
8595            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8596          fi
8597        else
8598          # Otherwise we believe it is a complete path. Use it as it is.
8599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8600$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8602$as_echo_n "checking for GUNZIP... " >&6; }
8603          if test ! -x "$tool_specified"; then
8604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8605$as_echo "not found" >&6; }
8606            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8607          fi
8608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8609$as_echo "$tool_specified" >&6; }
8610        fi
8611      fi
8612    fi
8613
8614  fi
8615
8616
8617
8618  if test "x$GUNZIP" = x; then
8619    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8620  fi
8621
8622
8623
8624
8625
8626  # Publish this variable in the help.
8627
8628
8629  if [ -z "${GZIP+x}" ]; then
8630    # The variable is not set by user, try to locate tool using the code snippet
8631    for ac_prog in pigz gzip
8632do
8633  # Extract the first word of "$ac_prog", so it can be a program name with args.
8634set dummy $ac_prog; ac_word=$2
8635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8636$as_echo_n "checking for $ac_word... " >&6; }
8637if ${ac_cv_path_GZIP+:} false; then :
8638  $as_echo_n "(cached) " >&6
8639else
8640  case $GZIP in
8641  [\\/]* | ?:[\\/]*)
8642  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8643  ;;
8644  *)
8645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8646for as_dir in $PATH
8647do
8648  IFS=$as_save_IFS
8649  test -z "$as_dir" && as_dir=.
8650    for ac_exec_ext in '' $ac_executable_extensions; do
8651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8652    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8654    break 2
8655  fi
8656done
8657  done
8658IFS=$as_save_IFS
8659
8660  ;;
8661esac
8662fi
8663GZIP=$ac_cv_path_GZIP
8664if test -n "$GZIP"; then
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8666$as_echo "$GZIP" >&6; }
8667else
8668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8669$as_echo "no" >&6; }
8670fi
8671
8672
8673  test -n "$GZIP" && break
8674done
8675
8676  else
8677    # The variable is set, but is it from the command line or the environment?
8678
8679    # Try to remove the string !GZIP! from our list.
8680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8682      # If it failed, the variable was not from the command line. Ignore it,
8683      # but warn the user (except for BASH, which is always set by the calling BASH).
8684      if test "xGZIP" != xBASH; then
8685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8686$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8687      fi
8688      # Try to locate tool using the code snippet
8689      for ac_prog in pigz gzip
8690do
8691  # Extract the first word of "$ac_prog", so it can be a program name with args.
8692set dummy $ac_prog; ac_word=$2
8693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8694$as_echo_n "checking for $ac_word... " >&6; }
8695if ${ac_cv_path_GZIP+:} false; then :
8696  $as_echo_n "(cached) " >&6
8697else
8698  case $GZIP in
8699  [\\/]* | ?:[\\/]*)
8700  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8701  ;;
8702  *)
8703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8704for as_dir in $PATH
8705do
8706  IFS=$as_save_IFS
8707  test -z "$as_dir" && as_dir=.
8708    for ac_exec_ext in '' $ac_executable_extensions; do
8709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8710    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8712    break 2
8713  fi
8714done
8715  done
8716IFS=$as_save_IFS
8717
8718  ;;
8719esac
8720fi
8721GZIP=$ac_cv_path_GZIP
8722if test -n "$GZIP"; then
8723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8724$as_echo "$GZIP" >&6; }
8725else
8726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8727$as_echo "no" >&6; }
8728fi
8729
8730
8731  test -n "$GZIP" && break
8732done
8733
8734    else
8735      # If it succeeded, then it was overridden by the user. We will use it
8736      # for the tool.
8737
8738      # First remove it from the list of overridden variables, so we can test
8739      # for unknown variables in the end.
8740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8741
8742      # Check if we try to supply an empty value
8743      if test "x$GZIP" = x; then
8744        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8745$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8747$as_echo_n "checking for GZIP... " >&6; }
8748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8749$as_echo "disabled" >&6; }
8750      else
8751        # Check if the provided tool contains a complete path.
8752        tool_specified="$GZIP"
8753        tool_basename="${tool_specified##*/}"
8754        if test "x$tool_basename" = "x$tool_specified"; then
8755          # A command without a complete path is provided, search $PATH.
8756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8757$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8758          # Extract the first word of "$tool_basename", so it can be a program name with args.
8759set dummy $tool_basename; ac_word=$2
8760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8761$as_echo_n "checking for $ac_word... " >&6; }
8762if ${ac_cv_path_GZIP+:} false; then :
8763  $as_echo_n "(cached) " >&6
8764else
8765  case $GZIP in
8766  [\\/]* | ?:[\\/]*)
8767  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8768  ;;
8769  *)
8770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8771for as_dir in $PATH
8772do
8773  IFS=$as_save_IFS
8774  test -z "$as_dir" && as_dir=.
8775    for ac_exec_ext in '' $ac_executable_extensions; do
8776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8777    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8779    break 2
8780  fi
8781done
8782  done
8783IFS=$as_save_IFS
8784
8785  ;;
8786esac
8787fi
8788GZIP=$ac_cv_path_GZIP
8789if test -n "$GZIP"; then
8790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8791$as_echo "$GZIP" >&6; }
8792else
8793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794$as_echo "no" >&6; }
8795fi
8796
8797
8798          if test "x$GZIP" = x; then
8799            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8800          fi
8801        else
8802          # Otherwise we believe it is a complete path. Use it as it is.
8803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8804$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8805          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8806$as_echo_n "checking for GZIP... " >&6; }
8807          if test ! -x "$tool_specified"; then
8808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8809$as_echo "not found" >&6; }
8810            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8811          fi
8812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8813$as_echo "$tool_specified" >&6; }
8814        fi
8815      fi
8816    fi
8817
8818  fi
8819
8820
8821
8822  if test "x$GZIP" = x; then
8823    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8824  fi
8825
8826
8827
8828
8829
8830  # Publish this variable in the help.
8831
8832
8833  if [ -z "${LN+x}" ]; then
8834    # The variable is not set by user, try to locate tool using the code snippet
8835    for ac_prog in ln
8836do
8837  # Extract the first word of "$ac_prog", so it can be a program name with args.
8838set dummy $ac_prog; ac_word=$2
8839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8840$as_echo_n "checking for $ac_word... " >&6; }
8841if ${ac_cv_path_LN+:} false; then :
8842  $as_echo_n "(cached) " >&6
8843else
8844  case $LN in
8845  [\\/]* | ?:[\\/]*)
8846  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8847  ;;
8848  *)
8849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8850for as_dir in $PATH
8851do
8852  IFS=$as_save_IFS
8853  test -z "$as_dir" && as_dir=.
8854    for ac_exec_ext in '' $ac_executable_extensions; do
8855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8856    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8858    break 2
8859  fi
8860done
8861  done
8862IFS=$as_save_IFS
8863
8864  ;;
8865esac
8866fi
8867LN=$ac_cv_path_LN
8868if test -n "$LN"; then
8869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8870$as_echo "$LN" >&6; }
8871else
8872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8873$as_echo "no" >&6; }
8874fi
8875
8876
8877  test -n "$LN" && break
8878done
8879
8880  else
8881    # The variable is set, but is it from the command line or the environment?
8882
8883    # Try to remove the string !LN! from our list.
8884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8886      # If it failed, the variable was not from the command line. Ignore it,
8887      # but warn the user (except for BASH, which is always set by the calling BASH).
8888      if test "xLN" != xBASH; then
8889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8890$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8891      fi
8892      # Try to locate tool using the code snippet
8893      for ac_prog in ln
8894do
8895  # Extract the first word of "$ac_prog", so it can be a program name with args.
8896set dummy $ac_prog; ac_word=$2
8897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8898$as_echo_n "checking for $ac_word... " >&6; }
8899if ${ac_cv_path_LN+:} false; then :
8900  $as_echo_n "(cached) " >&6
8901else
8902  case $LN in
8903  [\\/]* | ?:[\\/]*)
8904  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8905  ;;
8906  *)
8907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8908for as_dir in $PATH
8909do
8910  IFS=$as_save_IFS
8911  test -z "$as_dir" && as_dir=.
8912    for ac_exec_ext in '' $ac_executable_extensions; do
8913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8914    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8916    break 2
8917  fi
8918done
8919  done
8920IFS=$as_save_IFS
8921
8922  ;;
8923esac
8924fi
8925LN=$ac_cv_path_LN
8926if test -n "$LN"; then
8927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8928$as_echo "$LN" >&6; }
8929else
8930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8931$as_echo "no" >&6; }
8932fi
8933
8934
8935  test -n "$LN" && break
8936done
8937
8938    else
8939      # If it succeeded, then it was overridden by the user. We will use it
8940      # for the tool.
8941
8942      # First remove it from the list of overridden variables, so we can test
8943      # for unknown variables in the end.
8944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8945
8946      # Check if we try to supply an empty value
8947      if test "x$LN" = x; then
8948        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8949$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8950        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8951$as_echo_n "checking for LN... " >&6; }
8952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8953$as_echo "disabled" >&6; }
8954      else
8955        # Check if the provided tool contains a complete path.
8956        tool_specified="$LN"
8957        tool_basename="${tool_specified##*/}"
8958        if test "x$tool_basename" = "x$tool_specified"; then
8959          # A command without a complete path is provided, search $PATH.
8960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8961$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8962          # Extract the first word of "$tool_basename", so it can be a program name with args.
8963set dummy $tool_basename; ac_word=$2
8964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8965$as_echo_n "checking for $ac_word... " >&6; }
8966if ${ac_cv_path_LN+:} false; then :
8967  $as_echo_n "(cached) " >&6
8968else
8969  case $LN in
8970  [\\/]* | ?:[\\/]*)
8971  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8972  ;;
8973  *)
8974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8975for as_dir in $PATH
8976do
8977  IFS=$as_save_IFS
8978  test -z "$as_dir" && as_dir=.
8979    for ac_exec_ext in '' $ac_executable_extensions; do
8980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8981    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8983    break 2
8984  fi
8985done
8986  done
8987IFS=$as_save_IFS
8988
8989  ;;
8990esac
8991fi
8992LN=$ac_cv_path_LN
8993if test -n "$LN"; then
8994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8995$as_echo "$LN" >&6; }
8996else
8997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998$as_echo "no" >&6; }
8999fi
9000
9001
9002          if test "x$LN" = x; then
9003            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9004          fi
9005        else
9006          # Otherwise we believe it is a complete path. Use it as it is.
9007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9008$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9009          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9010$as_echo_n "checking for LN... " >&6; }
9011          if test ! -x "$tool_specified"; then
9012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9013$as_echo "not found" >&6; }
9014            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9015          fi
9016          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9017$as_echo "$tool_specified" >&6; }
9018        fi
9019      fi
9020    fi
9021
9022  fi
9023
9024
9025
9026  if test "x$LN" = x; then
9027    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9028  fi
9029
9030
9031
9032
9033
9034  # Publish this variable in the help.
9035
9036
9037  if [ -z "${LS+x}" ]; then
9038    # The variable is not set by user, try to locate tool using the code snippet
9039    for ac_prog in ls
9040do
9041  # Extract the first word of "$ac_prog", so it can be a program name with args.
9042set dummy $ac_prog; ac_word=$2
9043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9044$as_echo_n "checking for $ac_word... " >&6; }
9045if ${ac_cv_path_LS+:} false; then :
9046  $as_echo_n "(cached) " >&6
9047else
9048  case $LS in
9049  [\\/]* | ?:[\\/]*)
9050  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9051  ;;
9052  *)
9053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9054for as_dir in $PATH
9055do
9056  IFS=$as_save_IFS
9057  test -z "$as_dir" && as_dir=.
9058    for ac_exec_ext in '' $ac_executable_extensions; do
9059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9060    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9062    break 2
9063  fi
9064done
9065  done
9066IFS=$as_save_IFS
9067
9068  ;;
9069esac
9070fi
9071LS=$ac_cv_path_LS
9072if test -n "$LS"; then
9073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9074$as_echo "$LS" >&6; }
9075else
9076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9077$as_echo "no" >&6; }
9078fi
9079
9080
9081  test -n "$LS" && break
9082done
9083
9084  else
9085    # The variable is set, but is it from the command line or the environment?
9086
9087    # Try to remove the string !LS! from our list.
9088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9090      # If it failed, the variable was not from the command line. Ignore it,
9091      # but warn the user (except for BASH, which is always set by the calling BASH).
9092      if test "xLS" != xBASH; then
9093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9094$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9095      fi
9096      # Try to locate tool using the code snippet
9097      for ac_prog in ls
9098do
9099  # Extract the first word of "$ac_prog", so it can be a program name with args.
9100set dummy $ac_prog; ac_word=$2
9101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9102$as_echo_n "checking for $ac_word... " >&6; }
9103if ${ac_cv_path_LS+:} false; then :
9104  $as_echo_n "(cached) " >&6
9105else
9106  case $LS in
9107  [\\/]* | ?:[\\/]*)
9108  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9109  ;;
9110  *)
9111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9112for as_dir in $PATH
9113do
9114  IFS=$as_save_IFS
9115  test -z "$as_dir" && as_dir=.
9116    for ac_exec_ext in '' $ac_executable_extensions; do
9117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9118    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9120    break 2
9121  fi
9122done
9123  done
9124IFS=$as_save_IFS
9125
9126  ;;
9127esac
9128fi
9129LS=$ac_cv_path_LS
9130if test -n "$LS"; then
9131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9132$as_echo "$LS" >&6; }
9133else
9134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9135$as_echo "no" >&6; }
9136fi
9137
9138
9139  test -n "$LS" && break
9140done
9141
9142    else
9143      # If it succeeded, then it was overridden by the user. We will use it
9144      # for the tool.
9145
9146      # First remove it from the list of overridden variables, so we can test
9147      # for unknown variables in the end.
9148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9149
9150      # Check if we try to supply an empty value
9151      if test "x$LS" = x; then
9152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9153$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9155$as_echo_n "checking for LS... " >&6; }
9156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9157$as_echo "disabled" >&6; }
9158      else
9159        # Check if the provided tool contains a complete path.
9160        tool_specified="$LS"
9161        tool_basename="${tool_specified##*/}"
9162        if test "x$tool_basename" = "x$tool_specified"; then
9163          # A command without a complete path is provided, search $PATH.
9164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9165$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9166          # Extract the first word of "$tool_basename", so it can be a program name with args.
9167set dummy $tool_basename; ac_word=$2
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9169$as_echo_n "checking for $ac_word... " >&6; }
9170if ${ac_cv_path_LS+:} false; then :
9171  $as_echo_n "(cached) " >&6
9172else
9173  case $LS in
9174  [\\/]* | ?:[\\/]*)
9175  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9176  ;;
9177  *)
9178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9179for as_dir in $PATH
9180do
9181  IFS=$as_save_IFS
9182  test -z "$as_dir" && as_dir=.
9183    for ac_exec_ext in '' $ac_executable_extensions; do
9184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9185    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9187    break 2
9188  fi
9189done
9190  done
9191IFS=$as_save_IFS
9192
9193  ;;
9194esac
9195fi
9196LS=$ac_cv_path_LS
9197if test -n "$LS"; then
9198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9199$as_echo "$LS" >&6; }
9200else
9201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9202$as_echo "no" >&6; }
9203fi
9204
9205
9206          if test "x$LS" = x; then
9207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9208          fi
9209        else
9210          # Otherwise we believe it is a complete path. Use it as it is.
9211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9212$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9214$as_echo_n "checking for LS... " >&6; }
9215          if test ! -x "$tool_specified"; then
9216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9217$as_echo "not found" >&6; }
9218            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9219          fi
9220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9221$as_echo "$tool_specified" >&6; }
9222        fi
9223      fi
9224    fi
9225
9226  fi
9227
9228
9229
9230  if test "x$LS" = x; then
9231    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9232  fi
9233
9234
9235
9236
9237
9238  # Publish this variable in the help.
9239
9240
9241  if [ -z "${MKDIR+x}" ]; then
9242    # The variable is not set by user, try to locate tool using the code snippet
9243    for ac_prog in mkdir
9244do
9245  # Extract the first word of "$ac_prog", so it can be a program name with args.
9246set dummy $ac_prog; ac_word=$2
9247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9248$as_echo_n "checking for $ac_word... " >&6; }
9249if ${ac_cv_path_MKDIR+:} false; then :
9250  $as_echo_n "(cached) " >&6
9251else
9252  case $MKDIR in
9253  [\\/]* | ?:[\\/]*)
9254  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9255  ;;
9256  *)
9257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9258for as_dir in $PATH
9259do
9260  IFS=$as_save_IFS
9261  test -z "$as_dir" && as_dir=.
9262    for ac_exec_ext in '' $ac_executable_extensions; do
9263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9264    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9266    break 2
9267  fi
9268done
9269  done
9270IFS=$as_save_IFS
9271
9272  ;;
9273esac
9274fi
9275MKDIR=$ac_cv_path_MKDIR
9276if test -n "$MKDIR"; then
9277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9278$as_echo "$MKDIR" >&6; }
9279else
9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9281$as_echo "no" >&6; }
9282fi
9283
9284
9285  test -n "$MKDIR" && break
9286done
9287
9288  else
9289    # The variable is set, but is it from the command line or the environment?
9290
9291    # Try to remove the string !MKDIR! from our list.
9292    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9293    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9294      # If it failed, the variable was not from the command line. Ignore it,
9295      # but warn the user (except for BASH, which is always set by the calling BASH).
9296      if test "xMKDIR" != xBASH; then
9297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9298$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9299      fi
9300      # Try to locate tool using the code snippet
9301      for ac_prog in mkdir
9302do
9303  # Extract the first word of "$ac_prog", so it can be a program name with args.
9304set dummy $ac_prog; ac_word=$2
9305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9306$as_echo_n "checking for $ac_word... " >&6; }
9307if ${ac_cv_path_MKDIR+:} false; then :
9308  $as_echo_n "(cached) " >&6
9309else
9310  case $MKDIR in
9311  [\\/]* | ?:[\\/]*)
9312  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9313  ;;
9314  *)
9315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9316for as_dir in $PATH
9317do
9318  IFS=$as_save_IFS
9319  test -z "$as_dir" && as_dir=.
9320    for ac_exec_ext in '' $ac_executable_extensions; do
9321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9322    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9324    break 2
9325  fi
9326done
9327  done
9328IFS=$as_save_IFS
9329
9330  ;;
9331esac
9332fi
9333MKDIR=$ac_cv_path_MKDIR
9334if test -n "$MKDIR"; then
9335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9336$as_echo "$MKDIR" >&6; }
9337else
9338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9339$as_echo "no" >&6; }
9340fi
9341
9342
9343  test -n "$MKDIR" && break
9344done
9345
9346    else
9347      # If it succeeded, then it was overridden by the user. We will use it
9348      # for the tool.
9349
9350      # First remove it from the list of overridden variables, so we can test
9351      # for unknown variables in the end.
9352      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9353
9354      # Check if we try to supply an empty value
9355      if test "x$MKDIR" = x; then
9356        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9357$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9359$as_echo_n "checking for MKDIR... " >&6; }
9360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9361$as_echo "disabled" >&6; }
9362      else
9363        # Check if the provided tool contains a complete path.
9364        tool_specified="$MKDIR"
9365        tool_basename="${tool_specified##*/}"
9366        if test "x$tool_basename" = "x$tool_specified"; then
9367          # A command without a complete path is provided, search $PATH.
9368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9369$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9370          # Extract the first word of "$tool_basename", so it can be a program name with args.
9371set dummy $tool_basename; ac_word=$2
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9373$as_echo_n "checking for $ac_word... " >&6; }
9374if ${ac_cv_path_MKDIR+:} false; then :
9375  $as_echo_n "(cached) " >&6
9376else
9377  case $MKDIR in
9378  [\\/]* | ?:[\\/]*)
9379  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9380  ;;
9381  *)
9382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9383for as_dir in $PATH
9384do
9385  IFS=$as_save_IFS
9386  test -z "$as_dir" && as_dir=.
9387    for ac_exec_ext in '' $ac_executable_extensions; do
9388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9389    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9391    break 2
9392  fi
9393done
9394  done
9395IFS=$as_save_IFS
9396
9397  ;;
9398esac
9399fi
9400MKDIR=$ac_cv_path_MKDIR
9401if test -n "$MKDIR"; then
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9403$as_echo "$MKDIR" >&6; }
9404else
9405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
9407fi
9408
9409
9410          if test "x$MKDIR" = x; then
9411            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9412          fi
9413        else
9414          # Otherwise we believe it is a complete path. Use it as it is.
9415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9416$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9417          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9418$as_echo_n "checking for MKDIR... " >&6; }
9419          if test ! -x "$tool_specified"; then
9420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9421$as_echo "not found" >&6; }
9422            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9423          fi
9424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9425$as_echo "$tool_specified" >&6; }
9426        fi
9427      fi
9428    fi
9429
9430  fi
9431
9432
9433
9434  if test "x$MKDIR" = x; then
9435    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9436  fi
9437
9438
9439
9440
9441
9442  # Publish this variable in the help.
9443
9444
9445  if [ -z "${MKTEMP+x}" ]; then
9446    # The variable is not set by user, try to locate tool using the code snippet
9447    for ac_prog in mktemp
9448do
9449  # Extract the first word of "$ac_prog", so it can be a program name with args.
9450set dummy $ac_prog; ac_word=$2
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9452$as_echo_n "checking for $ac_word... " >&6; }
9453if ${ac_cv_path_MKTEMP+:} false; then :
9454  $as_echo_n "(cached) " >&6
9455else
9456  case $MKTEMP in
9457  [\\/]* | ?:[\\/]*)
9458  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9459  ;;
9460  *)
9461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9462for as_dir in $PATH
9463do
9464  IFS=$as_save_IFS
9465  test -z "$as_dir" && as_dir=.
9466    for ac_exec_ext in '' $ac_executable_extensions; do
9467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9468    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9470    break 2
9471  fi
9472done
9473  done
9474IFS=$as_save_IFS
9475
9476  ;;
9477esac
9478fi
9479MKTEMP=$ac_cv_path_MKTEMP
9480if test -n "$MKTEMP"; then
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9482$as_echo "$MKTEMP" >&6; }
9483else
9484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485$as_echo "no" >&6; }
9486fi
9487
9488
9489  test -n "$MKTEMP" && break
9490done
9491
9492  else
9493    # The variable is set, but is it from the command line or the environment?
9494
9495    # Try to remove the string !MKTEMP! from our list.
9496    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9497    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9498      # If it failed, the variable was not from the command line. Ignore it,
9499      # but warn the user (except for BASH, which is always set by the calling BASH).
9500      if test "xMKTEMP" != xBASH; then
9501        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9502$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9503      fi
9504      # Try to locate tool using the code snippet
9505      for ac_prog in mktemp
9506do
9507  # Extract the first word of "$ac_prog", so it can be a program name with args.
9508set dummy $ac_prog; ac_word=$2
9509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9510$as_echo_n "checking for $ac_word... " >&6; }
9511if ${ac_cv_path_MKTEMP+:} false; then :
9512  $as_echo_n "(cached) " >&6
9513else
9514  case $MKTEMP in
9515  [\\/]* | ?:[\\/]*)
9516  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9517  ;;
9518  *)
9519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9520for as_dir in $PATH
9521do
9522  IFS=$as_save_IFS
9523  test -z "$as_dir" && as_dir=.
9524    for ac_exec_ext in '' $ac_executable_extensions; do
9525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9526    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9528    break 2
9529  fi
9530done
9531  done
9532IFS=$as_save_IFS
9533
9534  ;;
9535esac
9536fi
9537MKTEMP=$ac_cv_path_MKTEMP
9538if test -n "$MKTEMP"; then
9539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9540$as_echo "$MKTEMP" >&6; }
9541else
9542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9543$as_echo "no" >&6; }
9544fi
9545
9546
9547  test -n "$MKTEMP" && break
9548done
9549
9550    else
9551      # If it succeeded, then it was overridden by the user. We will use it
9552      # for the tool.
9553
9554      # First remove it from the list of overridden variables, so we can test
9555      # for unknown variables in the end.
9556      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9557
9558      # Check if we try to supply an empty value
9559      if test "x$MKTEMP" = x; then
9560        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9561$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9563$as_echo_n "checking for MKTEMP... " >&6; }
9564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9565$as_echo "disabled" >&6; }
9566      else
9567        # Check if the provided tool contains a complete path.
9568        tool_specified="$MKTEMP"
9569        tool_basename="${tool_specified##*/}"
9570        if test "x$tool_basename" = "x$tool_specified"; then
9571          # A command without a complete path is provided, search $PATH.
9572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9573$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9574          # Extract the first word of "$tool_basename", so it can be a program name with args.
9575set dummy $tool_basename; ac_word=$2
9576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9577$as_echo_n "checking for $ac_word... " >&6; }
9578if ${ac_cv_path_MKTEMP+:} false; then :
9579  $as_echo_n "(cached) " >&6
9580else
9581  case $MKTEMP in
9582  [\\/]* | ?:[\\/]*)
9583  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9584  ;;
9585  *)
9586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9587for as_dir in $PATH
9588do
9589  IFS=$as_save_IFS
9590  test -z "$as_dir" && as_dir=.
9591    for ac_exec_ext in '' $ac_executable_extensions; do
9592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9593    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9595    break 2
9596  fi
9597done
9598  done
9599IFS=$as_save_IFS
9600
9601  ;;
9602esac
9603fi
9604MKTEMP=$ac_cv_path_MKTEMP
9605if test -n "$MKTEMP"; then
9606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9607$as_echo "$MKTEMP" >&6; }
9608else
9609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9610$as_echo "no" >&6; }
9611fi
9612
9613
9614          if test "x$MKTEMP" = x; then
9615            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9616          fi
9617        else
9618          # Otherwise we believe it is a complete path. Use it as it is.
9619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9620$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9621          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9622$as_echo_n "checking for MKTEMP... " >&6; }
9623          if test ! -x "$tool_specified"; then
9624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9625$as_echo "not found" >&6; }
9626            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9627          fi
9628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9629$as_echo "$tool_specified" >&6; }
9630        fi
9631      fi
9632    fi
9633
9634  fi
9635
9636
9637
9638  if test "x$MKTEMP" = x; then
9639    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9640  fi
9641
9642
9643
9644
9645
9646  # Publish this variable in the help.
9647
9648
9649  if [ -z "${MV+x}" ]; then
9650    # The variable is not set by user, try to locate tool using the code snippet
9651    for ac_prog in mv
9652do
9653  # Extract the first word of "$ac_prog", so it can be a program name with args.
9654set dummy $ac_prog; ac_word=$2
9655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9656$as_echo_n "checking for $ac_word... " >&6; }
9657if ${ac_cv_path_MV+:} false; then :
9658  $as_echo_n "(cached) " >&6
9659else
9660  case $MV in
9661  [\\/]* | ?:[\\/]*)
9662  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9663  ;;
9664  *)
9665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9666for as_dir in $PATH
9667do
9668  IFS=$as_save_IFS
9669  test -z "$as_dir" && as_dir=.
9670    for ac_exec_ext in '' $ac_executable_extensions; do
9671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9672    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9674    break 2
9675  fi
9676done
9677  done
9678IFS=$as_save_IFS
9679
9680  ;;
9681esac
9682fi
9683MV=$ac_cv_path_MV
9684if test -n "$MV"; then
9685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9686$as_echo "$MV" >&6; }
9687else
9688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9689$as_echo "no" >&6; }
9690fi
9691
9692
9693  test -n "$MV" && break
9694done
9695
9696  else
9697    # The variable is set, but is it from the command line or the environment?
9698
9699    # Try to remove the string !MV! from our list.
9700    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9701    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9702      # If it failed, the variable was not from the command line. Ignore it,
9703      # but warn the user (except for BASH, which is always set by the calling BASH).
9704      if test "xMV" != xBASH; then
9705        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9706$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9707      fi
9708      # Try to locate tool using the code snippet
9709      for ac_prog in mv
9710do
9711  # Extract the first word of "$ac_prog", so it can be a program name with args.
9712set dummy $ac_prog; ac_word=$2
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9714$as_echo_n "checking for $ac_word... " >&6; }
9715if ${ac_cv_path_MV+:} false; then :
9716  $as_echo_n "(cached) " >&6
9717else
9718  case $MV in
9719  [\\/]* | ?:[\\/]*)
9720  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9721  ;;
9722  *)
9723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9724for as_dir in $PATH
9725do
9726  IFS=$as_save_IFS
9727  test -z "$as_dir" && as_dir=.
9728    for ac_exec_ext in '' $ac_executable_extensions; do
9729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9730    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9732    break 2
9733  fi
9734done
9735  done
9736IFS=$as_save_IFS
9737
9738  ;;
9739esac
9740fi
9741MV=$ac_cv_path_MV
9742if test -n "$MV"; then
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9744$as_echo "$MV" >&6; }
9745else
9746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9747$as_echo "no" >&6; }
9748fi
9749
9750
9751  test -n "$MV" && break
9752done
9753
9754    else
9755      # If it succeeded, then it was overridden by the user. We will use it
9756      # for the tool.
9757
9758      # First remove it from the list of overridden variables, so we can test
9759      # for unknown variables in the end.
9760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9761
9762      # Check if we try to supply an empty value
9763      if test "x$MV" = x; then
9764        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9765$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9767$as_echo_n "checking for MV... " >&6; }
9768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9769$as_echo "disabled" >&6; }
9770      else
9771        # Check if the provided tool contains a complete path.
9772        tool_specified="$MV"
9773        tool_basename="${tool_specified##*/}"
9774        if test "x$tool_basename" = "x$tool_specified"; then
9775          # A command without a complete path is provided, search $PATH.
9776          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9777$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9778          # Extract the first word of "$tool_basename", so it can be a program name with args.
9779set dummy $tool_basename; ac_word=$2
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9781$as_echo_n "checking for $ac_word... " >&6; }
9782if ${ac_cv_path_MV+:} false; then :
9783  $as_echo_n "(cached) " >&6
9784else
9785  case $MV in
9786  [\\/]* | ?:[\\/]*)
9787  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9788  ;;
9789  *)
9790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9791for as_dir in $PATH
9792do
9793  IFS=$as_save_IFS
9794  test -z "$as_dir" && as_dir=.
9795    for ac_exec_ext in '' $ac_executable_extensions; do
9796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9797    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9799    break 2
9800  fi
9801done
9802  done
9803IFS=$as_save_IFS
9804
9805  ;;
9806esac
9807fi
9808MV=$ac_cv_path_MV
9809if test -n "$MV"; then
9810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9811$as_echo "$MV" >&6; }
9812else
9813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
9815fi
9816
9817
9818          if test "x$MV" = x; then
9819            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9820          fi
9821        else
9822          # Otherwise we believe it is a complete path. Use it as it is.
9823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9824$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9825          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9826$as_echo_n "checking for MV... " >&6; }
9827          if test ! -x "$tool_specified"; then
9828            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9829$as_echo "not found" >&6; }
9830            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9831          fi
9832          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9833$as_echo "$tool_specified" >&6; }
9834        fi
9835      fi
9836    fi
9837
9838  fi
9839
9840
9841
9842  if test "x$MV" = x; then
9843    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9844  fi
9845
9846
9847
9848
9849
9850  # Publish this variable in the help.
9851
9852
9853  if [ -z "${NAWK+x}" ]; then
9854    # The variable is not set by user, try to locate tool using the code snippet
9855    for ac_prog in nawk gawk awk
9856do
9857  # Extract the first word of "$ac_prog", so it can be a program name with args.
9858set dummy $ac_prog; ac_word=$2
9859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9860$as_echo_n "checking for $ac_word... " >&6; }
9861if ${ac_cv_path_NAWK+:} false; then :
9862  $as_echo_n "(cached) " >&6
9863else
9864  case $NAWK in
9865  [\\/]* | ?:[\\/]*)
9866  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9867  ;;
9868  *)
9869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9870for as_dir in $PATH
9871do
9872  IFS=$as_save_IFS
9873  test -z "$as_dir" && as_dir=.
9874    for ac_exec_ext in '' $ac_executable_extensions; do
9875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9876    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9878    break 2
9879  fi
9880done
9881  done
9882IFS=$as_save_IFS
9883
9884  ;;
9885esac
9886fi
9887NAWK=$ac_cv_path_NAWK
9888if test -n "$NAWK"; then
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9890$as_echo "$NAWK" >&6; }
9891else
9892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893$as_echo "no" >&6; }
9894fi
9895
9896
9897  test -n "$NAWK" && break
9898done
9899
9900  else
9901    # The variable is set, but is it from the command line or the environment?
9902
9903    # Try to remove the string !NAWK! from our list.
9904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9906      # If it failed, the variable was not from the command line. Ignore it,
9907      # but warn the user (except for BASH, which is always set by the calling BASH).
9908      if test "xNAWK" != xBASH; then
9909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9910$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9911      fi
9912      # Try to locate tool using the code snippet
9913      for ac_prog in nawk gawk awk
9914do
9915  # Extract the first word of "$ac_prog", so it can be a program name with args.
9916set dummy $ac_prog; ac_word=$2
9917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9918$as_echo_n "checking for $ac_word... " >&6; }
9919if ${ac_cv_path_NAWK+:} false; then :
9920  $as_echo_n "(cached) " >&6
9921else
9922  case $NAWK in
9923  [\\/]* | ?:[\\/]*)
9924  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9925  ;;
9926  *)
9927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9928for as_dir in $PATH
9929do
9930  IFS=$as_save_IFS
9931  test -z "$as_dir" && as_dir=.
9932    for ac_exec_ext in '' $ac_executable_extensions; do
9933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9934    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9936    break 2
9937  fi
9938done
9939  done
9940IFS=$as_save_IFS
9941
9942  ;;
9943esac
9944fi
9945NAWK=$ac_cv_path_NAWK
9946if test -n "$NAWK"; then
9947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9948$as_echo "$NAWK" >&6; }
9949else
9950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952fi
9953
9954
9955  test -n "$NAWK" && break
9956done
9957
9958    else
9959      # If it succeeded, then it was overridden by the user. We will use it
9960      # for the tool.
9961
9962      # First remove it from the list of overridden variables, so we can test
9963      # for unknown variables in the end.
9964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9965
9966      # Check if we try to supply an empty value
9967      if test "x$NAWK" = x; then
9968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9969$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9971$as_echo_n "checking for NAWK... " >&6; }
9972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9973$as_echo "disabled" >&6; }
9974      else
9975        # Check if the provided tool contains a complete path.
9976        tool_specified="$NAWK"
9977        tool_basename="${tool_specified##*/}"
9978        if test "x$tool_basename" = "x$tool_specified"; then
9979          # A command without a complete path is provided, search $PATH.
9980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9981$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9982          # Extract the first word of "$tool_basename", so it can be a program name with args.
9983set dummy $tool_basename; ac_word=$2
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9985$as_echo_n "checking for $ac_word... " >&6; }
9986if ${ac_cv_path_NAWK+:} false; then :
9987  $as_echo_n "(cached) " >&6
9988else
9989  case $NAWK in
9990  [\\/]* | ?:[\\/]*)
9991  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9992  ;;
9993  *)
9994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9995for as_dir in $PATH
9996do
9997  IFS=$as_save_IFS
9998  test -z "$as_dir" && as_dir=.
9999    for ac_exec_ext in '' $ac_executable_extensions; do
10000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10001    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10003    break 2
10004  fi
10005done
10006  done
10007IFS=$as_save_IFS
10008
10009  ;;
10010esac
10011fi
10012NAWK=$ac_cv_path_NAWK
10013if test -n "$NAWK"; then
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10015$as_echo "$NAWK" >&6; }
10016else
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
10019fi
10020
10021
10022          if test "x$NAWK" = x; then
10023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10024          fi
10025        else
10026          # Otherwise we believe it is a complete path. Use it as it is.
10027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10028$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10030$as_echo_n "checking for NAWK... " >&6; }
10031          if test ! -x "$tool_specified"; then
10032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10033$as_echo "not found" >&6; }
10034            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10035          fi
10036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10037$as_echo "$tool_specified" >&6; }
10038        fi
10039      fi
10040    fi
10041
10042  fi
10043
10044
10045
10046  if test "x$NAWK" = x; then
10047    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10048  fi
10049
10050
10051
10052
10053
10054  # Publish this variable in the help.
10055
10056
10057  if [ -z "${PRINTF+x}" ]; then
10058    # The variable is not set by user, try to locate tool using the code snippet
10059    for ac_prog in printf
10060do
10061  # Extract the first word of "$ac_prog", so it can be a program name with args.
10062set dummy $ac_prog; ac_word=$2
10063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10064$as_echo_n "checking for $ac_word... " >&6; }
10065if ${ac_cv_path_PRINTF+:} false; then :
10066  $as_echo_n "(cached) " >&6
10067else
10068  case $PRINTF in
10069  [\\/]* | ?:[\\/]*)
10070  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10071  ;;
10072  *)
10073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10074for as_dir in $PATH
10075do
10076  IFS=$as_save_IFS
10077  test -z "$as_dir" && as_dir=.
10078    for ac_exec_ext in '' $ac_executable_extensions; do
10079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10080    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10082    break 2
10083  fi
10084done
10085  done
10086IFS=$as_save_IFS
10087
10088  ;;
10089esac
10090fi
10091PRINTF=$ac_cv_path_PRINTF
10092if test -n "$PRINTF"; then
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10094$as_echo "$PRINTF" >&6; }
10095else
10096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10097$as_echo "no" >&6; }
10098fi
10099
10100
10101  test -n "$PRINTF" && break
10102done
10103
10104  else
10105    # The variable is set, but is it from the command line or the environment?
10106
10107    # Try to remove the string !PRINTF! from our list.
10108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10110      # If it failed, the variable was not from the command line. Ignore it,
10111      # but warn the user (except for BASH, which is always set by the calling BASH).
10112      if test "xPRINTF" != xBASH; then
10113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10114$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10115      fi
10116      # Try to locate tool using the code snippet
10117      for ac_prog in printf
10118do
10119  # Extract the first word of "$ac_prog", so it can be a program name with args.
10120set dummy $ac_prog; ac_word=$2
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10122$as_echo_n "checking for $ac_word... " >&6; }
10123if ${ac_cv_path_PRINTF+:} false; then :
10124  $as_echo_n "(cached) " >&6
10125else
10126  case $PRINTF in
10127  [\\/]* | ?:[\\/]*)
10128  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10129  ;;
10130  *)
10131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10132for as_dir in $PATH
10133do
10134  IFS=$as_save_IFS
10135  test -z "$as_dir" && as_dir=.
10136    for ac_exec_ext in '' $ac_executable_extensions; do
10137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10138    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10140    break 2
10141  fi
10142done
10143  done
10144IFS=$as_save_IFS
10145
10146  ;;
10147esac
10148fi
10149PRINTF=$ac_cv_path_PRINTF
10150if test -n "$PRINTF"; then
10151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10152$as_echo "$PRINTF" >&6; }
10153else
10154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10155$as_echo "no" >&6; }
10156fi
10157
10158
10159  test -n "$PRINTF" && break
10160done
10161
10162    else
10163      # If it succeeded, then it was overridden by the user. We will use it
10164      # for the tool.
10165
10166      # First remove it from the list of overridden variables, so we can test
10167      # for unknown variables in the end.
10168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10169
10170      # Check if we try to supply an empty value
10171      if test "x$PRINTF" = x; then
10172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10173$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10175$as_echo_n "checking for PRINTF... " >&6; }
10176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10177$as_echo "disabled" >&6; }
10178      else
10179        # Check if the provided tool contains a complete path.
10180        tool_specified="$PRINTF"
10181        tool_basename="${tool_specified##*/}"
10182        if test "x$tool_basename" = "x$tool_specified"; then
10183          # A command without a complete path is provided, search $PATH.
10184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10185$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10186          # Extract the first word of "$tool_basename", so it can be a program name with args.
10187set dummy $tool_basename; ac_word=$2
10188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10189$as_echo_n "checking for $ac_word... " >&6; }
10190if ${ac_cv_path_PRINTF+:} false; then :
10191  $as_echo_n "(cached) " >&6
10192else
10193  case $PRINTF in
10194  [\\/]* | ?:[\\/]*)
10195  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10196  ;;
10197  *)
10198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10199for as_dir in $PATH
10200do
10201  IFS=$as_save_IFS
10202  test -z "$as_dir" && as_dir=.
10203    for ac_exec_ext in '' $ac_executable_extensions; do
10204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10205    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10207    break 2
10208  fi
10209done
10210  done
10211IFS=$as_save_IFS
10212
10213  ;;
10214esac
10215fi
10216PRINTF=$ac_cv_path_PRINTF
10217if test -n "$PRINTF"; then
10218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10219$as_echo "$PRINTF" >&6; }
10220else
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
10223fi
10224
10225
10226          if test "x$PRINTF" = x; then
10227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10228          fi
10229        else
10230          # Otherwise we believe it is a complete path. Use it as it is.
10231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10232$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10234$as_echo_n "checking for PRINTF... " >&6; }
10235          if test ! -x "$tool_specified"; then
10236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10237$as_echo "not found" >&6; }
10238            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10239          fi
10240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10241$as_echo "$tool_specified" >&6; }
10242        fi
10243      fi
10244    fi
10245
10246  fi
10247
10248
10249
10250  if test "x$PRINTF" = x; then
10251    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10252  fi
10253
10254
10255
10256
10257
10258  # Publish this variable in the help.
10259
10260
10261  if [ -z "${RM+x}" ]; then
10262    # The variable is not set by user, try to locate tool using the code snippet
10263    for ac_prog in rm
10264do
10265  # Extract the first word of "$ac_prog", so it can be a program name with args.
10266set dummy $ac_prog; ac_word=$2
10267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10268$as_echo_n "checking for $ac_word... " >&6; }
10269if ${ac_cv_path_RM+:} false; then :
10270  $as_echo_n "(cached) " >&6
10271else
10272  case $RM in
10273  [\\/]* | ?:[\\/]*)
10274  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10275  ;;
10276  *)
10277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10278for as_dir in $PATH
10279do
10280  IFS=$as_save_IFS
10281  test -z "$as_dir" && as_dir=.
10282    for ac_exec_ext in '' $ac_executable_extensions; do
10283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10284    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10286    break 2
10287  fi
10288done
10289  done
10290IFS=$as_save_IFS
10291
10292  ;;
10293esac
10294fi
10295RM=$ac_cv_path_RM
10296if test -n "$RM"; then
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10298$as_echo "$RM" >&6; }
10299else
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10301$as_echo "no" >&6; }
10302fi
10303
10304
10305  test -n "$RM" && break
10306done
10307
10308  else
10309    # The variable is set, but is it from the command line or the environment?
10310
10311    # Try to remove the string !RM! from our list.
10312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10314      # If it failed, the variable was not from the command line. Ignore it,
10315      # but warn the user (except for BASH, which is always set by the calling BASH).
10316      if test "xRM" != xBASH; then
10317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10318$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10319      fi
10320      # Try to locate tool using the code snippet
10321      for ac_prog in rm
10322do
10323  # Extract the first word of "$ac_prog", so it can be a program name with args.
10324set dummy $ac_prog; ac_word=$2
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10326$as_echo_n "checking for $ac_word... " >&6; }
10327if ${ac_cv_path_RM+:} false; then :
10328  $as_echo_n "(cached) " >&6
10329else
10330  case $RM in
10331  [\\/]* | ?:[\\/]*)
10332  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10333  ;;
10334  *)
10335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10336for as_dir in $PATH
10337do
10338  IFS=$as_save_IFS
10339  test -z "$as_dir" && as_dir=.
10340    for ac_exec_ext in '' $ac_executable_extensions; do
10341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10342    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10344    break 2
10345  fi
10346done
10347  done
10348IFS=$as_save_IFS
10349
10350  ;;
10351esac
10352fi
10353RM=$ac_cv_path_RM
10354if test -n "$RM"; then
10355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10356$as_echo "$RM" >&6; }
10357else
10358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359$as_echo "no" >&6; }
10360fi
10361
10362
10363  test -n "$RM" && break
10364done
10365
10366    else
10367      # If it succeeded, then it was overridden by the user. We will use it
10368      # for the tool.
10369
10370      # First remove it from the list of overridden variables, so we can test
10371      # for unknown variables in the end.
10372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10373
10374      # Check if we try to supply an empty value
10375      if test "x$RM" = x; then
10376        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10377$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10379$as_echo_n "checking for RM... " >&6; }
10380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10381$as_echo "disabled" >&6; }
10382      else
10383        # Check if the provided tool contains a complete path.
10384        tool_specified="$RM"
10385        tool_basename="${tool_specified##*/}"
10386        if test "x$tool_basename" = "x$tool_specified"; then
10387          # A command without a complete path is provided, search $PATH.
10388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10389$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10390          # Extract the first word of "$tool_basename", so it can be a program name with args.
10391set dummy $tool_basename; ac_word=$2
10392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10393$as_echo_n "checking for $ac_word... " >&6; }
10394if ${ac_cv_path_RM+:} false; then :
10395  $as_echo_n "(cached) " >&6
10396else
10397  case $RM in
10398  [\\/]* | ?:[\\/]*)
10399  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10400  ;;
10401  *)
10402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10403for as_dir in $PATH
10404do
10405  IFS=$as_save_IFS
10406  test -z "$as_dir" && as_dir=.
10407    for ac_exec_ext in '' $ac_executable_extensions; do
10408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10409    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10411    break 2
10412  fi
10413done
10414  done
10415IFS=$as_save_IFS
10416
10417  ;;
10418esac
10419fi
10420RM=$ac_cv_path_RM
10421if test -n "$RM"; then
10422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10423$as_echo "$RM" >&6; }
10424else
10425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
10427fi
10428
10429
10430          if test "x$RM" = x; then
10431            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10432          fi
10433        else
10434          # Otherwise we believe it is a complete path. Use it as it is.
10435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10436$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10437          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10438$as_echo_n "checking for RM... " >&6; }
10439          if test ! -x "$tool_specified"; then
10440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10441$as_echo "not found" >&6; }
10442            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10443          fi
10444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10445$as_echo "$tool_specified" >&6; }
10446        fi
10447      fi
10448    fi
10449
10450  fi
10451
10452
10453
10454  if test "x$RM" = x; then
10455    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10456  fi
10457
10458
10459
10460
10461
10462  # Publish this variable in the help.
10463
10464
10465  if [ -z "${RMDIR+x}" ]; then
10466    # The variable is not set by user, try to locate tool using the code snippet
10467    for ac_prog in rmdir
10468do
10469  # Extract the first word of "$ac_prog", so it can be a program name with args.
10470set dummy $ac_prog; ac_word=$2
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10472$as_echo_n "checking for $ac_word... " >&6; }
10473if ${ac_cv_path_RMDIR+:} false; then :
10474  $as_echo_n "(cached) " >&6
10475else
10476  case $RMDIR in
10477  [\\/]* | ?:[\\/]*)
10478  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10479  ;;
10480  *)
10481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10482for as_dir in $PATH
10483do
10484  IFS=$as_save_IFS
10485  test -z "$as_dir" && as_dir=.
10486    for ac_exec_ext in '' $ac_executable_extensions; do
10487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10488    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10490    break 2
10491  fi
10492done
10493  done
10494IFS=$as_save_IFS
10495
10496  ;;
10497esac
10498fi
10499RMDIR=$ac_cv_path_RMDIR
10500if test -n "$RMDIR"; then
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10502$as_echo "$RMDIR" >&6; }
10503else
10504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
10506fi
10507
10508
10509  test -n "$RMDIR" && break
10510done
10511
10512  else
10513    # The variable is set, but is it from the command line or the environment?
10514
10515    # Try to remove the string !RMDIR! from our list.
10516    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10517    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10518      # If it failed, the variable was not from the command line. Ignore it,
10519      # but warn the user (except for BASH, which is always set by the calling BASH).
10520      if test "xRMDIR" != xBASH; then
10521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10522$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10523      fi
10524      # Try to locate tool using the code snippet
10525      for ac_prog in rmdir
10526do
10527  # Extract the first word of "$ac_prog", so it can be a program name with args.
10528set dummy $ac_prog; ac_word=$2
10529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10530$as_echo_n "checking for $ac_word... " >&6; }
10531if ${ac_cv_path_RMDIR+:} false; then :
10532  $as_echo_n "(cached) " >&6
10533else
10534  case $RMDIR in
10535  [\\/]* | ?:[\\/]*)
10536  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10537  ;;
10538  *)
10539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10540for as_dir in $PATH
10541do
10542  IFS=$as_save_IFS
10543  test -z "$as_dir" && as_dir=.
10544    for ac_exec_ext in '' $ac_executable_extensions; do
10545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10546    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10548    break 2
10549  fi
10550done
10551  done
10552IFS=$as_save_IFS
10553
10554  ;;
10555esac
10556fi
10557RMDIR=$ac_cv_path_RMDIR
10558if test -n "$RMDIR"; then
10559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10560$as_echo "$RMDIR" >&6; }
10561else
10562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10563$as_echo "no" >&6; }
10564fi
10565
10566
10567  test -n "$RMDIR" && break
10568done
10569
10570    else
10571      # If it succeeded, then it was overridden by the user. We will use it
10572      # for the tool.
10573
10574      # First remove it from the list of overridden variables, so we can test
10575      # for unknown variables in the end.
10576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10577
10578      # Check if we try to supply an empty value
10579      if test "x$RMDIR" = x; then
10580        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10581$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10583$as_echo_n "checking for RMDIR... " >&6; }
10584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10585$as_echo "disabled" >&6; }
10586      else
10587        # Check if the provided tool contains a complete path.
10588        tool_specified="$RMDIR"
10589        tool_basename="${tool_specified##*/}"
10590        if test "x$tool_basename" = "x$tool_specified"; then
10591          # A command without a complete path is provided, search $PATH.
10592          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10593$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10594          # Extract the first word of "$tool_basename", so it can be a program name with args.
10595set dummy $tool_basename; ac_word=$2
10596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10597$as_echo_n "checking for $ac_word... " >&6; }
10598if ${ac_cv_path_RMDIR+:} false; then :
10599  $as_echo_n "(cached) " >&6
10600else
10601  case $RMDIR in
10602  [\\/]* | ?:[\\/]*)
10603  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10604  ;;
10605  *)
10606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10607for as_dir in $PATH
10608do
10609  IFS=$as_save_IFS
10610  test -z "$as_dir" && as_dir=.
10611    for ac_exec_ext in '' $ac_executable_extensions; do
10612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10613    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10615    break 2
10616  fi
10617done
10618  done
10619IFS=$as_save_IFS
10620
10621  ;;
10622esac
10623fi
10624RMDIR=$ac_cv_path_RMDIR
10625if test -n "$RMDIR"; then
10626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10627$as_echo "$RMDIR" >&6; }
10628else
10629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10630$as_echo "no" >&6; }
10631fi
10632
10633
10634          if test "x$RMDIR" = x; then
10635            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10636          fi
10637        else
10638          # Otherwise we believe it is a complete path. Use it as it is.
10639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10640$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10641          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10642$as_echo_n "checking for RMDIR... " >&6; }
10643          if test ! -x "$tool_specified"; then
10644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10645$as_echo "not found" >&6; }
10646            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10647          fi
10648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10649$as_echo "$tool_specified" >&6; }
10650        fi
10651      fi
10652    fi
10653
10654  fi
10655
10656
10657
10658  if test "x$RMDIR" = x; then
10659    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10660  fi
10661
10662
10663
10664
10665
10666  # Publish this variable in the help.
10667
10668
10669  if [ -z "${SH+x}" ]; then
10670    # The variable is not set by user, try to locate tool using the code snippet
10671    for ac_prog in sh
10672do
10673  # Extract the first word of "$ac_prog", so it can be a program name with args.
10674set dummy $ac_prog; ac_word=$2
10675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10676$as_echo_n "checking for $ac_word... " >&6; }
10677if ${ac_cv_path_SH+:} false; then :
10678  $as_echo_n "(cached) " >&6
10679else
10680  case $SH in
10681  [\\/]* | ?:[\\/]*)
10682  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10683  ;;
10684  *)
10685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10686for as_dir in $PATH
10687do
10688  IFS=$as_save_IFS
10689  test -z "$as_dir" && as_dir=.
10690    for ac_exec_ext in '' $ac_executable_extensions; do
10691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10692    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10694    break 2
10695  fi
10696done
10697  done
10698IFS=$as_save_IFS
10699
10700  ;;
10701esac
10702fi
10703SH=$ac_cv_path_SH
10704if test -n "$SH"; then
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10706$as_echo "$SH" >&6; }
10707else
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709$as_echo "no" >&6; }
10710fi
10711
10712
10713  test -n "$SH" && break
10714done
10715
10716  else
10717    # The variable is set, but is it from the command line or the environment?
10718
10719    # Try to remove the string !SH! from our list.
10720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10722      # If it failed, the variable was not from the command line. Ignore it,
10723      # but warn the user (except for BASH, which is always set by the calling BASH).
10724      if test "xSH" != xBASH; then
10725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10726$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10727      fi
10728      # Try to locate tool using the code snippet
10729      for ac_prog in sh
10730do
10731  # Extract the first word of "$ac_prog", so it can be a program name with args.
10732set dummy $ac_prog; ac_word=$2
10733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10734$as_echo_n "checking for $ac_word... " >&6; }
10735if ${ac_cv_path_SH+:} false; then :
10736  $as_echo_n "(cached) " >&6
10737else
10738  case $SH in
10739  [\\/]* | ?:[\\/]*)
10740  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10741  ;;
10742  *)
10743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10744for as_dir in $PATH
10745do
10746  IFS=$as_save_IFS
10747  test -z "$as_dir" && as_dir=.
10748    for ac_exec_ext in '' $ac_executable_extensions; do
10749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10750    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10752    break 2
10753  fi
10754done
10755  done
10756IFS=$as_save_IFS
10757
10758  ;;
10759esac
10760fi
10761SH=$ac_cv_path_SH
10762if test -n "$SH"; then
10763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10764$as_echo "$SH" >&6; }
10765else
10766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
10768fi
10769
10770
10771  test -n "$SH" && break
10772done
10773
10774    else
10775      # If it succeeded, then it was overridden by the user. We will use it
10776      # for the tool.
10777
10778      # First remove it from the list of overridden variables, so we can test
10779      # for unknown variables in the end.
10780      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10781
10782      # Check if we try to supply an empty value
10783      if test "x$SH" = x; then
10784        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10785$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10787$as_echo_n "checking for SH... " >&6; }
10788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10789$as_echo "disabled" >&6; }
10790      else
10791        # Check if the provided tool contains a complete path.
10792        tool_specified="$SH"
10793        tool_basename="${tool_specified##*/}"
10794        if test "x$tool_basename" = "x$tool_specified"; then
10795          # A command without a complete path is provided, search $PATH.
10796          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10797$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10798          # Extract the first word of "$tool_basename", so it can be a program name with args.
10799set dummy $tool_basename; ac_word=$2
10800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10801$as_echo_n "checking for $ac_word... " >&6; }
10802if ${ac_cv_path_SH+:} false; then :
10803  $as_echo_n "(cached) " >&6
10804else
10805  case $SH in
10806  [\\/]* | ?:[\\/]*)
10807  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10808  ;;
10809  *)
10810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10811for as_dir in $PATH
10812do
10813  IFS=$as_save_IFS
10814  test -z "$as_dir" && as_dir=.
10815    for ac_exec_ext in '' $ac_executable_extensions; do
10816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10817    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10819    break 2
10820  fi
10821done
10822  done
10823IFS=$as_save_IFS
10824
10825  ;;
10826esac
10827fi
10828SH=$ac_cv_path_SH
10829if test -n "$SH"; then
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10831$as_echo "$SH" >&6; }
10832else
10833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834$as_echo "no" >&6; }
10835fi
10836
10837
10838          if test "x$SH" = x; then
10839            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10840          fi
10841        else
10842          # Otherwise we believe it is a complete path. Use it as it is.
10843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10844$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10845          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10846$as_echo_n "checking for SH... " >&6; }
10847          if test ! -x "$tool_specified"; then
10848            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10849$as_echo "not found" >&6; }
10850            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10851          fi
10852          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10853$as_echo "$tool_specified" >&6; }
10854        fi
10855      fi
10856    fi
10857
10858  fi
10859
10860
10861
10862  if test "x$SH" = x; then
10863    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10864  fi
10865
10866
10867
10868
10869
10870  # Publish this variable in the help.
10871
10872
10873  if [ -z "${SORT+x}" ]; then
10874    # The variable is not set by user, try to locate tool using the code snippet
10875    for ac_prog in sort
10876do
10877  # Extract the first word of "$ac_prog", so it can be a program name with args.
10878set dummy $ac_prog; ac_word=$2
10879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10880$as_echo_n "checking for $ac_word... " >&6; }
10881if ${ac_cv_path_SORT+:} false; then :
10882  $as_echo_n "(cached) " >&6
10883else
10884  case $SORT in
10885  [\\/]* | ?:[\\/]*)
10886  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10887  ;;
10888  *)
10889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10890for as_dir in $PATH
10891do
10892  IFS=$as_save_IFS
10893  test -z "$as_dir" && as_dir=.
10894    for ac_exec_ext in '' $ac_executable_extensions; do
10895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10896    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10898    break 2
10899  fi
10900done
10901  done
10902IFS=$as_save_IFS
10903
10904  ;;
10905esac
10906fi
10907SORT=$ac_cv_path_SORT
10908if test -n "$SORT"; then
10909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10910$as_echo "$SORT" >&6; }
10911else
10912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10913$as_echo "no" >&6; }
10914fi
10915
10916
10917  test -n "$SORT" && break
10918done
10919
10920  else
10921    # The variable is set, but is it from the command line or the environment?
10922
10923    # Try to remove the string !SORT! from our list.
10924    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10925    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10926      # If it failed, the variable was not from the command line. Ignore it,
10927      # but warn the user (except for BASH, which is always set by the calling BASH).
10928      if test "xSORT" != xBASH; then
10929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10930$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10931      fi
10932      # Try to locate tool using the code snippet
10933      for ac_prog in sort
10934do
10935  # Extract the first word of "$ac_prog", so it can be a program name with args.
10936set dummy $ac_prog; ac_word=$2
10937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10938$as_echo_n "checking for $ac_word... " >&6; }
10939if ${ac_cv_path_SORT+:} false; then :
10940  $as_echo_n "(cached) " >&6
10941else
10942  case $SORT in
10943  [\\/]* | ?:[\\/]*)
10944  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10945  ;;
10946  *)
10947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10948for as_dir in $PATH
10949do
10950  IFS=$as_save_IFS
10951  test -z "$as_dir" && as_dir=.
10952    for ac_exec_ext in '' $ac_executable_extensions; do
10953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10954    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10956    break 2
10957  fi
10958done
10959  done
10960IFS=$as_save_IFS
10961
10962  ;;
10963esac
10964fi
10965SORT=$ac_cv_path_SORT
10966if test -n "$SORT"; then
10967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10968$as_echo "$SORT" >&6; }
10969else
10970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10971$as_echo "no" >&6; }
10972fi
10973
10974
10975  test -n "$SORT" && break
10976done
10977
10978    else
10979      # If it succeeded, then it was overridden by the user. We will use it
10980      # for the tool.
10981
10982      # First remove it from the list of overridden variables, so we can test
10983      # for unknown variables in the end.
10984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10985
10986      # Check if we try to supply an empty value
10987      if test "x$SORT" = x; then
10988        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10989$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10991$as_echo_n "checking for SORT... " >&6; }
10992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10993$as_echo "disabled" >&6; }
10994      else
10995        # Check if the provided tool contains a complete path.
10996        tool_specified="$SORT"
10997        tool_basename="${tool_specified##*/}"
10998        if test "x$tool_basename" = "x$tool_specified"; then
10999          # A command without a complete path is provided, search $PATH.
11000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11001$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11002          # Extract the first word of "$tool_basename", so it can be a program name with args.
11003set dummy $tool_basename; ac_word=$2
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11005$as_echo_n "checking for $ac_word... " >&6; }
11006if ${ac_cv_path_SORT+:} false; then :
11007  $as_echo_n "(cached) " >&6
11008else
11009  case $SORT in
11010  [\\/]* | ?:[\\/]*)
11011  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11012  ;;
11013  *)
11014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11015for as_dir in $PATH
11016do
11017  IFS=$as_save_IFS
11018  test -z "$as_dir" && as_dir=.
11019    for ac_exec_ext in '' $ac_executable_extensions; do
11020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11021    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11023    break 2
11024  fi
11025done
11026  done
11027IFS=$as_save_IFS
11028
11029  ;;
11030esac
11031fi
11032SORT=$ac_cv_path_SORT
11033if test -n "$SORT"; then
11034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11035$as_echo "$SORT" >&6; }
11036else
11037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
11039fi
11040
11041
11042          if test "x$SORT" = x; then
11043            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11044          fi
11045        else
11046          # Otherwise we believe it is a complete path. Use it as it is.
11047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11048$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11049          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11050$as_echo_n "checking for SORT... " >&6; }
11051          if test ! -x "$tool_specified"; then
11052            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11053$as_echo "not found" >&6; }
11054            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11055          fi
11056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11057$as_echo "$tool_specified" >&6; }
11058        fi
11059      fi
11060    fi
11061
11062  fi
11063
11064
11065
11066  if test "x$SORT" = x; then
11067    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11068  fi
11069
11070
11071
11072
11073
11074  # Publish this variable in the help.
11075
11076
11077  if [ -z "${TAIL+x}" ]; then
11078    # The variable is not set by user, try to locate tool using the code snippet
11079    for ac_prog in tail
11080do
11081  # Extract the first word of "$ac_prog", so it can be a program name with args.
11082set dummy $ac_prog; ac_word=$2
11083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11084$as_echo_n "checking for $ac_word... " >&6; }
11085if ${ac_cv_path_TAIL+:} false; then :
11086  $as_echo_n "(cached) " >&6
11087else
11088  case $TAIL in
11089  [\\/]* | ?:[\\/]*)
11090  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11091  ;;
11092  *)
11093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11094for as_dir in $PATH
11095do
11096  IFS=$as_save_IFS
11097  test -z "$as_dir" && as_dir=.
11098    for ac_exec_ext in '' $ac_executable_extensions; do
11099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11100    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11102    break 2
11103  fi
11104done
11105  done
11106IFS=$as_save_IFS
11107
11108  ;;
11109esac
11110fi
11111TAIL=$ac_cv_path_TAIL
11112if test -n "$TAIL"; then
11113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11114$as_echo "$TAIL" >&6; }
11115else
11116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11117$as_echo "no" >&6; }
11118fi
11119
11120
11121  test -n "$TAIL" && break
11122done
11123
11124  else
11125    # The variable is set, but is it from the command line or the environment?
11126
11127    # Try to remove the string !TAIL! from our list.
11128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11130      # If it failed, the variable was not from the command line. Ignore it,
11131      # but warn the user (except for BASH, which is always set by the calling BASH).
11132      if test "xTAIL" != xBASH; then
11133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11134$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11135      fi
11136      # Try to locate tool using the code snippet
11137      for ac_prog in tail
11138do
11139  # Extract the first word of "$ac_prog", so it can be a program name with args.
11140set dummy $ac_prog; ac_word=$2
11141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11142$as_echo_n "checking for $ac_word... " >&6; }
11143if ${ac_cv_path_TAIL+:} false; then :
11144  $as_echo_n "(cached) " >&6
11145else
11146  case $TAIL in
11147  [\\/]* | ?:[\\/]*)
11148  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11149  ;;
11150  *)
11151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11152for as_dir in $PATH
11153do
11154  IFS=$as_save_IFS
11155  test -z "$as_dir" && as_dir=.
11156    for ac_exec_ext in '' $ac_executable_extensions; do
11157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11158    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11160    break 2
11161  fi
11162done
11163  done
11164IFS=$as_save_IFS
11165
11166  ;;
11167esac
11168fi
11169TAIL=$ac_cv_path_TAIL
11170if test -n "$TAIL"; then
11171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11172$as_echo "$TAIL" >&6; }
11173else
11174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11175$as_echo "no" >&6; }
11176fi
11177
11178
11179  test -n "$TAIL" && break
11180done
11181
11182    else
11183      # If it succeeded, then it was overridden by the user. We will use it
11184      # for the tool.
11185
11186      # First remove it from the list of overridden variables, so we can test
11187      # for unknown variables in the end.
11188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11189
11190      # Check if we try to supply an empty value
11191      if test "x$TAIL" = x; then
11192        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11193$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11195$as_echo_n "checking for TAIL... " >&6; }
11196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11197$as_echo "disabled" >&6; }
11198      else
11199        # Check if the provided tool contains a complete path.
11200        tool_specified="$TAIL"
11201        tool_basename="${tool_specified##*/}"
11202        if test "x$tool_basename" = "x$tool_specified"; then
11203          # A command without a complete path is provided, search $PATH.
11204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11205$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11206          # Extract the first word of "$tool_basename", so it can be a program name with args.
11207set dummy $tool_basename; ac_word=$2
11208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11209$as_echo_n "checking for $ac_word... " >&6; }
11210if ${ac_cv_path_TAIL+:} false; then :
11211  $as_echo_n "(cached) " >&6
11212else
11213  case $TAIL in
11214  [\\/]* | ?:[\\/]*)
11215  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11216  ;;
11217  *)
11218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11219for as_dir in $PATH
11220do
11221  IFS=$as_save_IFS
11222  test -z "$as_dir" && as_dir=.
11223    for ac_exec_ext in '' $ac_executable_extensions; do
11224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11225    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11227    break 2
11228  fi
11229done
11230  done
11231IFS=$as_save_IFS
11232
11233  ;;
11234esac
11235fi
11236TAIL=$ac_cv_path_TAIL
11237if test -n "$TAIL"; then
11238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11239$as_echo "$TAIL" >&6; }
11240else
11241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11242$as_echo "no" >&6; }
11243fi
11244
11245
11246          if test "x$TAIL" = x; then
11247            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11248          fi
11249        else
11250          # Otherwise we believe it is a complete path. Use it as it is.
11251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11252$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11253          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11254$as_echo_n "checking for TAIL... " >&6; }
11255          if test ! -x "$tool_specified"; then
11256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11257$as_echo "not found" >&6; }
11258            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11259          fi
11260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11261$as_echo "$tool_specified" >&6; }
11262        fi
11263      fi
11264    fi
11265
11266  fi
11267
11268
11269
11270  if test "x$TAIL" = x; then
11271    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11272  fi
11273
11274
11275
11276
11277
11278  # Publish this variable in the help.
11279
11280
11281  if [ -z "${TAR+x}" ]; then
11282    # The variable is not set by user, try to locate tool using the code snippet
11283    for ac_prog in gtar tar
11284do
11285  # Extract the first word of "$ac_prog", so it can be a program name with args.
11286set dummy $ac_prog; ac_word=$2
11287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11288$as_echo_n "checking for $ac_word... " >&6; }
11289if ${ac_cv_path_TAR+:} false; then :
11290  $as_echo_n "(cached) " >&6
11291else
11292  case $TAR in
11293  [\\/]* | ?:[\\/]*)
11294  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11295  ;;
11296  *)
11297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11298for as_dir in $PATH
11299do
11300  IFS=$as_save_IFS
11301  test -z "$as_dir" && as_dir=.
11302    for ac_exec_ext in '' $ac_executable_extensions; do
11303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11304    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11306    break 2
11307  fi
11308done
11309  done
11310IFS=$as_save_IFS
11311
11312  ;;
11313esac
11314fi
11315TAR=$ac_cv_path_TAR
11316if test -n "$TAR"; then
11317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11318$as_echo "$TAR" >&6; }
11319else
11320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11321$as_echo "no" >&6; }
11322fi
11323
11324
11325  test -n "$TAR" && break
11326done
11327
11328  else
11329    # The variable is set, but is it from the command line or the environment?
11330
11331    # Try to remove the string !TAR! from our list.
11332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11334      # If it failed, the variable was not from the command line. Ignore it,
11335      # but warn the user (except for BASH, which is always set by the calling BASH).
11336      if test "xTAR" != xBASH; then
11337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11338$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11339      fi
11340      # Try to locate tool using the code snippet
11341      for ac_prog in gtar tar
11342do
11343  # Extract the first word of "$ac_prog", so it can be a program name with args.
11344set dummy $ac_prog; ac_word=$2
11345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11346$as_echo_n "checking for $ac_word... " >&6; }
11347if ${ac_cv_path_TAR+:} false; then :
11348  $as_echo_n "(cached) " >&6
11349else
11350  case $TAR in
11351  [\\/]* | ?:[\\/]*)
11352  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11353  ;;
11354  *)
11355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11356for as_dir in $PATH
11357do
11358  IFS=$as_save_IFS
11359  test -z "$as_dir" && as_dir=.
11360    for ac_exec_ext in '' $ac_executable_extensions; do
11361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11362    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11364    break 2
11365  fi
11366done
11367  done
11368IFS=$as_save_IFS
11369
11370  ;;
11371esac
11372fi
11373TAR=$ac_cv_path_TAR
11374if test -n "$TAR"; then
11375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11376$as_echo "$TAR" >&6; }
11377else
11378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379$as_echo "no" >&6; }
11380fi
11381
11382
11383  test -n "$TAR" && break
11384done
11385
11386    else
11387      # If it succeeded, then it was overridden by the user. We will use it
11388      # for the tool.
11389
11390      # First remove it from the list of overridden variables, so we can test
11391      # for unknown variables in the end.
11392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11393
11394      # Check if we try to supply an empty value
11395      if test "x$TAR" = x; then
11396        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11397$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11399$as_echo_n "checking for TAR... " >&6; }
11400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11401$as_echo "disabled" >&6; }
11402      else
11403        # Check if the provided tool contains a complete path.
11404        tool_specified="$TAR"
11405        tool_basename="${tool_specified##*/}"
11406        if test "x$tool_basename" = "x$tool_specified"; then
11407          # A command without a complete path is provided, search $PATH.
11408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11409$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11410          # Extract the first word of "$tool_basename", so it can be a program name with args.
11411set dummy $tool_basename; ac_word=$2
11412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11413$as_echo_n "checking for $ac_word... " >&6; }
11414if ${ac_cv_path_TAR+:} false; then :
11415  $as_echo_n "(cached) " >&6
11416else
11417  case $TAR in
11418  [\\/]* | ?:[\\/]*)
11419  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11420  ;;
11421  *)
11422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11423for as_dir in $PATH
11424do
11425  IFS=$as_save_IFS
11426  test -z "$as_dir" && as_dir=.
11427    for ac_exec_ext in '' $ac_executable_extensions; do
11428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11429    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11431    break 2
11432  fi
11433done
11434  done
11435IFS=$as_save_IFS
11436
11437  ;;
11438esac
11439fi
11440TAR=$ac_cv_path_TAR
11441if test -n "$TAR"; then
11442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11443$as_echo "$TAR" >&6; }
11444else
11445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
11447fi
11448
11449
11450          if test "x$TAR" = x; then
11451            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11452          fi
11453        else
11454          # Otherwise we believe it is a complete path. Use it as it is.
11455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11456$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11457          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11458$as_echo_n "checking for TAR... " >&6; }
11459          if test ! -x "$tool_specified"; then
11460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11461$as_echo "not found" >&6; }
11462            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11463          fi
11464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11465$as_echo "$tool_specified" >&6; }
11466        fi
11467      fi
11468    fi
11469
11470  fi
11471
11472
11473
11474  if test "x$TAR" = x; then
11475    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11476  fi
11477
11478
11479
11480
11481
11482  # Publish this variable in the help.
11483
11484
11485  if [ -z "${TEE+x}" ]; then
11486    # The variable is not set by user, try to locate tool using the code snippet
11487    for ac_prog in tee
11488do
11489  # Extract the first word of "$ac_prog", so it can be a program name with args.
11490set dummy $ac_prog; ac_word=$2
11491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11492$as_echo_n "checking for $ac_word... " >&6; }
11493if ${ac_cv_path_TEE+:} false; then :
11494  $as_echo_n "(cached) " >&6
11495else
11496  case $TEE in
11497  [\\/]* | ?:[\\/]*)
11498  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11499  ;;
11500  *)
11501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11502for as_dir in $PATH
11503do
11504  IFS=$as_save_IFS
11505  test -z "$as_dir" && as_dir=.
11506    for ac_exec_ext in '' $ac_executable_extensions; do
11507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11508    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11510    break 2
11511  fi
11512done
11513  done
11514IFS=$as_save_IFS
11515
11516  ;;
11517esac
11518fi
11519TEE=$ac_cv_path_TEE
11520if test -n "$TEE"; then
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11522$as_echo "$TEE" >&6; }
11523else
11524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
11526fi
11527
11528
11529  test -n "$TEE" && break
11530done
11531
11532  else
11533    # The variable is set, but is it from the command line or the environment?
11534
11535    # Try to remove the string !TEE! from our list.
11536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11538      # If it failed, the variable was not from the command line. Ignore it,
11539      # but warn the user (except for BASH, which is always set by the calling BASH).
11540      if test "xTEE" != xBASH; then
11541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11542$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11543      fi
11544      # Try to locate tool using the code snippet
11545      for ac_prog in tee
11546do
11547  # Extract the first word of "$ac_prog", so it can be a program name with args.
11548set dummy $ac_prog; ac_word=$2
11549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11550$as_echo_n "checking for $ac_word... " >&6; }
11551if ${ac_cv_path_TEE+:} false; then :
11552  $as_echo_n "(cached) " >&6
11553else
11554  case $TEE in
11555  [\\/]* | ?:[\\/]*)
11556  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11557  ;;
11558  *)
11559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11560for as_dir in $PATH
11561do
11562  IFS=$as_save_IFS
11563  test -z "$as_dir" && as_dir=.
11564    for ac_exec_ext in '' $ac_executable_extensions; do
11565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11566    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11568    break 2
11569  fi
11570done
11571  done
11572IFS=$as_save_IFS
11573
11574  ;;
11575esac
11576fi
11577TEE=$ac_cv_path_TEE
11578if test -n "$TEE"; then
11579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11580$as_echo "$TEE" >&6; }
11581else
11582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11583$as_echo "no" >&6; }
11584fi
11585
11586
11587  test -n "$TEE" && break
11588done
11589
11590    else
11591      # If it succeeded, then it was overridden by the user. We will use it
11592      # for the tool.
11593
11594      # First remove it from the list of overridden variables, so we can test
11595      # for unknown variables in the end.
11596      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11597
11598      # Check if we try to supply an empty value
11599      if test "x$TEE" = x; then
11600        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11601$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11603$as_echo_n "checking for TEE... " >&6; }
11604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11605$as_echo "disabled" >&6; }
11606      else
11607        # Check if the provided tool contains a complete path.
11608        tool_specified="$TEE"
11609        tool_basename="${tool_specified##*/}"
11610        if test "x$tool_basename" = "x$tool_specified"; then
11611          # A command without a complete path is provided, search $PATH.
11612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11613$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11614          # Extract the first word of "$tool_basename", so it can be a program name with args.
11615set dummy $tool_basename; ac_word=$2
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11617$as_echo_n "checking for $ac_word... " >&6; }
11618if ${ac_cv_path_TEE+:} false; then :
11619  $as_echo_n "(cached) " >&6
11620else
11621  case $TEE in
11622  [\\/]* | ?:[\\/]*)
11623  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11624  ;;
11625  *)
11626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11627for as_dir in $PATH
11628do
11629  IFS=$as_save_IFS
11630  test -z "$as_dir" && as_dir=.
11631    for ac_exec_ext in '' $ac_executable_extensions; do
11632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11633    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11635    break 2
11636  fi
11637done
11638  done
11639IFS=$as_save_IFS
11640
11641  ;;
11642esac
11643fi
11644TEE=$ac_cv_path_TEE
11645if test -n "$TEE"; then
11646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11647$as_echo "$TEE" >&6; }
11648else
11649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
11651fi
11652
11653
11654          if test "x$TEE" = x; then
11655            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11656          fi
11657        else
11658          # Otherwise we believe it is a complete path. Use it as it is.
11659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11660$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11661          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11662$as_echo_n "checking for TEE... " >&6; }
11663          if test ! -x "$tool_specified"; then
11664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11665$as_echo "not found" >&6; }
11666            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11667          fi
11668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11669$as_echo "$tool_specified" >&6; }
11670        fi
11671      fi
11672    fi
11673
11674  fi
11675
11676
11677
11678  if test "x$TEE" = x; then
11679    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11680  fi
11681
11682
11683
11684
11685
11686  # Publish this variable in the help.
11687
11688
11689  if [ -z "${TOUCH+x}" ]; then
11690    # The variable is not set by user, try to locate tool using the code snippet
11691    for ac_prog in touch
11692do
11693  # Extract the first word of "$ac_prog", so it can be a program name with args.
11694set dummy $ac_prog; ac_word=$2
11695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11696$as_echo_n "checking for $ac_word... " >&6; }
11697if ${ac_cv_path_TOUCH+:} false; then :
11698  $as_echo_n "(cached) " >&6
11699else
11700  case $TOUCH in
11701  [\\/]* | ?:[\\/]*)
11702  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11703  ;;
11704  *)
11705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11706for as_dir in $PATH
11707do
11708  IFS=$as_save_IFS
11709  test -z "$as_dir" && as_dir=.
11710    for ac_exec_ext in '' $ac_executable_extensions; do
11711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11712    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11714    break 2
11715  fi
11716done
11717  done
11718IFS=$as_save_IFS
11719
11720  ;;
11721esac
11722fi
11723TOUCH=$ac_cv_path_TOUCH
11724if test -n "$TOUCH"; then
11725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11726$as_echo "$TOUCH" >&6; }
11727else
11728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11729$as_echo "no" >&6; }
11730fi
11731
11732
11733  test -n "$TOUCH" && break
11734done
11735
11736  else
11737    # The variable is set, but is it from the command line or the environment?
11738
11739    # Try to remove the string !TOUCH! from our list.
11740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11742      # If it failed, the variable was not from the command line. Ignore it,
11743      # but warn the user (except for BASH, which is always set by the calling BASH).
11744      if test "xTOUCH" != xBASH; then
11745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11746$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11747      fi
11748      # Try to locate tool using the code snippet
11749      for ac_prog in touch
11750do
11751  # Extract the first word of "$ac_prog", so it can be a program name with args.
11752set dummy $ac_prog; ac_word=$2
11753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11754$as_echo_n "checking for $ac_word... " >&6; }
11755if ${ac_cv_path_TOUCH+:} false; then :
11756  $as_echo_n "(cached) " >&6
11757else
11758  case $TOUCH in
11759  [\\/]* | ?:[\\/]*)
11760  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11761  ;;
11762  *)
11763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11764for as_dir in $PATH
11765do
11766  IFS=$as_save_IFS
11767  test -z "$as_dir" && as_dir=.
11768    for ac_exec_ext in '' $ac_executable_extensions; do
11769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11770    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11772    break 2
11773  fi
11774done
11775  done
11776IFS=$as_save_IFS
11777
11778  ;;
11779esac
11780fi
11781TOUCH=$ac_cv_path_TOUCH
11782if test -n "$TOUCH"; then
11783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11784$as_echo "$TOUCH" >&6; }
11785else
11786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11787$as_echo "no" >&6; }
11788fi
11789
11790
11791  test -n "$TOUCH" && break
11792done
11793
11794    else
11795      # If it succeeded, then it was overridden by the user. We will use it
11796      # for the tool.
11797
11798      # First remove it from the list of overridden variables, so we can test
11799      # for unknown variables in the end.
11800      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11801
11802      # Check if we try to supply an empty value
11803      if test "x$TOUCH" = x; then
11804        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11805$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11806        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11807$as_echo_n "checking for TOUCH... " >&6; }
11808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11809$as_echo "disabled" >&6; }
11810      else
11811        # Check if the provided tool contains a complete path.
11812        tool_specified="$TOUCH"
11813        tool_basename="${tool_specified##*/}"
11814        if test "x$tool_basename" = "x$tool_specified"; then
11815          # A command without a complete path is provided, search $PATH.
11816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11817$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11818          # Extract the first word of "$tool_basename", so it can be a program name with args.
11819set dummy $tool_basename; ac_word=$2
11820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11821$as_echo_n "checking for $ac_word... " >&6; }
11822if ${ac_cv_path_TOUCH+:} false; then :
11823  $as_echo_n "(cached) " >&6
11824else
11825  case $TOUCH in
11826  [\\/]* | ?:[\\/]*)
11827  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11828  ;;
11829  *)
11830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11831for as_dir in $PATH
11832do
11833  IFS=$as_save_IFS
11834  test -z "$as_dir" && as_dir=.
11835    for ac_exec_ext in '' $ac_executable_extensions; do
11836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11837    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11839    break 2
11840  fi
11841done
11842  done
11843IFS=$as_save_IFS
11844
11845  ;;
11846esac
11847fi
11848TOUCH=$ac_cv_path_TOUCH
11849if test -n "$TOUCH"; then
11850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11851$as_echo "$TOUCH" >&6; }
11852else
11853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11854$as_echo "no" >&6; }
11855fi
11856
11857
11858          if test "x$TOUCH" = x; then
11859            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11860          fi
11861        else
11862          # Otherwise we believe it is a complete path. Use it as it is.
11863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11864$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11865          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11866$as_echo_n "checking for TOUCH... " >&6; }
11867          if test ! -x "$tool_specified"; then
11868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11869$as_echo "not found" >&6; }
11870            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11871          fi
11872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11873$as_echo "$tool_specified" >&6; }
11874        fi
11875      fi
11876    fi
11877
11878  fi
11879
11880
11881
11882  if test "x$TOUCH" = x; then
11883    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11884  fi
11885
11886
11887
11888
11889
11890  # Publish this variable in the help.
11891
11892
11893  if [ -z "${TR+x}" ]; then
11894    # The variable is not set by user, try to locate tool using the code snippet
11895    for ac_prog in tr
11896do
11897  # Extract the first word of "$ac_prog", so it can be a program name with args.
11898set dummy $ac_prog; ac_word=$2
11899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11900$as_echo_n "checking for $ac_word... " >&6; }
11901if ${ac_cv_path_TR+:} false; then :
11902  $as_echo_n "(cached) " >&6
11903else
11904  case $TR in
11905  [\\/]* | ?:[\\/]*)
11906  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11907  ;;
11908  *)
11909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11910for as_dir in $PATH
11911do
11912  IFS=$as_save_IFS
11913  test -z "$as_dir" && as_dir=.
11914    for ac_exec_ext in '' $ac_executable_extensions; do
11915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11916    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11918    break 2
11919  fi
11920done
11921  done
11922IFS=$as_save_IFS
11923
11924  ;;
11925esac
11926fi
11927TR=$ac_cv_path_TR
11928if test -n "$TR"; then
11929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11930$as_echo "$TR" >&6; }
11931else
11932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11933$as_echo "no" >&6; }
11934fi
11935
11936
11937  test -n "$TR" && break
11938done
11939
11940  else
11941    # The variable is set, but is it from the command line or the environment?
11942
11943    # Try to remove the string !TR! from our list.
11944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11946      # If it failed, the variable was not from the command line. Ignore it,
11947      # but warn the user (except for BASH, which is always set by the calling BASH).
11948      if test "xTR" != xBASH; then
11949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11950$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11951      fi
11952      # Try to locate tool using the code snippet
11953      for ac_prog in tr
11954do
11955  # Extract the first word of "$ac_prog", so it can be a program name with args.
11956set dummy $ac_prog; ac_word=$2
11957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11958$as_echo_n "checking for $ac_word... " >&6; }
11959if ${ac_cv_path_TR+:} false; then :
11960  $as_echo_n "(cached) " >&6
11961else
11962  case $TR in
11963  [\\/]* | ?:[\\/]*)
11964  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11965  ;;
11966  *)
11967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11968for as_dir in $PATH
11969do
11970  IFS=$as_save_IFS
11971  test -z "$as_dir" && as_dir=.
11972    for ac_exec_ext in '' $ac_executable_extensions; do
11973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11974    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11976    break 2
11977  fi
11978done
11979  done
11980IFS=$as_save_IFS
11981
11982  ;;
11983esac
11984fi
11985TR=$ac_cv_path_TR
11986if test -n "$TR"; then
11987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11988$as_echo "$TR" >&6; }
11989else
11990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11991$as_echo "no" >&6; }
11992fi
11993
11994
11995  test -n "$TR" && break
11996done
11997
11998    else
11999      # If it succeeded, then it was overridden by the user. We will use it
12000      # for the tool.
12001
12002      # First remove it from the list of overridden variables, so we can test
12003      # for unknown variables in the end.
12004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12005
12006      # Check if we try to supply an empty value
12007      if test "x$TR" = x; then
12008        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12009$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12011$as_echo_n "checking for TR... " >&6; }
12012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12013$as_echo "disabled" >&6; }
12014      else
12015        # Check if the provided tool contains a complete path.
12016        tool_specified="$TR"
12017        tool_basename="${tool_specified##*/}"
12018        if test "x$tool_basename" = "x$tool_specified"; then
12019          # A command without a complete path is provided, search $PATH.
12020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12021$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12022          # Extract the first word of "$tool_basename", so it can be a program name with args.
12023set dummy $tool_basename; ac_word=$2
12024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12025$as_echo_n "checking for $ac_word... " >&6; }
12026if ${ac_cv_path_TR+:} false; then :
12027  $as_echo_n "(cached) " >&6
12028else
12029  case $TR in
12030  [\\/]* | ?:[\\/]*)
12031  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12032  ;;
12033  *)
12034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12035for as_dir in $PATH
12036do
12037  IFS=$as_save_IFS
12038  test -z "$as_dir" && as_dir=.
12039    for ac_exec_ext in '' $ac_executable_extensions; do
12040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12041    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12043    break 2
12044  fi
12045done
12046  done
12047IFS=$as_save_IFS
12048
12049  ;;
12050esac
12051fi
12052TR=$ac_cv_path_TR
12053if test -n "$TR"; then
12054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12055$as_echo "$TR" >&6; }
12056else
12057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
12059fi
12060
12061
12062          if test "x$TR" = x; then
12063            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12064          fi
12065        else
12066          # Otherwise we believe it is a complete path. Use it as it is.
12067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12068$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12069          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12070$as_echo_n "checking for TR... " >&6; }
12071          if test ! -x "$tool_specified"; then
12072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12073$as_echo "not found" >&6; }
12074            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12075          fi
12076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12077$as_echo "$tool_specified" >&6; }
12078        fi
12079      fi
12080    fi
12081
12082  fi
12083
12084
12085
12086  if test "x$TR" = x; then
12087    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12088  fi
12089
12090
12091
12092
12093
12094  # Publish this variable in the help.
12095
12096
12097  if [ -z "${UNAME+x}" ]; then
12098    # The variable is not set by user, try to locate tool using the code snippet
12099    for ac_prog in uname
12100do
12101  # Extract the first word of "$ac_prog", so it can be a program name with args.
12102set dummy $ac_prog; ac_word=$2
12103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12104$as_echo_n "checking for $ac_word... " >&6; }
12105if ${ac_cv_path_UNAME+:} false; then :
12106  $as_echo_n "(cached) " >&6
12107else
12108  case $UNAME in
12109  [\\/]* | ?:[\\/]*)
12110  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12111  ;;
12112  *)
12113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12114for as_dir in $PATH
12115do
12116  IFS=$as_save_IFS
12117  test -z "$as_dir" && as_dir=.
12118    for ac_exec_ext in '' $ac_executable_extensions; do
12119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12120    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12122    break 2
12123  fi
12124done
12125  done
12126IFS=$as_save_IFS
12127
12128  ;;
12129esac
12130fi
12131UNAME=$ac_cv_path_UNAME
12132if test -n "$UNAME"; then
12133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12134$as_echo "$UNAME" >&6; }
12135else
12136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12137$as_echo "no" >&6; }
12138fi
12139
12140
12141  test -n "$UNAME" && break
12142done
12143
12144  else
12145    # The variable is set, but is it from the command line or the environment?
12146
12147    # Try to remove the string !UNAME! from our list.
12148    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12149    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12150      # If it failed, the variable was not from the command line. Ignore it,
12151      # but warn the user (except for BASH, which is always set by the calling BASH).
12152      if test "xUNAME" != xBASH; then
12153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12154$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12155      fi
12156      # Try to locate tool using the code snippet
12157      for ac_prog in uname
12158do
12159  # Extract the first word of "$ac_prog", so it can be a program name with args.
12160set dummy $ac_prog; ac_word=$2
12161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12162$as_echo_n "checking for $ac_word... " >&6; }
12163if ${ac_cv_path_UNAME+:} false; then :
12164  $as_echo_n "(cached) " >&6
12165else
12166  case $UNAME in
12167  [\\/]* | ?:[\\/]*)
12168  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12169  ;;
12170  *)
12171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12172for as_dir in $PATH
12173do
12174  IFS=$as_save_IFS
12175  test -z "$as_dir" && as_dir=.
12176    for ac_exec_ext in '' $ac_executable_extensions; do
12177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12178    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12180    break 2
12181  fi
12182done
12183  done
12184IFS=$as_save_IFS
12185
12186  ;;
12187esac
12188fi
12189UNAME=$ac_cv_path_UNAME
12190if test -n "$UNAME"; then
12191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12192$as_echo "$UNAME" >&6; }
12193else
12194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12195$as_echo "no" >&6; }
12196fi
12197
12198
12199  test -n "$UNAME" && break
12200done
12201
12202    else
12203      # If it succeeded, then it was overridden by the user. We will use it
12204      # for the tool.
12205
12206      # First remove it from the list of overridden variables, so we can test
12207      # for unknown variables in the end.
12208      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12209
12210      # Check if we try to supply an empty value
12211      if test "x$UNAME" = x; then
12212        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12213$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12214        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12215$as_echo_n "checking for UNAME... " >&6; }
12216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12217$as_echo "disabled" >&6; }
12218      else
12219        # Check if the provided tool contains a complete path.
12220        tool_specified="$UNAME"
12221        tool_basename="${tool_specified##*/}"
12222        if test "x$tool_basename" = "x$tool_specified"; then
12223          # A command without a complete path is provided, search $PATH.
12224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12225$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12226          # Extract the first word of "$tool_basename", so it can be a program name with args.
12227set dummy $tool_basename; ac_word=$2
12228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12229$as_echo_n "checking for $ac_word... " >&6; }
12230if ${ac_cv_path_UNAME+:} false; then :
12231  $as_echo_n "(cached) " >&6
12232else
12233  case $UNAME in
12234  [\\/]* | ?:[\\/]*)
12235  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12236  ;;
12237  *)
12238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12239for as_dir in $PATH
12240do
12241  IFS=$as_save_IFS
12242  test -z "$as_dir" && as_dir=.
12243    for ac_exec_ext in '' $ac_executable_extensions; do
12244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12245    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12247    break 2
12248  fi
12249done
12250  done
12251IFS=$as_save_IFS
12252
12253  ;;
12254esac
12255fi
12256UNAME=$ac_cv_path_UNAME
12257if test -n "$UNAME"; then
12258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12259$as_echo "$UNAME" >&6; }
12260else
12261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12262$as_echo "no" >&6; }
12263fi
12264
12265
12266          if test "x$UNAME" = x; then
12267            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12268          fi
12269        else
12270          # Otherwise we believe it is a complete path. Use it as it is.
12271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12272$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12273          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12274$as_echo_n "checking for UNAME... " >&6; }
12275          if test ! -x "$tool_specified"; then
12276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12277$as_echo "not found" >&6; }
12278            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12279          fi
12280          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12281$as_echo "$tool_specified" >&6; }
12282        fi
12283      fi
12284    fi
12285
12286  fi
12287
12288
12289
12290  if test "x$UNAME" = x; then
12291    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12292  fi
12293
12294
12295
12296
12297
12298  # Publish this variable in the help.
12299
12300
12301  if [ -z "${UNIQ+x}" ]; then
12302    # The variable is not set by user, try to locate tool using the code snippet
12303    for ac_prog in uniq
12304do
12305  # Extract the first word of "$ac_prog", so it can be a program name with args.
12306set dummy $ac_prog; ac_word=$2
12307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12308$as_echo_n "checking for $ac_word... " >&6; }
12309if ${ac_cv_path_UNIQ+:} false; then :
12310  $as_echo_n "(cached) " >&6
12311else
12312  case $UNIQ in
12313  [\\/]* | ?:[\\/]*)
12314  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12315  ;;
12316  *)
12317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12318for as_dir in $PATH
12319do
12320  IFS=$as_save_IFS
12321  test -z "$as_dir" && as_dir=.
12322    for ac_exec_ext in '' $ac_executable_extensions; do
12323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12324    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12326    break 2
12327  fi
12328done
12329  done
12330IFS=$as_save_IFS
12331
12332  ;;
12333esac
12334fi
12335UNIQ=$ac_cv_path_UNIQ
12336if test -n "$UNIQ"; then
12337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12338$as_echo "$UNIQ" >&6; }
12339else
12340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12341$as_echo "no" >&6; }
12342fi
12343
12344
12345  test -n "$UNIQ" && break
12346done
12347
12348  else
12349    # The variable is set, but is it from the command line or the environment?
12350
12351    # Try to remove the string !UNIQ! from our list.
12352    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12353    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12354      # If it failed, the variable was not from the command line. Ignore it,
12355      # but warn the user (except for BASH, which is always set by the calling BASH).
12356      if test "xUNIQ" != xBASH; then
12357        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12358$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12359      fi
12360      # Try to locate tool using the code snippet
12361      for ac_prog in uniq
12362do
12363  # Extract the first word of "$ac_prog", so it can be a program name with args.
12364set dummy $ac_prog; ac_word=$2
12365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12366$as_echo_n "checking for $ac_word... " >&6; }
12367if ${ac_cv_path_UNIQ+:} false; then :
12368  $as_echo_n "(cached) " >&6
12369else
12370  case $UNIQ in
12371  [\\/]* | ?:[\\/]*)
12372  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12373  ;;
12374  *)
12375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12376for as_dir in $PATH
12377do
12378  IFS=$as_save_IFS
12379  test -z "$as_dir" && as_dir=.
12380    for ac_exec_ext in '' $ac_executable_extensions; do
12381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12382    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12384    break 2
12385  fi
12386done
12387  done
12388IFS=$as_save_IFS
12389
12390  ;;
12391esac
12392fi
12393UNIQ=$ac_cv_path_UNIQ
12394if test -n "$UNIQ"; then
12395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12396$as_echo "$UNIQ" >&6; }
12397else
12398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12399$as_echo "no" >&6; }
12400fi
12401
12402
12403  test -n "$UNIQ" && break
12404done
12405
12406    else
12407      # If it succeeded, then it was overridden by the user. We will use it
12408      # for the tool.
12409
12410      # First remove it from the list of overridden variables, so we can test
12411      # for unknown variables in the end.
12412      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12413
12414      # Check if we try to supply an empty value
12415      if test "x$UNIQ" = x; then
12416        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12417$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12419$as_echo_n "checking for UNIQ... " >&6; }
12420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12421$as_echo "disabled" >&6; }
12422      else
12423        # Check if the provided tool contains a complete path.
12424        tool_specified="$UNIQ"
12425        tool_basename="${tool_specified##*/}"
12426        if test "x$tool_basename" = "x$tool_specified"; then
12427          # A command without a complete path is provided, search $PATH.
12428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12429$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12430          # Extract the first word of "$tool_basename", so it can be a program name with args.
12431set dummy $tool_basename; ac_word=$2
12432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12433$as_echo_n "checking for $ac_word... " >&6; }
12434if ${ac_cv_path_UNIQ+:} false; then :
12435  $as_echo_n "(cached) " >&6
12436else
12437  case $UNIQ in
12438  [\\/]* | ?:[\\/]*)
12439  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12440  ;;
12441  *)
12442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12443for as_dir in $PATH
12444do
12445  IFS=$as_save_IFS
12446  test -z "$as_dir" && as_dir=.
12447    for ac_exec_ext in '' $ac_executable_extensions; do
12448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12449    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12451    break 2
12452  fi
12453done
12454  done
12455IFS=$as_save_IFS
12456
12457  ;;
12458esac
12459fi
12460UNIQ=$ac_cv_path_UNIQ
12461if test -n "$UNIQ"; then
12462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12463$as_echo "$UNIQ" >&6; }
12464else
12465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12466$as_echo "no" >&6; }
12467fi
12468
12469
12470          if test "x$UNIQ" = x; then
12471            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12472          fi
12473        else
12474          # Otherwise we believe it is a complete path. Use it as it is.
12475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12476$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12477          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12478$as_echo_n "checking for UNIQ... " >&6; }
12479          if test ! -x "$tool_specified"; then
12480            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12481$as_echo "not found" >&6; }
12482            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12483          fi
12484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12485$as_echo "$tool_specified" >&6; }
12486        fi
12487      fi
12488    fi
12489
12490  fi
12491
12492
12493
12494  if test "x$UNIQ" = x; then
12495    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12496  fi
12497
12498
12499
12500
12501
12502  # Publish this variable in the help.
12503
12504
12505  if [ -z "${WC+x}" ]; then
12506    # The variable is not set by user, try to locate tool using the code snippet
12507    for ac_prog in wc
12508do
12509  # Extract the first word of "$ac_prog", so it can be a program name with args.
12510set dummy $ac_prog; ac_word=$2
12511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12512$as_echo_n "checking for $ac_word... " >&6; }
12513if ${ac_cv_path_WC+:} false; then :
12514  $as_echo_n "(cached) " >&6
12515else
12516  case $WC in
12517  [\\/]* | ?:[\\/]*)
12518  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12519  ;;
12520  *)
12521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12522for as_dir in $PATH
12523do
12524  IFS=$as_save_IFS
12525  test -z "$as_dir" && as_dir=.
12526    for ac_exec_ext in '' $ac_executable_extensions; do
12527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12528    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12530    break 2
12531  fi
12532done
12533  done
12534IFS=$as_save_IFS
12535
12536  ;;
12537esac
12538fi
12539WC=$ac_cv_path_WC
12540if test -n "$WC"; then
12541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12542$as_echo "$WC" >&6; }
12543else
12544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12545$as_echo "no" >&6; }
12546fi
12547
12548
12549  test -n "$WC" && break
12550done
12551
12552  else
12553    # The variable is set, but is it from the command line or the environment?
12554
12555    # Try to remove the string !WC! from our list.
12556    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12557    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12558      # If it failed, the variable was not from the command line. Ignore it,
12559      # but warn the user (except for BASH, which is always set by the calling BASH).
12560      if test "xWC" != xBASH; then
12561        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12562$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12563      fi
12564      # Try to locate tool using the code snippet
12565      for ac_prog in wc
12566do
12567  # Extract the first word of "$ac_prog", so it can be a program name with args.
12568set dummy $ac_prog; ac_word=$2
12569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12570$as_echo_n "checking for $ac_word... " >&6; }
12571if ${ac_cv_path_WC+:} false; then :
12572  $as_echo_n "(cached) " >&6
12573else
12574  case $WC in
12575  [\\/]* | ?:[\\/]*)
12576  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12577  ;;
12578  *)
12579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12580for as_dir in $PATH
12581do
12582  IFS=$as_save_IFS
12583  test -z "$as_dir" && as_dir=.
12584    for ac_exec_ext in '' $ac_executable_extensions; do
12585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12586    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12588    break 2
12589  fi
12590done
12591  done
12592IFS=$as_save_IFS
12593
12594  ;;
12595esac
12596fi
12597WC=$ac_cv_path_WC
12598if test -n "$WC"; then
12599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12600$as_echo "$WC" >&6; }
12601else
12602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12603$as_echo "no" >&6; }
12604fi
12605
12606
12607  test -n "$WC" && break
12608done
12609
12610    else
12611      # If it succeeded, then it was overridden by the user. We will use it
12612      # for the tool.
12613
12614      # First remove it from the list of overridden variables, so we can test
12615      # for unknown variables in the end.
12616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12617
12618      # Check if we try to supply an empty value
12619      if test "x$WC" = x; then
12620        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12621$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12623$as_echo_n "checking for WC... " >&6; }
12624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12625$as_echo "disabled" >&6; }
12626      else
12627        # Check if the provided tool contains a complete path.
12628        tool_specified="$WC"
12629        tool_basename="${tool_specified##*/}"
12630        if test "x$tool_basename" = "x$tool_specified"; then
12631          # A command without a complete path is provided, search $PATH.
12632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12633$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12634          # Extract the first word of "$tool_basename", so it can be a program name with args.
12635set dummy $tool_basename; ac_word=$2
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12637$as_echo_n "checking for $ac_word... " >&6; }
12638if ${ac_cv_path_WC+:} false; then :
12639  $as_echo_n "(cached) " >&6
12640else
12641  case $WC in
12642  [\\/]* | ?:[\\/]*)
12643  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12644  ;;
12645  *)
12646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12647for as_dir in $PATH
12648do
12649  IFS=$as_save_IFS
12650  test -z "$as_dir" && as_dir=.
12651    for ac_exec_ext in '' $ac_executable_extensions; do
12652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12653    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12655    break 2
12656  fi
12657done
12658  done
12659IFS=$as_save_IFS
12660
12661  ;;
12662esac
12663fi
12664WC=$ac_cv_path_WC
12665if test -n "$WC"; then
12666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12667$as_echo "$WC" >&6; }
12668else
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
12671fi
12672
12673
12674          if test "x$WC" = x; then
12675            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12676          fi
12677        else
12678          # Otherwise we believe it is a complete path. Use it as it is.
12679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12680$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12681          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12682$as_echo_n "checking for WC... " >&6; }
12683          if test ! -x "$tool_specified"; then
12684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12685$as_echo "not found" >&6; }
12686            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12687          fi
12688          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12689$as_echo "$tool_specified" >&6; }
12690        fi
12691      fi
12692    fi
12693
12694  fi
12695
12696
12697
12698  if test "x$WC" = x; then
12699    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12700  fi
12701
12702
12703
12704
12705
12706  # Publish this variable in the help.
12707
12708
12709  if [ -z "${WHICH+x}" ]; then
12710    # The variable is not set by user, try to locate tool using the code snippet
12711    for ac_prog in which
12712do
12713  # Extract the first word of "$ac_prog", so it can be a program name with args.
12714set dummy $ac_prog; ac_word=$2
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12716$as_echo_n "checking for $ac_word... " >&6; }
12717if ${ac_cv_path_WHICH+:} false; then :
12718  $as_echo_n "(cached) " >&6
12719else
12720  case $WHICH in
12721  [\\/]* | ?:[\\/]*)
12722  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12723  ;;
12724  *)
12725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12726for as_dir in $PATH
12727do
12728  IFS=$as_save_IFS
12729  test -z "$as_dir" && as_dir=.
12730    for ac_exec_ext in '' $ac_executable_extensions; do
12731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12732    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12734    break 2
12735  fi
12736done
12737  done
12738IFS=$as_save_IFS
12739
12740  ;;
12741esac
12742fi
12743WHICH=$ac_cv_path_WHICH
12744if test -n "$WHICH"; then
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12746$as_echo "$WHICH" >&6; }
12747else
12748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12749$as_echo "no" >&6; }
12750fi
12751
12752
12753  test -n "$WHICH" && break
12754done
12755
12756  else
12757    # The variable is set, but is it from the command line or the environment?
12758
12759    # Try to remove the string !WHICH! from our list.
12760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12762      # If it failed, the variable was not from the command line. Ignore it,
12763      # but warn the user (except for BASH, which is always set by the calling BASH).
12764      if test "xWHICH" != xBASH; then
12765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12766$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12767      fi
12768      # Try to locate tool using the code snippet
12769      for ac_prog in which
12770do
12771  # Extract the first word of "$ac_prog", so it can be a program name with args.
12772set dummy $ac_prog; ac_word=$2
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12774$as_echo_n "checking for $ac_word... " >&6; }
12775if ${ac_cv_path_WHICH+:} false; then :
12776  $as_echo_n "(cached) " >&6
12777else
12778  case $WHICH in
12779  [\\/]* | ?:[\\/]*)
12780  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12781  ;;
12782  *)
12783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12784for as_dir in $PATH
12785do
12786  IFS=$as_save_IFS
12787  test -z "$as_dir" && as_dir=.
12788    for ac_exec_ext in '' $ac_executable_extensions; do
12789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12790    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12792    break 2
12793  fi
12794done
12795  done
12796IFS=$as_save_IFS
12797
12798  ;;
12799esac
12800fi
12801WHICH=$ac_cv_path_WHICH
12802if test -n "$WHICH"; then
12803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12804$as_echo "$WHICH" >&6; }
12805else
12806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12807$as_echo "no" >&6; }
12808fi
12809
12810
12811  test -n "$WHICH" && break
12812done
12813
12814    else
12815      # If it succeeded, then it was overridden by the user. We will use it
12816      # for the tool.
12817
12818      # First remove it from the list of overridden variables, so we can test
12819      # for unknown variables in the end.
12820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12821
12822      # Check if we try to supply an empty value
12823      if test "x$WHICH" = x; then
12824        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12825$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12827$as_echo_n "checking for WHICH... " >&6; }
12828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12829$as_echo "disabled" >&6; }
12830      else
12831        # Check if the provided tool contains a complete path.
12832        tool_specified="$WHICH"
12833        tool_basename="${tool_specified##*/}"
12834        if test "x$tool_basename" = "x$tool_specified"; then
12835          # A command without a complete path is provided, search $PATH.
12836          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12837$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12838          # Extract the first word of "$tool_basename", so it can be a program name with args.
12839set dummy $tool_basename; ac_word=$2
12840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12841$as_echo_n "checking for $ac_word... " >&6; }
12842if ${ac_cv_path_WHICH+:} false; then :
12843  $as_echo_n "(cached) " >&6
12844else
12845  case $WHICH in
12846  [\\/]* | ?:[\\/]*)
12847  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12848  ;;
12849  *)
12850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12851for as_dir in $PATH
12852do
12853  IFS=$as_save_IFS
12854  test -z "$as_dir" && as_dir=.
12855    for ac_exec_ext in '' $ac_executable_extensions; do
12856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12857    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12859    break 2
12860  fi
12861done
12862  done
12863IFS=$as_save_IFS
12864
12865  ;;
12866esac
12867fi
12868WHICH=$ac_cv_path_WHICH
12869if test -n "$WHICH"; then
12870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12871$as_echo "$WHICH" >&6; }
12872else
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12874$as_echo "no" >&6; }
12875fi
12876
12877
12878          if test "x$WHICH" = x; then
12879            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12880          fi
12881        else
12882          # Otherwise we believe it is a complete path. Use it as it is.
12883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12884$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12885          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12886$as_echo_n "checking for WHICH... " >&6; }
12887          if test ! -x "$tool_specified"; then
12888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12889$as_echo "not found" >&6; }
12890            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12891          fi
12892          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12893$as_echo "$tool_specified" >&6; }
12894        fi
12895      fi
12896    fi
12897
12898  fi
12899
12900
12901
12902  if test "x$WHICH" = x; then
12903    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12904  fi
12905
12906
12907
12908
12909
12910  # Publish this variable in the help.
12911
12912
12913  if [ -z "${XARGS+x}" ]; then
12914    # The variable is not set by user, try to locate tool using the code snippet
12915    for ac_prog in xargs
12916do
12917  # Extract the first word of "$ac_prog", so it can be a program name with args.
12918set dummy $ac_prog; ac_word=$2
12919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12920$as_echo_n "checking for $ac_word... " >&6; }
12921if ${ac_cv_path_XARGS+:} false; then :
12922  $as_echo_n "(cached) " >&6
12923else
12924  case $XARGS in
12925  [\\/]* | ?:[\\/]*)
12926  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12927  ;;
12928  *)
12929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12930for as_dir in $PATH
12931do
12932  IFS=$as_save_IFS
12933  test -z "$as_dir" && as_dir=.
12934    for ac_exec_ext in '' $ac_executable_extensions; do
12935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12936    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12938    break 2
12939  fi
12940done
12941  done
12942IFS=$as_save_IFS
12943
12944  ;;
12945esac
12946fi
12947XARGS=$ac_cv_path_XARGS
12948if test -n "$XARGS"; then
12949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12950$as_echo "$XARGS" >&6; }
12951else
12952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12953$as_echo "no" >&6; }
12954fi
12955
12956
12957  test -n "$XARGS" && break
12958done
12959
12960  else
12961    # The variable is set, but is it from the command line or the environment?
12962
12963    # Try to remove the string !XARGS! from our list.
12964    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12965    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12966      # If it failed, the variable was not from the command line. Ignore it,
12967      # but warn the user (except for BASH, which is always set by the calling BASH).
12968      if test "xXARGS" != xBASH; then
12969        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12970$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12971      fi
12972      # Try to locate tool using the code snippet
12973      for ac_prog in xargs
12974do
12975  # Extract the first word of "$ac_prog", so it can be a program name with args.
12976set dummy $ac_prog; ac_word=$2
12977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12978$as_echo_n "checking for $ac_word... " >&6; }
12979if ${ac_cv_path_XARGS+:} false; then :
12980  $as_echo_n "(cached) " >&6
12981else
12982  case $XARGS in
12983  [\\/]* | ?:[\\/]*)
12984  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12985  ;;
12986  *)
12987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12988for as_dir in $PATH
12989do
12990  IFS=$as_save_IFS
12991  test -z "$as_dir" && as_dir=.
12992    for ac_exec_ext in '' $ac_executable_extensions; do
12993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12994    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12996    break 2
12997  fi
12998done
12999  done
13000IFS=$as_save_IFS
13001
13002  ;;
13003esac
13004fi
13005XARGS=$ac_cv_path_XARGS
13006if test -n "$XARGS"; then
13007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13008$as_echo "$XARGS" >&6; }
13009else
13010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13011$as_echo "no" >&6; }
13012fi
13013
13014
13015  test -n "$XARGS" && break
13016done
13017
13018    else
13019      # If it succeeded, then it was overridden by the user. We will use it
13020      # for the tool.
13021
13022      # First remove it from the list of overridden variables, so we can test
13023      # for unknown variables in the end.
13024      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13025
13026      # Check if we try to supply an empty value
13027      if test "x$XARGS" = x; then
13028        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13029$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13031$as_echo_n "checking for XARGS... " >&6; }
13032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13033$as_echo "disabled" >&6; }
13034      else
13035        # Check if the provided tool contains a complete path.
13036        tool_specified="$XARGS"
13037        tool_basename="${tool_specified##*/}"
13038        if test "x$tool_basename" = "x$tool_specified"; then
13039          # A command without a complete path is provided, search $PATH.
13040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13041$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13042          # Extract the first word of "$tool_basename", so it can be a program name with args.
13043set dummy $tool_basename; ac_word=$2
13044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13045$as_echo_n "checking for $ac_word... " >&6; }
13046if ${ac_cv_path_XARGS+:} false; then :
13047  $as_echo_n "(cached) " >&6
13048else
13049  case $XARGS in
13050  [\\/]* | ?:[\\/]*)
13051  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13052  ;;
13053  *)
13054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13055for as_dir in $PATH
13056do
13057  IFS=$as_save_IFS
13058  test -z "$as_dir" && as_dir=.
13059    for ac_exec_ext in '' $ac_executable_extensions; do
13060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13061    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13063    break 2
13064  fi
13065done
13066  done
13067IFS=$as_save_IFS
13068
13069  ;;
13070esac
13071fi
13072XARGS=$ac_cv_path_XARGS
13073if test -n "$XARGS"; then
13074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13075$as_echo "$XARGS" >&6; }
13076else
13077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13078$as_echo "no" >&6; }
13079fi
13080
13081
13082          if test "x$XARGS" = x; then
13083            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13084          fi
13085        else
13086          # Otherwise we believe it is a complete path. Use it as it is.
13087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13088$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13089          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13090$as_echo_n "checking for XARGS... " >&6; }
13091          if test ! -x "$tool_specified"; then
13092            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13093$as_echo "not found" >&6; }
13094            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13095          fi
13096          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13097$as_echo "$tool_specified" >&6; }
13098        fi
13099      fi
13100    fi
13101
13102  fi
13103
13104
13105
13106  if test "x$XARGS" = x; then
13107    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13108  fi
13109
13110
13111
13112  # Then required tools that require some special treatment.
13113
13114
13115  # Publish this variable in the help.
13116
13117
13118  if [ -z "${AWK+x}" ]; then
13119    # The variable is not set by user, try to locate tool using the code snippet
13120    for ac_prog in gawk mawk nawk awk
13121do
13122  # Extract the first word of "$ac_prog", so it can be a program name with args.
13123set dummy $ac_prog; ac_word=$2
13124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13125$as_echo_n "checking for $ac_word... " >&6; }
13126if ${ac_cv_prog_AWK+:} false; then :
13127  $as_echo_n "(cached) " >&6
13128else
13129  if test -n "$AWK"; then
13130  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13131else
13132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13133for as_dir in $PATH
13134do
13135  IFS=$as_save_IFS
13136  test -z "$as_dir" && as_dir=.
13137    for ac_exec_ext in '' $ac_executable_extensions; do
13138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13139    ac_cv_prog_AWK="$ac_prog"
13140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13141    break 2
13142  fi
13143done
13144  done
13145IFS=$as_save_IFS
13146
13147fi
13148fi
13149AWK=$ac_cv_prog_AWK
13150if test -n "$AWK"; then
13151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13152$as_echo "$AWK" >&6; }
13153else
13154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13155$as_echo "no" >&6; }
13156fi
13157
13158
13159  test -n "$AWK" && break
13160done
13161
13162  else
13163    # The variable is set, but is it from the command line or the environment?
13164
13165    # Try to remove the string !AWK! from our list.
13166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13168      # If it failed, the variable was not from the command line. Ignore it,
13169      # but warn the user (except for BASH, which is always set by the calling BASH).
13170      if test "xAWK" != xBASH; then
13171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13172$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13173      fi
13174      # Try to locate tool using the code snippet
13175      for ac_prog in gawk mawk nawk awk
13176do
13177  # Extract the first word of "$ac_prog", so it can be a program name with args.
13178set dummy $ac_prog; ac_word=$2
13179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13180$as_echo_n "checking for $ac_word... " >&6; }
13181if ${ac_cv_prog_AWK+:} false; then :
13182  $as_echo_n "(cached) " >&6
13183else
13184  if test -n "$AWK"; then
13185  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13186else
13187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13188for as_dir in $PATH
13189do
13190  IFS=$as_save_IFS
13191  test -z "$as_dir" && as_dir=.
13192    for ac_exec_ext in '' $ac_executable_extensions; do
13193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13194    ac_cv_prog_AWK="$ac_prog"
13195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13196    break 2
13197  fi
13198done
13199  done
13200IFS=$as_save_IFS
13201
13202fi
13203fi
13204AWK=$ac_cv_prog_AWK
13205if test -n "$AWK"; then
13206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13207$as_echo "$AWK" >&6; }
13208else
13209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13210$as_echo "no" >&6; }
13211fi
13212
13213
13214  test -n "$AWK" && break
13215done
13216
13217    else
13218      # If it succeeded, then it was overridden by the user. We will use it
13219      # for the tool.
13220
13221      # First remove it from the list of overridden variables, so we can test
13222      # for unknown variables in the end.
13223      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13224
13225      # Check if we try to supply an empty value
13226      if test "x$AWK" = x; then
13227        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13228$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13230$as_echo_n "checking for AWK... " >&6; }
13231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13232$as_echo "disabled" >&6; }
13233      else
13234        # Check if the provided tool contains a complete path.
13235        tool_specified="$AWK"
13236        tool_basename="${tool_specified##*/}"
13237        if test "x$tool_basename" = "x$tool_specified"; then
13238          # A command without a complete path is provided, search $PATH.
13239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13240$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13241          # Extract the first word of "$tool_basename", so it can be a program name with args.
13242set dummy $tool_basename; ac_word=$2
13243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13244$as_echo_n "checking for $ac_word... " >&6; }
13245if ${ac_cv_path_AWK+:} false; then :
13246  $as_echo_n "(cached) " >&6
13247else
13248  case $AWK in
13249  [\\/]* | ?:[\\/]*)
13250  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13251  ;;
13252  *)
13253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13254for as_dir in $PATH
13255do
13256  IFS=$as_save_IFS
13257  test -z "$as_dir" && as_dir=.
13258    for ac_exec_ext in '' $ac_executable_extensions; do
13259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13260    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13262    break 2
13263  fi
13264done
13265  done
13266IFS=$as_save_IFS
13267
13268  ;;
13269esac
13270fi
13271AWK=$ac_cv_path_AWK
13272if test -n "$AWK"; then
13273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13274$as_echo "$AWK" >&6; }
13275else
13276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13277$as_echo "no" >&6; }
13278fi
13279
13280
13281          if test "x$AWK" = x; then
13282            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13283          fi
13284        else
13285          # Otherwise we believe it is a complete path. Use it as it is.
13286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13287$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13288          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13289$as_echo_n "checking for AWK... " >&6; }
13290          if test ! -x "$tool_specified"; then
13291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13292$as_echo "not found" >&6; }
13293            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13294          fi
13295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13296$as_echo "$tool_specified" >&6; }
13297        fi
13298      fi
13299    fi
13300
13301  fi
13302
13303
13304  if test "x$AWK" = x; then
13305    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13306  fi
13307
13308
13309
13310
13311  # Publish this variable in the help.
13312
13313
13314  if [ -z "${GREP+x}" ]; then
13315    # The variable is not set by user, try to locate tool using the code snippet
13316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13317$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13318if ${ac_cv_path_GREP+:} false; then :
13319  $as_echo_n "(cached) " >&6
13320else
13321  if test -z "$GREP"; then
13322  ac_path_GREP_found=false
13323  # Loop through the user's path and test for each of PROGNAME-LIST
13324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13325for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13326do
13327  IFS=$as_save_IFS
13328  test -z "$as_dir" && as_dir=.
13329    for ac_prog in grep ggrep; do
13330    for ac_exec_ext in '' $ac_executable_extensions; do
13331      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13332      as_fn_executable_p "$ac_path_GREP" || continue
13333# Check for GNU ac_path_GREP and select it if it is found.
13334  # Check for GNU $ac_path_GREP
13335case `"$ac_path_GREP" --version 2>&1` in
13336*GNU*)
13337  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13338*)
13339  ac_count=0
13340  $as_echo_n 0123456789 >"conftest.in"
13341  while :
13342  do
13343    cat "conftest.in" "conftest.in" >"conftest.tmp"
13344    mv "conftest.tmp" "conftest.in"
13345    cp "conftest.in" "conftest.nl"
13346    $as_echo 'GREP' >> "conftest.nl"
13347    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13348    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13349    as_fn_arith $ac_count + 1 && ac_count=$as_val
13350    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13351      # Best one so far, save it but keep looking for a better one
13352      ac_cv_path_GREP="$ac_path_GREP"
13353      ac_path_GREP_max=$ac_count
13354    fi
13355    # 10*(2^10) chars as input seems more than enough
13356    test $ac_count -gt 10 && break
13357  done
13358  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13359esac
13360
13361      $ac_path_GREP_found && break 3
13362    done
13363  done
13364  done
13365IFS=$as_save_IFS
13366  if test -z "$ac_cv_path_GREP"; then
13367    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13368  fi
13369else
13370  ac_cv_path_GREP=$GREP
13371fi
13372
13373fi
13374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13375$as_echo "$ac_cv_path_GREP" >&6; }
13376 GREP="$ac_cv_path_GREP"
13377
13378
13379  else
13380    # The variable is set, but is it from the command line or the environment?
13381
13382    # Try to remove the string !GREP! from our list.
13383    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13384    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13385      # If it failed, the variable was not from the command line. Ignore it,
13386      # but warn the user (except for BASH, which is always set by the calling BASH).
13387      if test "xGREP" != xBASH; then
13388        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13389$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13390      fi
13391      # Try to locate tool using the code snippet
13392      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13393$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13394if ${ac_cv_path_GREP+:} false; then :
13395  $as_echo_n "(cached) " >&6
13396else
13397  if test -z "$GREP"; then
13398  ac_path_GREP_found=false
13399  # Loop through the user's path and test for each of PROGNAME-LIST
13400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13401for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13402do
13403  IFS=$as_save_IFS
13404  test -z "$as_dir" && as_dir=.
13405    for ac_prog in grep ggrep; do
13406    for ac_exec_ext in '' $ac_executable_extensions; do
13407      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13408      as_fn_executable_p "$ac_path_GREP" || continue
13409# Check for GNU ac_path_GREP and select it if it is found.
13410  # Check for GNU $ac_path_GREP
13411case `"$ac_path_GREP" --version 2>&1` in
13412*GNU*)
13413  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13414*)
13415  ac_count=0
13416  $as_echo_n 0123456789 >"conftest.in"
13417  while :
13418  do
13419    cat "conftest.in" "conftest.in" >"conftest.tmp"
13420    mv "conftest.tmp" "conftest.in"
13421    cp "conftest.in" "conftest.nl"
13422    $as_echo 'GREP' >> "conftest.nl"
13423    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13424    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13425    as_fn_arith $ac_count + 1 && ac_count=$as_val
13426    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13427      # Best one so far, save it but keep looking for a better one
13428      ac_cv_path_GREP="$ac_path_GREP"
13429      ac_path_GREP_max=$ac_count
13430    fi
13431    # 10*(2^10) chars as input seems more than enough
13432    test $ac_count -gt 10 && break
13433  done
13434  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13435esac
13436
13437      $ac_path_GREP_found && break 3
13438    done
13439  done
13440  done
13441IFS=$as_save_IFS
13442  if test -z "$ac_cv_path_GREP"; then
13443    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13444  fi
13445else
13446  ac_cv_path_GREP=$GREP
13447fi
13448
13449fi
13450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13451$as_echo "$ac_cv_path_GREP" >&6; }
13452 GREP="$ac_cv_path_GREP"
13453
13454
13455    else
13456      # If it succeeded, then it was overridden by the user. We will use it
13457      # for the tool.
13458
13459      # First remove it from the list of overridden variables, so we can test
13460      # for unknown variables in the end.
13461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13462
13463      # Check if we try to supply an empty value
13464      if test "x$GREP" = x; then
13465        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13466$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13468$as_echo_n "checking for GREP... " >&6; }
13469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13470$as_echo "disabled" >&6; }
13471      else
13472        # Check if the provided tool contains a complete path.
13473        tool_specified="$GREP"
13474        tool_basename="${tool_specified##*/}"
13475        if test "x$tool_basename" = "x$tool_specified"; then
13476          # A command without a complete path is provided, search $PATH.
13477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13478$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13479          # Extract the first word of "$tool_basename", so it can be a program name with args.
13480set dummy $tool_basename; ac_word=$2
13481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13482$as_echo_n "checking for $ac_word... " >&6; }
13483if ${ac_cv_path_GREP+:} false; then :
13484  $as_echo_n "(cached) " >&6
13485else
13486  case $GREP in
13487  [\\/]* | ?:[\\/]*)
13488  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13489  ;;
13490  *)
13491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13492for as_dir in $PATH
13493do
13494  IFS=$as_save_IFS
13495  test -z "$as_dir" && as_dir=.
13496    for ac_exec_ext in '' $ac_executable_extensions; do
13497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13498    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13500    break 2
13501  fi
13502done
13503  done
13504IFS=$as_save_IFS
13505
13506  ;;
13507esac
13508fi
13509GREP=$ac_cv_path_GREP
13510if test -n "$GREP"; then
13511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13512$as_echo "$GREP" >&6; }
13513else
13514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13515$as_echo "no" >&6; }
13516fi
13517
13518
13519          if test "x$GREP" = x; then
13520            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13521          fi
13522        else
13523          # Otherwise we believe it is a complete path. Use it as it is.
13524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13525$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13527$as_echo_n "checking for GREP... " >&6; }
13528          if test ! -x "$tool_specified"; then
13529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13530$as_echo "not found" >&6; }
13531            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13532          fi
13533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13534$as_echo "$tool_specified" >&6; }
13535        fi
13536      fi
13537    fi
13538
13539  fi
13540
13541
13542  if test "x$GREP" = x; then
13543    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13544  fi
13545
13546
13547
13548
13549  # Publish this variable in the help.
13550
13551
13552  if [ -z "${EGREP+x}" ]; then
13553    # The variable is not set by user, try to locate tool using the code snippet
13554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13555$as_echo_n "checking for egrep... " >&6; }
13556if ${ac_cv_path_EGREP+:} false; then :
13557  $as_echo_n "(cached) " >&6
13558else
13559  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13560   then ac_cv_path_EGREP="$GREP -E"
13561   else
13562     if test -z "$EGREP"; then
13563  ac_path_EGREP_found=false
13564  # Loop through the user's path and test for each of PROGNAME-LIST
13565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13566for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13567do
13568  IFS=$as_save_IFS
13569  test -z "$as_dir" && as_dir=.
13570    for ac_prog in egrep; do
13571    for ac_exec_ext in '' $ac_executable_extensions; do
13572      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13573      as_fn_executable_p "$ac_path_EGREP" || continue
13574# Check for GNU ac_path_EGREP and select it if it is found.
13575  # Check for GNU $ac_path_EGREP
13576case `"$ac_path_EGREP" --version 2>&1` in
13577*GNU*)
13578  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13579*)
13580  ac_count=0
13581  $as_echo_n 0123456789 >"conftest.in"
13582  while :
13583  do
13584    cat "conftest.in" "conftest.in" >"conftest.tmp"
13585    mv "conftest.tmp" "conftest.in"
13586    cp "conftest.in" "conftest.nl"
13587    $as_echo 'EGREP' >> "conftest.nl"
13588    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13589    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13590    as_fn_arith $ac_count + 1 && ac_count=$as_val
13591    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13592      # Best one so far, save it but keep looking for a better one
13593      ac_cv_path_EGREP="$ac_path_EGREP"
13594      ac_path_EGREP_max=$ac_count
13595    fi
13596    # 10*(2^10) chars as input seems more than enough
13597    test $ac_count -gt 10 && break
13598  done
13599  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13600esac
13601
13602      $ac_path_EGREP_found && break 3
13603    done
13604  done
13605  done
13606IFS=$as_save_IFS
13607  if test -z "$ac_cv_path_EGREP"; then
13608    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13609  fi
13610else
13611  ac_cv_path_EGREP=$EGREP
13612fi
13613
13614   fi
13615fi
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13617$as_echo "$ac_cv_path_EGREP" >&6; }
13618 EGREP="$ac_cv_path_EGREP"
13619
13620
13621  else
13622    # The variable is set, but is it from the command line or the environment?
13623
13624    # Try to remove the string !EGREP! from our list.
13625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13627      # If it failed, the variable was not from the command line. Ignore it,
13628      # but warn the user (except for BASH, which is always set by the calling BASH).
13629      if test "xEGREP" != xBASH; then
13630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13631$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13632      fi
13633      # Try to locate tool using the code snippet
13634      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13635$as_echo_n "checking for egrep... " >&6; }
13636if ${ac_cv_path_EGREP+:} false; then :
13637  $as_echo_n "(cached) " >&6
13638else
13639  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13640   then ac_cv_path_EGREP="$GREP -E"
13641   else
13642     if test -z "$EGREP"; then
13643  ac_path_EGREP_found=false
13644  # Loop through the user's path and test for each of PROGNAME-LIST
13645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13646for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13647do
13648  IFS=$as_save_IFS
13649  test -z "$as_dir" && as_dir=.
13650    for ac_prog in egrep; do
13651    for ac_exec_ext in '' $ac_executable_extensions; do
13652      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13653      as_fn_executable_p "$ac_path_EGREP" || continue
13654# Check for GNU ac_path_EGREP and select it if it is found.
13655  # Check for GNU $ac_path_EGREP
13656case `"$ac_path_EGREP" --version 2>&1` in
13657*GNU*)
13658  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13659*)
13660  ac_count=0
13661  $as_echo_n 0123456789 >"conftest.in"
13662  while :
13663  do
13664    cat "conftest.in" "conftest.in" >"conftest.tmp"
13665    mv "conftest.tmp" "conftest.in"
13666    cp "conftest.in" "conftest.nl"
13667    $as_echo 'EGREP' >> "conftest.nl"
13668    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13669    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13670    as_fn_arith $ac_count + 1 && ac_count=$as_val
13671    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13672      # Best one so far, save it but keep looking for a better one
13673      ac_cv_path_EGREP="$ac_path_EGREP"
13674      ac_path_EGREP_max=$ac_count
13675    fi
13676    # 10*(2^10) chars as input seems more than enough
13677    test $ac_count -gt 10 && break
13678  done
13679  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13680esac
13681
13682      $ac_path_EGREP_found && break 3
13683    done
13684  done
13685  done
13686IFS=$as_save_IFS
13687  if test -z "$ac_cv_path_EGREP"; then
13688    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13689  fi
13690else
13691  ac_cv_path_EGREP=$EGREP
13692fi
13693
13694   fi
13695fi
13696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13697$as_echo "$ac_cv_path_EGREP" >&6; }
13698 EGREP="$ac_cv_path_EGREP"
13699
13700
13701    else
13702      # If it succeeded, then it was overridden by the user. We will use it
13703      # for the tool.
13704
13705      # First remove it from the list of overridden variables, so we can test
13706      # for unknown variables in the end.
13707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13708
13709      # Check if we try to supply an empty value
13710      if test "x$EGREP" = x; then
13711        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13712$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13714$as_echo_n "checking for EGREP... " >&6; }
13715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13716$as_echo "disabled" >&6; }
13717      else
13718        # Check if the provided tool contains a complete path.
13719        tool_specified="$EGREP"
13720        tool_basename="${tool_specified##*/}"
13721        if test "x$tool_basename" = "x$tool_specified"; then
13722          # A command without a complete path is provided, search $PATH.
13723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13724$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13725          # Extract the first word of "$tool_basename", so it can be a program name with args.
13726set dummy $tool_basename; ac_word=$2
13727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13728$as_echo_n "checking for $ac_word... " >&6; }
13729if ${ac_cv_path_EGREP+:} false; then :
13730  $as_echo_n "(cached) " >&6
13731else
13732  case $EGREP in
13733  [\\/]* | ?:[\\/]*)
13734  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13735  ;;
13736  *)
13737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13738for as_dir in $PATH
13739do
13740  IFS=$as_save_IFS
13741  test -z "$as_dir" && as_dir=.
13742    for ac_exec_ext in '' $ac_executable_extensions; do
13743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13744    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13746    break 2
13747  fi
13748done
13749  done
13750IFS=$as_save_IFS
13751
13752  ;;
13753esac
13754fi
13755EGREP=$ac_cv_path_EGREP
13756if test -n "$EGREP"; then
13757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13758$as_echo "$EGREP" >&6; }
13759else
13760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13761$as_echo "no" >&6; }
13762fi
13763
13764
13765          if test "x$EGREP" = x; then
13766            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13767          fi
13768        else
13769          # Otherwise we believe it is a complete path. Use it as it is.
13770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13771$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13772          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13773$as_echo_n "checking for EGREP... " >&6; }
13774          if test ! -x "$tool_specified"; then
13775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13776$as_echo "not found" >&6; }
13777            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13778          fi
13779          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13780$as_echo "$tool_specified" >&6; }
13781        fi
13782      fi
13783    fi
13784
13785  fi
13786
13787
13788  if test "x$EGREP" = x; then
13789    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13790  fi
13791
13792
13793
13794
13795  # Publish this variable in the help.
13796
13797
13798  if [ -z "${FGREP+x}" ]; then
13799    # The variable is not set by user, try to locate tool using the code snippet
13800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13801$as_echo_n "checking for fgrep... " >&6; }
13802if ${ac_cv_path_FGREP+:} false; then :
13803  $as_echo_n "(cached) " >&6
13804else
13805  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13806   then ac_cv_path_FGREP="$GREP -F"
13807   else
13808     if test -z "$FGREP"; then
13809  ac_path_FGREP_found=false
13810  # Loop through the user's path and test for each of PROGNAME-LIST
13811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13812for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13813do
13814  IFS=$as_save_IFS
13815  test -z "$as_dir" && as_dir=.
13816    for ac_prog in fgrep; do
13817    for ac_exec_ext in '' $ac_executable_extensions; do
13818      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13819      as_fn_executable_p "$ac_path_FGREP" || continue
13820# Check for GNU ac_path_FGREP and select it if it is found.
13821  # Check for GNU $ac_path_FGREP
13822case `"$ac_path_FGREP" --version 2>&1` in
13823*GNU*)
13824  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13825*)
13826  ac_count=0
13827  $as_echo_n 0123456789 >"conftest.in"
13828  while :
13829  do
13830    cat "conftest.in" "conftest.in" >"conftest.tmp"
13831    mv "conftest.tmp" "conftest.in"
13832    cp "conftest.in" "conftest.nl"
13833    $as_echo 'FGREP' >> "conftest.nl"
13834    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13835    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13836    as_fn_arith $ac_count + 1 && ac_count=$as_val
13837    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13838      # Best one so far, save it but keep looking for a better one
13839      ac_cv_path_FGREP="$ac_path_FGREP"
13840      ac_path_FGREP_max=$ac_count
13841    fi
13842    # 10*(2^10) chars as input seems more than enough
13843    test $ac_count -gt 10 && break
13844  done
13845  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13846esac
13847
13848      $ac_path_FGREP_found && break 3
13849    done
13850  done
13851  done
13852IFS=$as_save_IFS
13853  if test -z "$ac_cv_path_FGREP"; then
13854    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13855  fi
13856else
13857  ac_cv_path_FGREP=$FGREP
13858fi
13859
13860   fi
13861fi
13862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13863$as_echo "$ac_cv_path_FGREP" >&6; }
13864 FGREP="$ac_cv_path_FGREP"
13865
13866
13867  else
13868    # The variable is set, but is it from the command line or the environment?
13869
13870    # Try to remove the string !FGREP! from our list.
13871    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13872    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13873      # If it failed, the variable was not from the command line. Ignore it,
13874      # but warn the user (except for BASH, which is always set by the calling BASH).
13875      if test "xFGREP" != xBASH; then
13876        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13877$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13878      fi
13879      # Try to locate tool using the code snippet
13880      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13881$as_echo_n "checking for fgrep... " >&6; }
13882if ${ac_cv_path_FGREP+:} false; then :
13883  $as_echo_n "(cached) " >&6
13884else
13885  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13886   then ac_cv_path_FGREP="$GREP -F"
13887   else
13888     if test -z "$FGREP"; then
13889  ac_path_FGREP_found=false
13890  # Loop through the user's path and test for each of PROGNAME-LIST
13891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13892for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13893do
13894  IFS=$as_save_IFS
13895  test -z "$as_dir" && as_dir=.
13896    for ac_prog in fgrep; do
13897    for ac_exec_ext in '' $ac_executable_extensions; do
13898      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13899      as_fn_executable_p "$ac_path_FGREP" || continue
13900# Check for GNU ac_path_FGREP and select it if it is found.
13901  # Check for GNU $ac_path_FGREP
13902case `"$ac_path_FGREP" --version 2>&1` in
13903*GNU*)
13904  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13905*)
13906  ac_count=0
13907  $as_echo_n 0123456789 >"conftest.in"
13908  while :
13909  do
13910    cat "conftest.in" "conftest.in" >"conftest.tmp"
13911    mv "conftest.tmp" "conftest.in"
13912    cp "conftest.in" "conftest.nl"
13913    $as_echo 'FGREP' >> "conftest.nl"
13914    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13915    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13916    as_fn_arith $ac_count + 1 && ac_count=$as_val
13917    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13918      # Best one so far, save it but keep looking for a better one
13919      ac_cv_path_FGREP="$ac_path_FGREP"
13920      ac_path_FGREP_max=$ac_count
13921    fi
13922    # 10*(2^10) chars as input seems more than enough
13923    test $ac_count -gt 10 && break
13924  done
13925  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13926esac
13927
13928      $ac_path_FGREP_found && break 3
13929    done
13930  done
13931  done
13932IFS=$as_save_IFS
13933  if test -z "$ac_cv_path_FGREP"; then
13934    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13935  fi
13936else
13937  ac_cv_path_FGREP=$FGREP
13938fi
13939
13940   fi
13941fi
13942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13943$as_echo "$ac_cv_path_FGREP" >&6; }
13944 FGREP="$ac_cv_path_FGREP"
13945
13946
13947    else
13948      # If it succeeded, then it was overridden by the user. We will use it
13949      # for the tool.
13950
13951      # First remove it from the list of overridden variables, so we can test
13952      # for unknown variables in the end.
13953      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13954
13955      # Check if we try to supply an empty value
13956      if test "x$FGREP" = x; then
13957        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13958$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13960$as_echo_n "checking for FGREP... " >&6; }
13961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13962$as_echo "disabled" >&6; }
13963      else
13964        # Check if the provided tool contains a complete path.
13965        tool_specified="$FGREP"
13966        tool_basename="${tool_specified##*/}"
13967        if test "x$tool_basename" = "x$tool_specified"; then
13968          # A command without a complete path is provided, search $PATH.
13969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13970$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13971          # Extract the first word of "$tool_basename", so it can be a program name with args.
13972set dummy $tool_basename; ac_word=$2
13973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13974$as_echo_n "checking for $ac_word... " >&6; }
13975if ${ac_cv_path_FGREP+:} false; then :
13976  $as_echo_n "(cached) " >&6
13977else
13978  case $FGREP in
13979  [\\/]* | ?:[\\/]*)
13980  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13981  ;;
13982  *)
13983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13984for as_dir in $PATH
13985do
13986  IFS=$as_save_IFS
13987  test -z "$as_dir" && as_dir=.
13988    for ac_exec_ext in '' $ac_executable_extensions; do
13989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13990    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13992    break 2
13993  fi
13994done
13995  done
13996IFS=$as_save_IFS
13997
13998  ;;
13999esac
14000fi
14001FGREP=$ac_cv_path_FGREP
14002if test -n "$FGREP"; then
14003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14004$as_echo "$FGREP" >&6; }
14005else
14006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14007$as_echo "no" >&6; }
14008fi
14009
14010
14011          if test "x$FGREP" = x; then
14012            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14013          fi
14014        else
14015          # Otherwise we believe it is a complete path. Use it as it is.
14016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14017$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14018          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14019$as_echo_n "checking for FGREP... " >&6; }
14020          if test ! -x "$tool_specified"; then
14021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14022$as_echo "not found" >&6; }
14023            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14024          fi
14025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14026$as_echo "$tool_specified" >&6; }
14027        fi
14028      fi
14029    fi
14030
14031  fi
14032
14033
14034  if test "x$FGREP" = x; then
14035    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14036  fi
14037
14038
14039
14040
14041  # Publish this variable in the help.
14042
14043
14044  if [ -z "${SED+x}" ]; then
14045    # The variable is not set by user, try to locate tool using the code snippet
14046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14047$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14048if ${ac_cv_path_SED+:} false; then :
14049  $as_echo_n "(cached) " >&6
14050else
14051            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14052     for ac_i in 1 2 3 4 5 6 7; do
14053       ac_script="$ac_script$as_nl$ac_script"
14054     done
14055     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14056     { ac_script=; unset ac_script;}
14057     if test -z "$SED"; then
14058  ac_path_SED_found=false
14059  # Loop through the user's path and test for each of PROGNAME-LIST
14060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14061for as_dir in $PATH
14062do
14063  IFS=$as_save_IFS
14064  test -z "$as_dir" && as_dir=.
14065    for ac_prog in sed gsed; do
14066    for ac_exec_ext in '' $ac_executable_extensions; do
14067      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14068      as_fn_executable_p "$ac_path_SED" || continue
14069# Check for GNU ac_path_SED and select it if it is found.
14070  # Check for GNU $ac_path_SED
14071case `"$ac_path_SED" --version 2>&1` in
14072*GNU*)
14073  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14074*)
14075  ac_count=0
14076  $as_echo_n 0123456789 >"conftest.in"
14077  while :
14078  do
14079    cat "conftest.in" "conftest.in" >"conftest.tmp"
14080    mv "conftest.tmp" "conftest.in"
14081    cp "conftest.in" "conftest.nl"
14082    $as_echo '' >> "conftest.nl"
14083    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14084    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14085    as_fn_arith $ac_count + 1 && ac_count=$as_val
14086    if test $ac_count -gt ${ac_path_SED_max-0}; then
14087      # Best one so far, save it but keep looking for a better one
14088      ac_cv_path_SED="$ac_path_SED"
14089      ac_path_SED_max=$ac_count
14090    fi
14091    # 10*(2^10) chars as input seems more than enough
14092    test $ac_count -gt 10 && break
14093  done
14094  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14095esac
14096
14097      $ac_path_SED_found && break 3
14098    done
14099  done
14100  done
14101IFS=$as_save_IFS
14102  if test -z "$ac_cv_path_SED"; then
14103    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14104  fi
14105else
14106  ac_cv_path_SED=$SED
14107fi
14108
14109fi
14110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14111$as_echo "$ac_cv_path_SED" >&6; }
14112 SED="$ac_cv_path_SED"
14113  rm -f conftest.sed
14114
14115  else
14116    # The variable is set, but is it from the command line or the environment?
14117
14118    # Try to remove the string !SED! from our list.
14119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14121      # If it failed, the variable was not from the command line. Ignore it,
14122      # but warn the user (except for BASH, which is always set by the calling BASH).
14123      if test "xSED" != xBASH; then
14124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14125$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14126      fi
14127      # Try to locate tool using the code snippet
14128      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14129$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14130if ${ac_cv_path_SED+:} false; then :
14131  $as_echo_n "(cached) " >&6
14132else
14133            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14134     for ac_i in 1 2 3 4 5 6 7; do
14135       ac_script="$ac_script$as_nl$ac_script"
14136     done
14137     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14138     { ac_script=; unset ac_script;}
14139     if test -z "$SED"; then
14140  ac_path_SED_found=false
14141  # Loop through the user's path and test for each of PROGNAME-LIST
14142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14143for as_dir in $PATH
14144do
14145  IFS=$as_save_IFS
14146  test -z "$as_dir" && as_dir=.
14147    for ac_prog in sed gsed; do
14148    for ac_exec_ext in '' $ac_executable_extensions; do
14149      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14150      as_fn_executable_p "$ac_path_SED" || continue
14151# Check for GNU ac_path_SED and select it if it is found.
14152  # Check for GNU $ac_path_SED
14153case `"$ac_path_SED" --version 2>&1` in
14154*GNU*)
14155  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14156*)
14157  ac_count=0
14158  $as_echo_n 0123456789 >"conftest.in"
14159  while :
14160  do
14161    cat "conftest.in" "conftest.in" >"conftest.tmp"
14162    mv "conftest.tmp" "conftest.in"
14163    cp "conftest.in" "conftest.nl"
14164    $as_echo '' >> "conftest.nl"
14165    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14166    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14167    as_fn_arith $ac_count + 1 && ac_count=$as_val
14168    if test $ac_count -gt ${ac_path_SED_max-0}; then
14169      # Best one so far, save it but keep looking for a better one
14170      ac_cv_path_SED="$ac_path_SED"
14171      ac_path_SED_max=$ac_count
14172    fi
14173    # 10*(2^10) chars as input seems more than enough
14174    test $ac_count -gt 10 && break
14175  done
14176  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14177esac
14178
14179      $ac_path_SED_found && break 3
14180    done
14181  done
14182  done
14183IFS=$as_save_IFS
14184  if test -z "$ac_cv_path_SED"; then
14185    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14186  fi
14187else
14188  ac_cv_path_SED=$SED
14189fi
14190
14191fi
14192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14193$as_echo "$ac_cv_path_SED" >&6; }
14194 SED="$ac_cv_path_SED"
14195  rm -f conftest.sed
14196
14197    else
14198      # If it succeeded, then it was overridden by the user. We will use it
14199      # for the tool.
14200
14201      # First remove it from the list of overridden variables, so we can test
14202      # for unknown variables in the end.
14203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14204
14205      # Check if we try to supply an empty value
14206      if test "x$SED" = x; then
14207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14208$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14210$as_echo_n "checking for SED... " >&6; }
14211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14212$as_echo "disabled" >&6; }
14213      else
14214        # Check if the provided tool contains a complete path.
14215        tool_specified="$SED"
14216        tool_basename="${tool_specified##*/}"
14217        if test "x$tool_basename" = "x$tool_specified"; then
14218          # A command without a complete path is provided, search $PATH.
14219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14220$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14221          # Extract the first word of "$tool_basename", so it can be a program name with args.
14222set dummy $tool_basename; ac_word=$2
14223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14224$as_echo_n "checking for $ac_word... " >&6; }
14225if ${ac_cv_path_SED+:} false; then :
14226  $as_echo_n "(cached) " >&6
14227else
14228  case $SED in
14229  [\\/]* | ?:[\\/]*)
14230  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14231  ;;
14232  *)
14233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14234for as_dir in $PATH
14235do
14236  IFS=$as_save_IFS
14237  test -z "$as_dir" && as_dir=.
14238    for ac_exec_ext in '' $ac_executable_extensions; do
14239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14240    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14242    break 2
14243  fi
14244done
14245  done
14246IFS=$as_save_IFS
14247
14248  ;;
14249esac
14250fi
14251SED=$ac_cv_path_SED
14252if test -n "$SED"; then
14253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14254$as_echo "$SED" >&6; }
14255else
14256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14257$as_echo "no" >&6; }
14258fi
14259
14260
14261          if test "x$SED" = x; then
14262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14263          fi
14264        else
14265          # Otherwise we believe it is a complete path. Use it as it is.
14266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14267$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14269$as_echo_n "checking for SED... " >&6; }
14270          if test ! -x "$tool_specified"; then
14271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14272$as_echo "not found" >&6; }
14273            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14274          fi
14275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14276$as_echo "$tool_specified" >&6; }
14277        fi
14278      fi
14279    fi
14280
14281  fi
14282
14283
14284  if test "x$SED" = x; then
14285    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14286  fi
14287
14288
14289
14290  # Always force rm.
14291  RM="$RM -f"
14292
14293  # pwd behaves differently on various platforms and some don't support the -L flag.
14294  # Always use the bash builtin pwd to get uniform behavior.
14295  THEPWDCMD=pwd
14296
14297  # These are not required on all platforms
14298
14299
14300  # Publish this variable in the help.
14301
14302
14303  if [ -z "${CYGPATH+x}" ]; then
14304    # The variable is not set by user, try to locate tool using the code snippet
14305    for ac_prog in cygpath
14306do
14307  # Extract the first word of "$ac_prog", so it can be a program name with args.
14308set dummy $ac_prog; ac_word=$2
14309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14310$as_echo_n "checking for $ac_word... " >&6; }
14311if ${ac_cv_path_CYGPATH+:} false; then :
14312  $as_echo_n "(cached) " >&6
14313else
14314  case $CYGPATH in
14315  [\\/]* | ?:[\\/]*)
14316  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14317  ;;
14318  *)
14319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14320for as_dir in $PATH
14321do
14322  IFS=$as_save_IFS
14323  test -z "$as_dir" && as_dir=.
14324    for ac_exec_ext in '' $ac_executable_extensions; do
14325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14326    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14328    break 2
14329  fi
14330done
14331  done
14332IFS=$as_save_IFS
14333
14334  ;;
14335esac
14336fi
14337CYGPATH=$ac_cv_path_CYGPATH
14338if test -n "$CYGPATH"; then
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14340$as_echo "$CYGPATH" >&6; }
14341else
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14343$as_echo "no" >&6; }
14344fi
14345
14346
14347  test -n "$CYGPATH" && break
14348done
14349
14350  else
14351    # The variable is set, but is it from the command line or the environment?
14352
14353    # Try to remove the string !CYGPATH! from our list.
14354    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14355    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14356      # If it failed, the variable was not from the command line. Ignore it,
14357      # but warn the user (except for BASH, which is always set by the calling BASH).
14358      if test "xCYGPATH" != xBASH; then
14359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14360$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14361      fi
14362      # Try to locate tool using the code snippet
14363      for ac_prog in cygpath
14364do
14365  # Extract the first word of "$ac_prog", so it can be a program name with args.
14366set dummy $ac_prog; ac_word=$2
14367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14368$as_echo_n "checking for $ac_word... " >&6; }
14369if ${ac_cv_path_CYGPATH+:} false; then :
14370  $as_echo_n "(cached) " >&6
14371else
14372  case $CYGPATH in
14373  [\\/]* | ?:[\\/]*)
14374  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14375  ;;
14376  *)
14377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14378for as_dir in $PATH
14379do
14380  IFS=$as_save_IFS
14381  test -z "$as_dir" && as_dir=.
14382    for ac_exec_ext in '' $ac_executable_extensions; do
14383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14384    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14386    break 2
14387  fi
14388done
14389  done
14390IFS=$as_save_IFS
14391
14392  ;;
14393esac
14394fi
14395CYGPATH=$ac_cv_path_CYGPATH
14396if test -n "$CYGPATH"; then
14397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14398$as_echo "$CYGPATH" >&6; }
14399else
14400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14401$as_echo "no" >&6; }
14402fi
14403
14404
14405  test -n "$CYGPATH" && break
14406done
14407
14408    else
14409      # If it succeeded, then it was overridden by the user. We will use it
14410      # for the tool.
14411
14412      # First remove it from the list of overridden variables, so we can test
14413      # for unknown variables in the end.
14414      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14415
14416      # Check if we try to supply an empty value
14417      if test "x$CYGPATH" = x; then
14418        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14419$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14421$as_echo_n "checking for CYGPATH... " >&6; }
14422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14423$as_echo "disabled" >&6; }
14424      else
14425        # Check if the provided tool contains a complete path.
14426        tool_specified="$CYGPATH"
14427        tool_basename="${tool_specified##*/}"
14428        if test "x$tool_basename" = "x$tool_specified"; then
14429          # A command without a complete path is provided, search $PATH.
14430          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14431$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14432          # Extract the first word of "$tool_basename", so it can be a program name with args.
14433set dummy $tool_basename; ac_word=$2
14434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14435$as_echo_n "checking for $ac_word... " >&6; }
14436if ${ac_cv_path_CYGPATH+:} false; then :
14437  $as_echo_n "(cached) " >&6
14438else
14439  case $CYGPATH in
14440  [\\/]* | ?:[\\/]*)
14441  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14442  ;;
14443  *)
14444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14445for as_dir in $PATH
14446do
14447  IFS=$as_save_IFS
14448  test -z "$as_dir" && as_dir=.
14449    for ac_exec_ext in '' $ac_executable_extensions; do
14450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14451    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14453    break 2
14454  fi
14455done
14456  done
14457IFS=$as_save_IFS
14458
14459  ;;
14460esac
14461fi
14462CYGPATH=$ac_cv_path_CYGPATH
14463if test -n "$CYGPATH"; then
14464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14465$as_echo "$CYGPATH" >&6; }
14466else
14467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14468$as_echo "no" >&6; }
14469fi
14470
14471
14472          if test "x$CYGPATH" = x; then
14473            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14474          fi
14475        else
14476          # Otherwise we believe it is a complete path. Use it as it is.
14477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14478$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14479          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14480$as_echo_n "checking for CYGPATH... " >&6; }
14481          if test ! -x "$tool_specified"; then
14482            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14483$as_echo "not found" >&6; }
14484            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14485          fi
14486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14487$as_echo "$tool_specified" >&6; }
14488        fi
14489      fi
14490    fi
14491
14492  fi
14493
14494
14495
14496
14497  # Publish this variable in the help.
14498
14499
14500  if [ -z "${READLINK+x}" ]; then
14501    # The variable is not set by user, try to locate tool using the code snippet
14502    for ac_prog in greadlink readlink
14503do
14504  # Extract the first word of "$ac_prog", so it can be a program name with args.
14505set dummy $ac_prog; ac_word=$2
14506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14507$as_echo_n "checking for $ac_word... " >&6; }
14508if ${ac_cv_path_READLINK+:} false; then :
14509  $as_echo_n "(cached) " >&6
14510else
14511  case $READLINK in
14512  [\\/]* | ?:[\\/]*)
14513  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14514  ;;
14515  *)
14516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14517for as_dir in $PATH
14518do
14519  IFS=$as_save_IFS
14520  test -z "$as_dir" && as_dir=.
14521    for ac_exec_ext in '' $ac_executable_extensions; do
14522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14523    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14525    break 2
14526  fi
14527done
14528  done
14529IFS=$as_save_IFS
14530
14531  ;;
14532esac
14533fi
14534READLINK=$ac_cv_path_READLINK
14535if test -n "$READLINK"; then
14536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14537$as_echo "$READLINK" >&6; }
14538else
14539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14540$as_echo "no" >&6; }
14541fi
14542
14543
14544  test -n "$READLINK" && break
14545done
14546
14547  else
14548    # The variable is set, but is it from the command line or the environment?
14549
14550    # Try to remove the string !READLINK! from our list.
14551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14553      # If it failed, the variable was not from the command line. Ignore it,
14554      # but warn the user (except for BASH, which is always set by the calling BASH).
14555      if test "xREADLINK" != xBASH; then
14556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14557$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14558      fi
14559      # Try to locate tool using the code snippet
14560      for ac_prog in greadlink readlink
14561do
14562  # Extract the first word of "$ac_prog", so it can be a program name with args.
14563set dummy $ac_prog; ac_word=$2
14564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14565$as_echo_n "checking for $ac_word... " >&6; }
14566if ${ac_cv_path_READLINK+:} false; then :
14567  $as_echo_n "(cached) " >&6
14568else
14569  case $READLINK in
14570  [\\/]* | ?:[\\/]*)
14571  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14572  ;;
14573  *)
14574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14575for as_dir in $PATH
14576do
14577  IFS=$as_save_IFS
14578  test -z "$as_dir" && as_dir=.
14579    for ac_exec_ext in '' $ac_executable_extensions; do
14580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14581    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14583    break 2
14584  fi
14585done
14586  done
14587IFS=$as_save_IFS
14588
14589  ;;
14590esac
14591fi
14592READLINK=$ac_cv_path_READLINK
14593if test -n "$READLINK"; then
14594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14595$as_echo "$READLINK" >&6; }
14596else
14597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14598$as_echo "no" >&6; }
14599fi
14600
14601
14602  test -n "$READLINK" && break
14603done
14604
14605    else
14606      # If it succeeded, then it was overridden by the user. We will use it
14607      # for the tool.
14608
14609      # First remove it from the list of overridden variables, so we can test
14610      # for unknown variables in the end.
14611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14612
14613      # Check if we try to supply an empty value
14614      if test "x$READLINK" = x; then
14615        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14616$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14618$as_echo_n "checking for READLINK... " >&6; }
14619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14620$as_echo "disabled" >&6; }
14621      else
14622        # Check if the provided tool contains a complete path.
14623        tool_specified="$READLINK"
14624        tool_basename="${tool_specified##*/}"
14625        if test "x$tool_basename" = "x$tool_specified"; then
14626          # A command without a complete path is provided, search $PATH.
14627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14628$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14629          # Extract the first word of "$tool_basename", so it can be a program name with args.
14630set dummy $tool_basename; ac_word=$2
14631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14632$as_echo_n "checking for $ac_word... " >&6; }
14633if ${ac_cv_path_READLINK+:} false; then :
14634  $as_echo_n "(cached) " >&6
14635else
14636  case $READLINK in
14637  [\\/]* | ?:[\\/]*)
14638  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14639  ;;
14640  *)
14641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14642for as_dir in $PATH
14643do
14644  IFS=$as_save_IFS
14645  test -z "$as_dir" && as_dir=.
14646    for ac_exec_ext in '' $ac_executable_extensions; do
14647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14648    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14650    break 2
14651  fi
14652done
14653  done
14654IFS=$as_save_IFS
14655
14656  ;;
14657esac
14658fi
14659READLINK=$ac_cv_path_READLINK
14660if test -n "$READLINK"; then
14661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14662$as_echo "$READLINK" >&6; }
14663else
14664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14665$as_echo "no" >&6; }
14666fi
14667
14668
14669          if test "x$READLINK" = x; then
14670            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14671          fi
14672        else
14673          # Otherwise we believe it is a complete path. Use it as it is.
14674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14675$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14676          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14677$as_echo_n "checking for READLINK... " >&6; }
14678          if test ! -x "$tool_specified"; then
14679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14680$as_echo "not found" >&6; }
14681            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14682          fi
14683          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14684$as_echo "$tool_specified" >&6; }
14685        fi
14686      fi
14687    fi
14688
14689  fi
14690
14691
14692
14693
14694  # Publish this variable in the help.
14695
14696
14697  if [ -z "${DF+x}" ]; then
14698    # The variable is not set by user, try to locate tool using the code snippet
14699    for ac_prog in df
14700do
14701  # Extract the first word of "$ac_prog", so it can be a program name with args.
14702set dummy $ac_prog; ac_word=$2
14703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14704$as_echo_n "checking for $ac_word... " >&6; }
14705if ${ac_cv_path_DF+:} false; then :
14706  $as_echo_n "(cached) " >&6
14707else
14708  case $DF in
14709  [\\/]* | ?:[\\/]*)
14710  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14711  ;;
14712  *)
14713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14714for as_dir in $PATH
14715do
14716  IFS=$as_save_IFS
14717  test -z "$as_dir" && as_dir=.
14718    for ac_exec_ext in '' $ac_executable_extensions; do
14719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14720    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14722    break 2
14723  fi
14724done
14725  done
14726IFS=$as_save_IFS
14727
14728  ;;
14729esac
14730fi
14731DF=$ac_cv_path_DF
14732if test -n "$DF"; then
14733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14734$as_echo "$DF" >&6; }
14735else
14736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14737$as_echo "no" >&6; }
14738fi
14739
14740
14741  test -n "$DF" && break
14742done
14743
14744  else
14745    # The variable is set, but is it from the command line or the environment?
14746
14747    # Try to remove the string !DF! from our list.
14748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14750      # If it failed, the variable was not from the command line. Ignore it,
14751      # but warn the user (except for BASH, which is always set by the calling BASH).
14752      if test "xDF" != xBASH; then
14753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14754$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14755      fi
14756      # Try to locate tool using the code snippet
14757      for ac_prog in df
14758do
14759  # Extract the first word of "$ac_prog", so it can be a program name with args.
14760set dummy $ac_prog; ac_word=$2
14761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14762$as_echo_n "checking for $ac_word... " >&6; }
14763if ${ac_cv_path_DF+:} false; then :
14764  $as_echo_n "(cached) " >&6
14765else
14766  case $DF in
14767  [\\/]* | ?:[\\/]*)
14768  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14769  ;;
14770  *)
14771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14772for as_dir in $PATH
14773do
14774  IFS=$as_save_IFS
14775  test -z "$as_dir" && as_dir=.
14776    for ac_exec_ext in '' $ac_executable_extensions; do
14777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14778    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14780    break 2
14781  fi
14782done
14783  done
14784IFS=$as_save_IFS
14785
14786  ;;
14787esac
14788fi
14789DF=$ac_cv_path_DF
14790if test -n "$DF"; then
14791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14792$as_echo "$DF" >&6; }
14793else
14794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14795$as_echo "no" >&6; }
14796fi
14797
14798
14799  test -n "$DF" && break
14800done
14801
14802    else
14803      # If it succeeded, then it was overridden by the user. We will use it
14804      # for the tool.
14805
14806      # First remove it from the list of overridden variables, so we can test
14807      # for unknown variables in the end.
14808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14809
14810      # Check if we try to supply an empty value
14811      if test "x$DF" = x; then
14812        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14813$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14815$as_echo_n "checking for DF... " >&6; }
14816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14817$as_echo "disabled" >&6; }
14818      else
14819        # Check if the provided tool contains a complete path.
14820        tool_specified="$DF"
14821        tool_basename="${tool_specified##*/}"
14822        if test "x$tool_basename" = "x$tool_specified"; then
14823          # A command without a complete path is provided, search $PATH.
14824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14825$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14826          # Extract the first word of "$tool_basename", so it can be a program name with args.
14827set dummy $tool_basename; ac_word=$2
14828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14829$as_echo_n "checking for $ac_word... " >&6; }
14830if ${ac_cv_path_DF+:} false; then :
14831  $as_echo_n "(cached) " >&6
14832else
14833  case $DF in
14834  [\\/]* | ?:[\\/]*)
14835  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14836  ;;
14837  *)
14838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14839for as_dir in $PATH
14840do
14841  IFS=$as_save_IFS
14842  test -z "$as_dir" && as_dir=.
14843    for ac_exec_ext in '' $ac_executable_extensions; do
14844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14845    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14847    break 2
14848  fi
14849done
14850  done
14851IFS=$as_save_IFS
14852
14853  ;;
14854esac
14855fi
14856DF=$ac_cv_path_DF
14857if test -n "$DF"; then
14858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14859$as_echo "$DF" >&6; }
14860else
14861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14862$as_echo "no" >&6; }
14863fi
14864
14865
14866          if test "x$DF" = x; then
14867            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14868          fi
14869        else
14870          # Otherwise we believe it is a complete path. Use it as it is.
14871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14872$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14873          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14874$as_echo_n "checking for DF... " >&6; }
14875          if test ! -x "$tool_specified"; then
14876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14877$as_echo "not found" >&6; }
14878            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14879          fi
14880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14881$as_echo "$tool_specified" >&6; }
14882        fi
14883      fi
14884    fi
14885
14886  fi
14887
14888
14889
14890
14891  # Publish this variable in the help.
14892
14893
14894  if [ -z "${CPIO+x}" ]; then
14895    # The variable is not set by user, try to locate tool using the code snippet
14896    for ac_prog in cpio bsdcpio
14897do
14898  # Extract the first word of "$ac_prog", so it can be a program name with args.
14899set dummy $ac_prog; ac_word=$2
14900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14901$as_echo_n "checking for $ac_word... " >&6; }
14902if ${ac_cv_path_CPIO+:} false; then :
14903  $as_echo_n "(cached) " >&6
14904else
14905  case $CPIO in
14906  [\\/]* | ?:[\\/]*)
14907  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14908  ;;
14909  *)
14910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14911for as_dir in $PATH
14912do
14913  IFS=$as_save_IFS
14914  test -z "$as_dir" && as_dir=.
14915    for ac_exec_ext in '' $ac_executable_extensions; do
14916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14917    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14919    break 2
14920  fi
14921done
14922  done
14923IFS=$as_save_IFS
14924
14925  ;;
14926esac
14927fi
14928CPIO=$ac_cv_path_CPIO
14929if test -n "$CPIO"; then
14930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14931$as_echo "$CPIO" >&6; }
14932else
14933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14934$as_echo "no" >&6; }
14935fi
14936
14937
14938  test -n "$CPIO" && break
14939done
14940
14941  else
14942    # The variable is set, but is it from the command line or the environment?
14943
14944    # Try to remove the string !CPIO! from our list.
14945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14947      # If it failed, the variable was not from the command line. Ignore it,
14948      # but warn the user (except for BASH, which is always set by the calling BASH).
14949      if test "xCPIO" != xBASH; then
14950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14951$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14952      fi
14953      # Try to locate tool using the code snippet
14954      for ac_prog in cpio bsdcpio
14955do
14956  # Extract the first word of "$ac_prog", so it can be a program name with args.
14957set dummy $ac_prog; ac_word=$2
14958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14959$as_echo_n "checking for $ac_word... " >&6; }
14960if ${ac_cv_path_CPIO+:} false; then :
14961  $as_echo_n "(cached) " >&6
14962else
14963  case $CPIO in
14964  [\\/]* | ?:[\\/]*)
14965  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14966  ;;
14967  *)
14968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14969for as_dir in $PATH
14970do
14971  IFS=$as_save_IFS
14972  test -z "$as_dir" && as_dir=.
14973    for ac_exec_ext in '' $ac_executable_extensions; do
14974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14975    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14977    break 2
14978  fi
14979done
14980  done
14981IFS=$as_save_IFS
14982
14983  ;;
14984esac
14985fi
14986CPIO=$ac_cv_path_CPIO
14987if test -n "$CPIO"; then
14988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14989$as_echo "$CPIO" >&6; }
14990else
14991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14992$as_echo "no" >&6; }
14993fi
14994
14995
14996  test -n "$CPIO" && break
14997done
14998
14999    else
15000      # If it succeeded, then it was overridden by the user. We will use it
15001      # for the tool.
15002
15003      # First remove it from the list of overridden variables, so we can test
15004      # for unknown variables in the end.
15005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15006
15007      # Check if we try to supply an empty value
15008      if test "x$CPIO" = x; then
15009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15010$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15012$as_echo_n "checking for CPIO... " >&6; }
15013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15014$as_echo "disabled" >&6; }
15015      else
15016        # Check if the provided tool contains a complete path.
15017        tool_specified="$CPIO"
15018        tool_basename="${tool_specified##*/}"
15019        if test "x$tool_basename" = "x$tool_specified"; then
15020          # A command without a complete path is provided, search $PATH.
15021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15022$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15023          # Extract the first word of "$tool_basename", so it can be a program name with args.
15024set dummy $tool_basename; ac_word=$2
15025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15026$as_echo_n "checking for $ac_word... " >&6; }
15027if ${ac_cv_path_CPIO+:} false; then :
15028  $as_echo_n "(cached) " >&6
15029else
15030  case $CPIO in
15031  [\\/]* | ?:[\\/]*)
15032  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15033  ;;
15034  *)
15035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15036for as_dir in $PATH
15037do
15038  IFS=$as_save_IFS
15039  test -z "$as_dir" && as_dir=.
15040    for ac_exec_ext in '' $ac_executable_extensions; do
15041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15042    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15044    break 2
15045  fi
15046done
15047  done
15048IFS=$as_save_IFS
15049
15050  ;;
15051esac
15052fi
15053CPIO=$ac_cv_path_CPIO
15054if test -n "$CPIO"; then
15055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15056$as_echo "$CPIO" >&6; }
15057else
15058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15059$as_echo "no" >&6; }
15060fi
15061
15062
15063          if test "x$CPIO" = x; then
15064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15065          fi
15066        else
15067          # Otherwise we believe it is a complete path. Use it as it is.
15068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15069$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15071$as_echo_n "checking for CPIO... " >&6; }
15072          if test ! -x "$tool_specified"; then
15073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15074$as_echo "not found" >&6; }
15075            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15076          fi
15077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15078$as_echo "$tool_specified" >&6; }
15079        fi
15080      fi
15081    fi
15082
15083  fi
15084
15085
15086
15087
15088  # Publish this variable in the help.
15089
15090
15091  if [ -z "${NICE+x}" ]; then
15092    # The variable is not set by user, try to locate tool using the code snippet
15093    for ac_prog in nice
15094do
15095  # Extract the first word of "$ac_prog", so it can be a program name with args.
15096set dummy $ac_prog; ac_word=$2
15097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15098$as_echo_n "checking for $ac_word... " >&6; }
15099if ${ac_cv_path_NICE+:} false; then :
15100  $as_echo_n "(cached) " >&6
15101else
15102  case $NICE in
15103  [\\/]* | ?:[\\/]*)
15104  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15105  ;;
15106  *)
15107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15108for as_dir in $PATH
15109do
15110  IFS=$as_save_IFS
15111  test -z "$as_dir" && as_dir=.
15112    for ac_exec_ext in '' $ac_executable_extensions; do
15113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15114    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15116    break 2
15117  fi
15118done
15119  done
15120IFS=$as_save_IFS
15121
15122  ;;
15123esac
15124fi
15125NICE=$ac_cv_path_NICE
15126if test -n "$NICE"; then
15127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15128$as_echo "$NICE" >&6; }
15129else
15130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15131$as_echo "no" >&6; }
15132fi
15133
15134
15135  test -n "$NICE" && break
15136done
15137
15138  else
15139    # The variable is set, but is it from the command line or the environment?
15140
15141    # Try to remove the string !NICE! from our list.
15142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15144      # If it failed, the variable was not from the command line. Ignore it,
15145      # but warn the user (except for BASH, which is always set by the calling BASH).
15146      if test "xNICE" != xBASH; then
15147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15148$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15149      fi
15150      # Try to locate tool using the code snippet
15151      for ac_prog in nice
15152do
15153  # Extract the first word of "$ac_prog", so it can be a program name with args.
15154set dummy $ac_prog; ac_word=$2
15155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15156$as_echo_n "checking for $ac_word... " >&6; }
15157if ${ac_cv_path_NICE+:} false; then :
15158  $as_echo_n "(cached) " >&6
15159else
15160  case $NICE in
15161  [\\/]* | ?:[\\/]*)
15162  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15163  ;;
15164  *)
15165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15166for as_dir in $PATH
15167do
15168  IFS=$as_save_IFS
15169  test -z "$as_dir" && as_dir=.
15170    for ac_exec_ext in '' $ac_executable_extensions; do
15171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15172    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15174    break 2
15175  fi
15176done
15177  done
15178IFS=$as_save_IFS
15179
15180  ;;
15181esac
15182fi
15183NICE=$ac_cv_path_NICE
15184if test -n "$NICE"; then
15185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15186$as_echo "$NICE" >&6; }
15187else
15188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15189$as_echo "no" >&6; }
15190fi
15191
15192
15193  test -n "$NICE" && break
15194done
15195
15196    else
15197      # If it succeeded, then it was overridden by the user. We will use it
15198      # for the tool.
15199
15200      # First remove it from the list of overridden variables, so we can test
15201      # for unknown variables in the end.
15202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15203
15204      # Check if we try to supply an empty value
15205      if test "x$NICE" = x; then
15206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15207$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15209$as_echo_n "checking for NICE... " >&6; }
15210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15211$as_echo "disabled" >&6; }
15212      else
15213        # Check if the provided tool contains a complete path.
15214        tool_specified="$NICE"
15215        tool_basename="${tool_specified##*/}"
15216        if test "x$tool_basename" = "x$tool_specified"; then
15217          # A command without a complete path is provided, search $PATH.
15218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15219$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15220          # Extract the first word of "$tool_basename", so it can be a program name with args.
15221set dummy $tool_basename; ac_word=$2
15222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15223$as_echo_n "checking for $ac_word... " >&6; }
15224if ${ac_cv_path_NICE+:} false; then :
15225  $as_echo_n "(cached) " >&6
15226else
15227  case $NICE in
15228  [\\/]* | ?:[\\/]*)
15229  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15230  ;;
15231  *)
15232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15233for as_dir in $PATH
15234do
15235  IFS=$as_save_IFS
15236  test -z "$as_dir" && as_dir=.
15237    for ac_exec_ext in '' $ac_executable_extensions; do
15238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15239    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15241    break 2
15242  fi
15243done
15244  done
15245IFS=$as_save_IFS
15246
15247  ;;
15248esac
15249fi
15250NICE=$ac_cv_path_NICE
15251if test -n "$NICE"; then
15252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15253$as_echo "$NICE" >&6; }
15254else
15255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15256$as_echo "no" >&6; }
15257fi
15258
15259
15260          if test "x$NICE" = x; then
15261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15262          fi
15263        else
15264          # Otherwise we believe it is a complete path. Use it as it is.
15265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15266$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15268$as_echo_n "checking for NICE... " >&6; }
15269          if test ! -x "$tool_specified"; then
15270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15271$as_echo "not found" >&6; }
15272            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15273          fi
15274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15275$as_echo "$tool_specified" >&6; }
15276        fi
15277      fi
15278    fi
15279
15280  fi
15281
15282
15283
15284
15285# Now we can determine OpenJDK build and target platforms. This is required to
15286# have early on.
15287# Make sure we can run config.sub.
15288$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15289  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15290
15291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15292$as_echo_n "checking build system type... " >&6; }
15293if ${ac_cv_build+:} false; then :
15294  $as_echo_n "(cached) " >&6
15295else
15296  ac_build_alias=$build_alias
15297test "x$ac_build_alias" = x &&
15298  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15299test "x$ac_build_alias" = x &&
15300  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15301ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15302  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15303
15304fi
15305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15306$as_echo "$ac_cv_build" >&6; }
15307case $ac_cv_build in
15308*-*-*) ;;
15309*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15310esac
15311build=$ac_cv_build
15312ac_save_IFS=$IFS; IFS='-'
15313set x $ac_cv_build
15314shift
15315build_cpu=$1
15316build_vendor=$2
15317shift; shift
15318# Remember, the first character of IFS is used to create $*,
15319# except with old shells:
15320build_os=$*
15321IFS=$ac_save_IFS
15322case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15323
15324
15325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15326$as_echo_n "checking host system type... " >&6; }
15327if ${ac_cv_host+:} false; then :
15328  $as_echo_n "(cached) " >&6
15329else
15330  if test "x$host_alias" = x; then
15331  ac_cv_host=$ac_cv_build
15332else
15333  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15334    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15335fi
15336
15337fi
15338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15339$as_echo "$ac_cv_host" >&6; }
15340case $ac_cv_host in
15341*-*-*) ;;
15342*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15343esac
15344host=$ac_cv_host
15345ac_save_IFS=$IFS; IFS='-'
15346set x $ac_cv_host
15347shift
15348host_cpu=$1
15349host_vendor=$2
15350shift; shift
15351# Remember, the first character of IFS is used to create $*,
15352# except with old shells:
15353host_os=$*
15354IFS=$ac_save_IFS
15355case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15356
15357
15358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15359$as_echo_n "checking target system type... " >&6; }
15360if ${ac_cv_target+:} false; then :
15361  $as_echo_n "(cached) " >&6
15362else
15363  if test "x$target_alias" = x; then
15364  ac_cv_target=$ac_cv_host
15365else
15366  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15367    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15368fi
15369
15370fi
15371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15372$as_echo "$ac_cv_target" >&6; }
15373case $ac_cv_target in
15374*-*-*) ;;
15375*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15376esac
15377target=$ac_cv_target
15378ac_save_IFS=$IFS; IFS='-'
15379set x $ac_cv_target
15380shift
15381target_cpu=$1
15382target_vendor=$2
15383shift; shift
15384# Remember, the first character of IFS is used to create $*,
15385# except with old shells:
15386target_os=$*
15387IFS=$ac_save_IFS
15388case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15389
15390
15391# The aliases save the names the user supplied, while $host etc.
15392# will get canonicalized.
15393test -n "$target_alias" &&
15394  test "$program_prefix$program_suffix$program_transform_name" = \
15395    NONENONEs,x,x, &&
15396  program_prefix=${target_alias}-
15397
15398  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15399  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15400  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15401  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15402  # to use the configure naming style.
15403
15404
15405
15406
15407
15408  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15409  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15410  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15411  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15412  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15413  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15414
15415
15416
15417  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15418
15419  case "$build_os" in
15420    *linux*)
15421      VAR_OS=linux
15422      VAR_OS_TYPE=unix
15423      ;;
15424    *solaris*)
15425      VAR_OS=solaris
15426      VAR_OS_TYPE=unix
15427      ;;
15428    *darwin*)
15429      VAR_OS=macosx
15430      VAR_OS_TYPE=unix
15431      ;;
15432    *bsd*)
15433      VAR_OS=bsd
15434      VAR_OS_TYPE=unix
15435      ;;
15436    *cygwin*)
15437      VAR_OS=windows
15438      VAR_OS_ENV=windows.cygwin
15439      ;;
15440    *mingw*)
15441      VAR_OS=windows
15442      VAR_OS_ENV=windows.msys
15443      ;;
15444    *aix*)
15445      VAR_OS=aix
15446      VAR_OS_TYPE=unix
15447      ;;
15448    *)
15449      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15450      ;;
15451  esac
15452
15453
15454  # First argument is the cpu name from the trip/quad
15455  case "$build_cpu" in
15456    x86_64)
15457      VAR_CPU=x86_64
15458      VAR_CPU_ARCH=x86
15459      VAR_CPU_BITS=64
15460      VAR_CPU_ENDIAN=little
15461      ;;
15462    i?86)
15463      VAR_CPU=x86
15464      VAR_CPU_ARCH=x86
15465      VAR_CPU_BITS=32
15466      VAR_CPU_ENDIAN=little
15467      ;;
15468    arm*)
15469      VAR_CPU=arm
15470      VAR_CPU_ARCH=arm
15471      VAR_CPU_BITS=32
15472      VAR_CPU_ENDIAN=little
15473      ;;
15474    aarch64)
15475      VAR_CPU=aarch64
15476      VAR_CPU_ARCH=aarch64
15477      VAR_CPU_BITS=64
15478      VAR_CPU_ENDIAN=little
15479      ;;
15480    powerpc)
15481      VAR_CPU=ppc
15482      VAR_CPU_ARCH=ppc
15483      VAR_CPU_BITS=32
15484      VAR_CPU_ENDIAN=big
15485      ;;
15486    powerpc64)
15487      VAR_CPU=ppc64
15488      VAR_CPU_ARCH=ppc
15489      VAR_CPU_BITS=64
15490      VAR_CPU_ENDIAN=big
15491      ;;
15492    powerpc64le)
15493      VAR_CPU=ppc64le
15494      VAR_CPU_ARCH=ppc
15495      VAR_CPU_BITS=64
15496      VAR_CPU_ENDIAN=little
15497      ;;
15498    s390)
15499      VAR_CPU=s390
15500      VAR_CPU_ARCH=s390
15501      VAR_CPU_BITS=32
15502      VAR_CPU_ENDIAN=big
15503      ;;
15504    s390x)
15505      VAR_CPU=s390x
15506      VAR_CPU_ARCH=s390
15507      VAR_CPU_BITS=64
15508      VAR_CPU_ENDIAN=big
15509      ;;
15510    sparc)
15511      VAR_CPU=sparc
15512      VAR_CPU_ARCH=sparc
15513      VAR_CPU_BITS=32
15514      VAR_CPU_ENDIAN=big
15515      ;;
15516    sparcv9|sparc64)
15517      VAR_CPU=sparcv9
15518      VAR_CPU_ARCH=sparc
15519      VAR_CPU_BITS=64
15520      VAR_CPU_ENDIAN=big
15521      ;;
15522    *)
15523      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15524      ;;
15525  esac
15526
15527  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15528  OPENJDK_BUILD_OS="$VAR_OS"
15529  if test "x$VAR_OS_TYPE" != x; then
15530    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15531  else
15532    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15533  fi
15534  if test "x$VAR_OS_ENV" != x; then
15535    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15536  else
15537    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15538  fi
15539  OPENJDK_BUILD_CPU="$VAR_CPU"
15540  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15541  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15542  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15543
15544
15545
15546
15547
15548
15549
15550
15551  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15552$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15554$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15555
15556  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15557
15558  case "$host_os" in
15559    *linux*)
15560      VAR_OS=linux
15561      VAR_OS_TYPE=unix
15562      ;;
15563    *solaris*)
15564      VAR_OS=solaris
15565      VAR_OS_TYPE=unix
15566      ;;
15567    *darwin*)
15568      VAR_OS=macosx
15569      VAR_OS_TYPE=unix
15570      ;;
15571    *bsd*)
15572      VAR_OS=bsd
15573      VAR_OS_TYPE=unix
15574      ;;
15575    *cygwin*)
15576      VAR_OS=windows
15577      VAR_OS_ENV=windows.cygwin
15578      ;;
15579    *mingw*)
15580      VAR_OS=windows
15581      VAR_OS_ENV=windows.msys
15582      ;;
15583    *aix*)
15584      VAR_OS=aix
15585      VAR_OS_TYPE=unix
15586      ;;
15587    *)
15588      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15589      ;;
15590  esac
15591
15592
15593  # First argument is the cpu name from the trip/quad
15594  case "$host_cpu" in
15595    x86_64)
15596      VAR_CPU=x86_64
15597      VAR_CPU_ARCH=x86
15598      VAR_CPU_BITS=64
15599      VAR_CPU_ENDIAN=little
15600      ;;
15601    i?86)
15602      VAR_CPU=x86
15603      VAR_CPU_ARCH=x86
15604      VAR_CPU_BITS=32
15605      VAR_CPU_ENDIAN=little
15606      ;;
15607    arm*)
15608      VAR_CPU=arm
15609      VAR_CPU_ARCH=arm
15610      VAR_CPU_BITS=32
15611      VAR_CPU_ENDIAN=little
15612      ;;
15613    aarch64)
15614      VAR_CPU=aarch64
15615      VAR_CPU_ARCH=aarch64
15616      VAR_CPU_BITS=64
15617      VAR_CPU_ENDIAN=little
15618      ;;
15619    powerpc)
15620      VAR_CPU=ppc
15621      VAR_CPU_ARCH=ppc
15622      VAR_CPU_BITS=32
15623      VAR_CPU_ENDIAN=big
15624      ;;
15625    powerpc64)
15626      VAR_CPU=ppc64
15627      VAR_CPU_ARCH=ppc
15628      VAR_CPU_BITS=64
15629      VAR_CPU_ENDIAN=big
15630      ;;
15631    powerpc64le)
15632      VAR_CPU=ppc64le
15633      VAR_CPU_ARCH=ppc
15634      VAR_CPU_BITS=64
15635      VAR_CPU_ENDIAN=little
15636      ;;
15637    s390)
15638      VAR_CPU=s390
15639      VAR_CPU_ARCH=s390
15640      VAR_CPU_BITS=32
15641      VAR_CPU_ENDIAN=big
15642      ;;
15643    s390x)
15644      VAR_CPU=s390x
15645      VAR_CPU_ARCH=s390
15646      VAR_CPU_BITS=64
15647      VAR_CPU_ENDIAN=big
15648      ;;
15649    sparc)
15650      VAR_CPU=sparc
15651      VAR_CPU_ARCH=sparc
15652      VAR_CPU_BITS=32
15653      VAR_CPU_ENDIAN=big
15654      ;;
15655    sparcv9|sparc64)
15656      VAR_CPU=sparcv9
15657      VAR_CPU_ARCH=sparc
15658      VAR_CPU_BITS=64
15659      VAR_CPU_ENDIAN=big
15660      ;;
15661    *)
15662      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15663      ;;
15664  esac
15665
15666  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15667  OPENJDK_TARGET_OS="$VAR_OS"
15668  if test "x$VAR_OS_TYPE" != x; then
15669    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15670  else
15671    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15672  fi
15673  if test "x$VAR_OS_ENV" != x; then
15674    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15675  else
15676    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15677  fi
15678  OPENJDK_TARGET_CPU="$VAR_CPU"
15679  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15680  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15681  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15682
15683
15684
15685
15686
15687
15688
15689
15690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15691$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15693$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15694
15695
15696
15697# Check whether --with-target-bits was given.
15698if test "${with_target_bits+set}" = set; then :
15699  withval=$with_target_bits;
15700fi
15701
15702
15703  # We have three types of compiles:
15704  # native  == normal compilation, target system == build system
15705  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15706  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15707  #
15708  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15709    # We're doing a proper cross-compilation
15710    COMPILE_TYPE="cross"
15711  else
15712    COMPILE_TYPE="native"
15713  fi
15714
15715  if test "x$with_target_bits" != x; then
15716    if test "x$COMPILE_TYPE" = "xcross"; then
15717      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15718    fi
15719
15720    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15721      # A reduced build is requested
15722      COMPILE_TYPE="reduced"
15723      OPENJDK_TARGET_CPU_BITS=32
15724      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15725        OPENJDK_TARGET_CPU=x86
15726      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15727        OPENJDK_TARGET_CPU=sparc
15728      else
15729        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15730      fi
15731    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15732      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
15733    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15734      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15735$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15736    else
15737      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15738    fi
15739  fi
15740
15741
15742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15743$as_echo_n "checking compilation type... " >&6; }
15744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15745$as_echo "$COMPILE_TYPE" >&6; }
15746
15747
15748  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15749    REQUIRED_OS_NAME=SunOS
15750    REQUIRED_OS_VERSION=5.10
15751  fi
15752  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15753    REQUIRED_OS_NAME=Linux
15754    REQUIRED_OS_VERSION=2.6
15755  fi
15756  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15757    REQUIRED_OS_NAME=Windows
15758    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15759      REQUIRED_OS_VERSION=5.2
15760    else
15761      REQUIRED_OS_VERSION=5.1
15762    fi
15763  fi
15764  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15765    REQUIRED_OS_NAME=Darwin
15766    REQUIRED_OS_VERSION=11.2
15767  fi
15768  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15769    REQUIRED_OS_NAME=AIX
15770    REQUIRED_OS_VERSION=7.1
15771  fi
15772
15773
15774
15775
15776
15777
15778  # Also store the legacy naming of the cpu.
15779  # Ie i586 and amd64 instead of x86 and x86_64
15780  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15781  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15782    OPENJDK_TARGET_CPU_LEGACY="i586"
15783  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15784    # On all platforms except MacOSX replace x86_64 with amd64.
15785    OPENJDK_TARGET_CPU_LEGACY="amd64"
15786  fi
15787
15788
15789  # And the second legacy naming of the cpu.
15790  # Ie i386 and amd64 instead of x86 and x86_64.
15791  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15792  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15793    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15794  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15795    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15796  fi
15797
15798
15799  # This is the name of the cpu (but using i386 and amd64 instead of
15800  # x86 and x86_64, respectively), preceeded by a /, to be used when
15801  # locating libraries. On macosx, it's empty, though.
15802  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15803  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15804    OPENJDK_TARGET_CPU_LIBDIR=""
15805  fi
15806
15807
15808  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15809  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15810  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15811  OPENJDK_TARGET_CPU_ISADIR=""
15812  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15813    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15814      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15815    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15816      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15817    fi
15818  fi
15819
15820
15821  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15822  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15823  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15824    # On linux only, we replace x86 with i386.
15825    OPENJDK_TARGET_CPU_OSARCH="i386"
15826  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15827    # On all platforms except macosx, we replace x86_64 with amd64.
15828    OPENJDK_TARGET_CPU_OSARCH="amd64"
15829  fi
15830
15831
15832  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15833  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15834    OPENJDK_TARGET_CPU_JLI="i386"
15835  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15836    # On all platforms except macosx, we replace x86_64 with amd64.
15837    OPENJDK_TARGET_CPU_JLI="amd64"
15838  fi
15839  # Now setup the -D flags for building libjli.
15840  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15841  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15842    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15843      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15844    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15845      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15846    fi
15847  fi
15848
15849
15850  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15851      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15852  else
15853      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15854  fi
15855
15856
15857  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15858  # Macosx is osx and x86_64 is x64
15859  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15860    OPENJDK_TARGET_OS_BUNDLE="osx"
15861  else
15862    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15863  fi
15864  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15865    OPENJDK_TARGET_CPU_BUNDLE="x64"
15866  else
15867    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15868  fi
15869  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15870
15871
15872
15873
15874  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15875    A_LP64="LP64:="
15876    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15877    # unpack200.exe
15878    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15879      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15880    fi
15881  fi
15882  LP64=$A_LP64
15883
15884
15885  if test "x$COMPILE_TYPE" = "xcross"; then
15886    # FIXME: ... or should this include reduced builds..?
15887    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15888  else
15889    DEFINE_CROSS_COMPILE_ARCH=""
15890  fi
15891
15892
15893  # Convert openjdk platform names to hotspot names
15894
15895  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15896  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15897    HOTSPOT_TARGET_OS=bsd
15898  fi
15899
15900
15901  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15902  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15903    HOTSPOT_TARGET_OS_TYPE=posix
15904  fi
15905
15906
15907  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15908  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15909    HOTSPOT_TARGET_CPU=x86_32
15910  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15911    HOTSPOT_TARGET_CPU=sparc
15912  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15913    HOTSPOT_TARGET_CPU=ppc_64
15914  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15915    HOTSPOT_TARGET_CPU=ppc_64
15916  fi
15917
15918
15919  # This is identical with OPENJDK_*, but define anyway for consistency.
15920  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15921
15922
15923  # Setup HOTSPOT_TARGET_CPU_DEFINE
15924  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15925    HOTSPOT_TARGET_CPU_DEFINE=IA32
15926  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15927    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15928  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15929    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15930  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15931    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15932  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15933    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15934  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15935    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15936
15937  # The cpu defines below are for zero, we don't support them directly.
15938  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15939    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15940  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15941    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15942  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15943    HOTSPOT_TARGET_CPU_DEFINE=S390
15944  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15945    HOTSPOT_TARGET_CPU_DEFINE=S390
15946  fi
15947
15948
15949
15950
15951  # Also store the legacy naming of the cpu.
15952  # Ie i586 and amd64 instead of x86 and x86_64
15953  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15954  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15955    OPENJDK_BUILD_CPU_LEGACY="i586"
15956  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15957    # On all platforms except MacOSX replace x86_64 with amd64.
15958    OPENJDK_BUILD_CPU_LEGACY="amd64"
15959  fi
15960
15961
15962  # And the second legacy naming of the cpu.
15963  # Ie i386 and amd64 instead of x86 and x86_64.
15964  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15965  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15966    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15967  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15968    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15969  fi
15970
15971
15972  # This is the name of the cpu (but using i386 and amd64 instead of
15973  # x86 and x86_64, respectively), preceeded by a /, to be used when
15974  # locating libraries. On macosx, it's empty, though.
15975  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15976  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15977    OPENJDK_BUILD_CPU_LIBDIR=""
15978  fi
15979
15980
15981  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15982  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15983  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15984  OPENJDK_BUILD_CPU_ISADIR=""
15985  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15986    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15987      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15988    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15989      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15990    fi
15991  fi
15992
15993
15994  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15995  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15996  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15997    # On linux only, we replace x86 with i386.
15998    OPENJDK_BUILD_CPU_OSARCH="i386"
15999  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16000    # On all platforms except macosx, we replace x86_64 with amd64.
16001    OPENJDK_BUILD_CPU_OSARCH="amd64"
16002  fi
16003
16004
16005  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16006  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16007    OPENJDK_BUILD_CPU_JLI="i386"
16008  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16009    # On all platforms except macosx, we replace x86_64 with amd64.
16010    OPENJDK_BUILD_CPU_JLI="amd64"
16011  fi
16012  # Now setup the -D flags for building libjli.
16013  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16014  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16015    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16016      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16017    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16018      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16019    fi
16020  fi
16021
16022
16023  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16024      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16025  else
16026      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16027  fi
16028
16029
16030  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16031  # Macosx is osx and x86_64 is x64
16032  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16033    OPENJDK_BUILD_OS_BUNDLE="osx"
16034  else
16035    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16036  fi
16037  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16038    OPENJDK_BUILD_CPU_BUNDLE="x64"
16039  else
16040    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16041  fi
16042  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16043
16044
16045
16046
16047  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16048    A_LP64="LP64:="
16049    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16050    # unpack200.exe
16051    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16052      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16053    fi
16054  fi
16055  LP64=$A_LP64
16056
16057
16058  if test "x$COMPILE_TYPE" = "xcross"; then
16059    # FIXME: ... or should this include reduced builds..?
16060    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16061  else
16062    DEFINE_CROSS_COMPILE_ARCH=""
16063  fi
16064
16065
16066  # Convert openjdk platform names to hotspot names
16067
16068  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16069  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16070    HOTSPOT_BUILD_OS=bsd
16071  fi
16072
16073
16074  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16075  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16076    HOTSPOT_BUILD_OS_TYPE=posix
16077  fi
16078
16079
16080  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16081  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16082    HOTSPOT_BUILD_CPU=x86_32
16083  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16084    HOTSPOT_BUILD_CPU=sparc
16085  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16086    HOTSPOT_BUILD_CPU=ppc_64
16087  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16088    HOTSPOT_BUILD_CPU=ppc_64
16089  fi
16090
16091
16092  # This is identical with OPENJDK_*, but define anyway for consistency.
16093  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16094
16095
16096  # Setup HOTSPOT_BUILD_CPU_DEFINE
16097  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16098    HOTSPOT_BUILD_CPU_DEFINE=IA32
16099  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16100    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16101  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16102    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16103  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16104    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16105  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16106    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16107  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16108    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16109
16110  # The cpu defines below are for zero, we don't support them directly.
16111  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16112    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16113  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16114    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16115  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16116    HOTSPOT_BUILD_CPU_DEFINE=S390
16117  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16118    HOTSPOT_BUILD_CPU_DEFINE=S390
16119  fi
16120
16121
16122
16123
16124  # ZERO_ARCHDEF is used to enable architecture-specific code.
16125  # This is used in legacy hotspot build.
16126  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16127
16128
16129
16130
16131
16132# Continue setting up basic stuff. Most remaining code require fundamental tools.
16133
16134  # Save the current directory this script was started from
16135  CURDIR="$PWD"
16136
16137  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16138  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16139  # was not available at that time.
16140  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16141  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16142    ORIGINAL_PATH="$REWRITTEN_PATH"
16143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16144$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16145  fi
16146
16147  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16148    PATH_SEP=";"
16149
16150  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16151  if test $SRC_ROOT_LENGTH -gt 100; then
16152    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16153  fi
16154
16155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16157$as_echo_n "checking cygwin release... " >&6; }
16158    CYGWIN_VERSION=`$UNAME -r`
16159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16160$as_echo "$CYGWIN_VERSION" >&6; }
16161    WINDOWS_ENV_VENDOR='cygwin'
16162    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16163
16164    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16165    if test "x$CYGWIN_VERSION_OLD" != x; then
16166      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
16167$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
16168      as_fn_error $? "Cannot continue" "$LINENO" 5
16169    fi
16170    if test "x$CYGPATH" = x; then
16171      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16172    fi
16173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16174$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16175    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16176    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16177    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16178    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16180$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16181    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16182    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16183    if test "x$test_cygdrive_prefix" = x; then
16184      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16185    fi
16186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16188$as_echo_n "checking msys release... " >&6; }
16189    MSYS_VERSION=`$UNAME -r`
16190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16191$as_echo "$MSYS_VERSION" >&6; }
16192
16193    WINDOWS_ENV_VENDOR='msys'
16194    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16195
16196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16197$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16198    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16199    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16200
16201  windows_path="$MSYS_ROOT_PATH"
16202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16203    unix_path=`$CYGPATH -u "$windows_path"`
16204    MSYS_ROOT_PATH="$unix_path"
16205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16207    MSYS_ROOT_PATH="$unix_path"
16208  fi
16209
16210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16211$as_echo "$MSYS_ROOT_PATH" >&6; }
16212    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16213  else
16214    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16215  fi
16216
16217  # Test if windows or unix (cygwin/msys) find is first in path.
16218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16219$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16220  FIND_BINARY_OUTPUT=`find --version 2>&1`
16221  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16223$as_echo "unix style" >&6; }
16224  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16226$as_echo "Windows" >&6; }
16227    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16228$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16229    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
16230$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16231    as_fn_error $? "Cannot continue" "$LINENO" 5
16232  else
16233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16234$as_echo "unknown" >&6; }
16235    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16236$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16237  fi
16238
16239  else
16240    PATH_SEP=":"
16241  fi
16242
16243
16244  # We get the top-level directory from the supporting wrappers.
16245  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16246$as_echo_n "checking for top-level directory... " >&6; }
16247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16248$as_echo "$TOPDIR" >&6; }
16249
16250
16251  # Save the original version of TOPDIR for string comparisons
16252  ORIGINAL_TOPDIR="$TOPDIR"
16253
16254
16255  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16256
16257  # Only process if variable expands to non-empty
16258
16259  if test "x$CURDIR" != x; then
16260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16261
16262  # Input might be given as Windows format, start by converting to
16263  # unix format.
16264  path="$CURDIR"
16265  new_path=`$CYGPATH -u "$path"`
16266
16267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16270  # "foo.exe" is OK but "foo" is an error.
16271  #
16272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16273  # It is also a way to make sure we got the proper file name for the real test later on.
16274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16275  if test "x$test_shortpath" = x; then
16276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16277$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16278    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16279  fi
16280
16281  # Call helper function which possibly converts this using DOS-style short mode.
16282  # If so, the updated path is stored in $new_path.
16283
16284  input_path="$new_path"
16285  # Check if we need to convert this using DOS-style short mode. If the path
16286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16287  # take no chances and rewrite it.
16288  # Note: m4 eats our [], so we need to use [ and ] instead.
16289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16290  if test "x$has_forbidden_chars" != x; then
16291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16295      # Going to short mode and back again did indeed matter. Since short mode is
16296      # case insensitive, let's make it lowercase to improve readability.
16297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16298      # Now convert it back to Unix-style (cygpath)
16299      input_path=`$CYGPATH -u "$shortmode_path"`
16300      new_path="$input_path"
16301    fi
16302  fi
16303
16304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16305  if test "x$test_cygdrive_prefix" = x; then
16306    # As a simple fix, exclude /usr/bin since it's not a real path.
16307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16309      # a path prefixed by /cygdrive for fixpath to work.
16310      new_path="$CYGWIN_ROOT_PATH$input_path"
16311    fi
16312  fi
16313
16314
16315  if test "x$path" != "x$new_path"; then
16316    CURDIR="$new_path"
16317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16318$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16319  fi
16320
16321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16322
16323  path="$CURDIR"
16324  has_colon=`$ECHO $path | $GREP ^.:`
16325  new_path="$path"
16326  if test "x$has_colon" = x; then
16327    # Not in mixed or Windows style, start by that.
16328    new_path=`cmd //c echo $path`
16329  fi
16330
16331
16332  input_path="$new_path"
16333  # Check if we need to convert this using DOS-style short mode. If the path
16334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16335  # take no chances and rewrite it.
16336  # Note: m4 eats our [], so we need to use [ and ] instead.
16337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16338  if test "x$has_forbidden_chars" != x; then
16339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16341  fi
16342
16343
16344  windows_path="$new_path"
16345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16346    unix_path=`$CYGPATH -u "$windows_path"`
16347    new_path="$unix_path"
16348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16350    new_path="$unix_path"
16351  fi
16352
16353  if test "x$path" != "x$new_path"; then
16354    CURDIR="$new_path"
16355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16356$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16357  fi
16358
16359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16361
16362    else
16363      # We're on a unix platform. Hooray! :)
16364      path="$CURDIR"
16365      has_space=`$ECHO "$path" | $GREP " "`
16366      if test "x$has_space" != x; then
16367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16368$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16370      fi
16371
16372      # Use eval to expand a potential ~
16373      eval path="$path"
16374      if test ! -f "$path" && test ! -d "$path"; then
16375        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16376      fi
16377
16378      if test -d "$path"; then
16379        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16380      else
16381        dir="`$DIRNAME "$path"`"
16382        base="`$BASENAME "$path"`"
16383        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16384      fi
16385    fi
16386  fi
16387
16388
16389  # Only process if variable expands to non-empty
16390
16391  if test "x$TOPDIR" != x; then
16392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16393
16394  # Input might be given as Windows format, start by converting to
16395  # unix format.
16396  path="$TOPDIR"
16397  new_path=`$CYGPATH -u "$path"`
16398
16399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16402  # "foo.exe" is OK but "foo" is an error.
16403  #
16404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16405  # It is also a way to make sure we got the proper file name for the real test later on.
16406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16407  if test "x$test_shortpath" = x; then
16408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16409$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16410    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16411  fi
16412
16413  # Call helper function which possibly converts this using DOS-style short mode.
16414  # If so, the updated path is stored in $new_path.
16415
16416  input_path="$new_path"
16417  # Check if we need to convert this using DOS-style short mode. If the path
16418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16419  # take no chances and rewrite it.
16420  # Note: m4 eats our [], so we need to use [ and ] instead.
16421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16422  if test "x$has_forbidden_chars" != x; then
16423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16427      # Going to short mode and back again did indeed matter. Since short mode is
16428      # case insensitive, let's make it lowercase to improve readability.
16429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16430      # Now convert it back to Unix-style (cygpath)
16431      input_path=`$CYGPATH -u "$shortmode_path"`
16432      new_path="$input_path"
16433    fi
16434  fi
16435
16436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16437  if test "x$test_cygdrive_prefix" = x; then
16438    # As a simple fix, exclude /usr/bin since it's not a real path.
16439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16441      # a path prefixed by /cygdrive for fixpath to work.
16442      new_path="$CYGWIN_ROOT_PATH$input_path"
16443    fi
16444  fi
16445
16446
16447  if test "x$path" != "x$new_path"; then
16448    TOPDIR="$new_path"
16449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16450$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16451  fi
16452
16453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16454
16455  path="$TOPDIR"
16456  has_colon=`$ECHO $path | $GREP ^.:`
16457  new_path="$path"
16458  if test "x$has_colon" = x; then
16459    # Not in mixed or Windows style, start by that.
16460    new_path=`cmd //c echo $path`
16461  fi
16462
16463
16464  input_path="$new_path"
16465  # Check if we need to convert this using DOS-style short mode. If the path
16466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16467  # take no chances and rewrite it.
16468  # Note: m4 eats our [], so we need to use [ and ] instead.
16469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16470  if test "x$has_forbidden_chars" != x; then
16471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16473  fi
16474
16475
16476  windows_path="$new_path"
16477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16478    unix_path=`$CYGPATH -u "$windows_path"`
16479    new_path="$unix_path"
16480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16482    new_path="$unix_path"
16483  fi
16484
16485  if test "x$path" != "x$new_path"; then
16486    TOPDIR="$new_path"
16487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16488$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16489  fi
16490
16491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16493
16494    else
16495      # We're on a unix platform. Hooray! :)
16496      path="$TOPDIR"
16497      has_space=`$ECHO "$path" | $GREP " "`
16498      if test "x$has_space" != x; then
16499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16500$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16502      fi
16503
16504      # Use eval to expand a potential ~
16505      eval path="$path"
16506      if test ! -f "$path" && test ! -d "$path"; then
16507        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16508      fi
16509
16510      if test -d "$path"; then
16511        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16512      else
16513        dir="`$DIRNAME "$path"`"
16514        base="`$BASENAME "$path"`"
16515        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16516      fi
16517    fi
16518  fi
16519
16520  # SRC_ROOT is a traditional alias for TOPDIR.
16521  SRC_ROOT=$TOPDIR
16522
16523  # Calculate a canonical version of TOPDIR for string comparisons
16524  CANONICAL_TOPDIR=$TOPDIR
16525
16526  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16527    # Follow a chain of symbolic links. Use readlink
16528    # where it exists, else fall back to horribly
16529    # complicated shell code.
16530    if test "x$READLINK_TESTED" != yes; then
16531      # On MacOSX there is a readlink tool with a different
16532      # purpose than the GNU readlink tool. Check the found readlink.
16533      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16534      if test "x$ISGNU" = x; then
16535        # A readlink that we do not know how to use.
16536        # Are there other non-GNU readlinks out there?
16537        READLINK_TESTED=yes
16538        READLINK=
16539      fi
16540    fi
16541
16542    if test "x$READLINK" != x; then
16543      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16544    else
16545      # Save the current directory for restoring afterwards
16546      STARTDIR=$PWD
16547      COUNTER=0
16548      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16549      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16550      cd $sym_link_dir
16551      # Use -P flag to resolve symlinks in directories.
16552      cd `$THEPWDCMD -P`
16553      sym_link_dir=`$THEPWDCMD -P`
16554      # Resolve file symlinks
16555      while test $COUNTER -lt 20; do
16556        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16557        if test "x$ISLINK" == x; then
16558          # This is not a symbolic link! We are done!
16559          break
16560        fi
16561        # Again resolve directory symlinks since the target of the just found
16562        # link could be in a different directory
16563        cd `$DIRNAME $ISLINK`
16564        sym_link_dir=`$THEPWDCMD -P`
16565        sym_link_file=`$BASENAME $ISLINK`
16566        let COUNTER=COUNTER+1
16567      done
16568      cd $STARTDIR
16569      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16570    fi
16571  fi
16572
16573
16574
16575  # Locate the directory of this script.
16576  AUTOCONF_DIR=$TOPDIR/common/autoconf
16577
16578  # Setup username (for use in adhoc version strings etc)
16579  # Outer [ ] to quote m4.
16580   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16581
16582
16583
16584# Check if it's a pure open build or if custom sources are to be used.
16585
16586  # Check whether --enable-openjdk-only was given.
16587if test "${enable_openjdk_only+set}" = set; then :
16588  enableval=$enable_openjdk_only;
16589else
16590  enable_openjdk_only="no"
16591fi
16592
16593
16594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16595$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16597$as_echo "$enable_openjdk_only" >&6; }
16598  if test "x$enable_openjdk_only" = "xyes"; then
16599    SUPPRESS_CUSTOM_EXTENSIONS="true"
16600  elif test "x$enable_openjdk_only" = "xno"; then
16601    SUPPRESS_CUSTOM_EXTENSIONS="false"
16602  else
16603    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16604  fi
16605
16606  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16607  # the IncludeCustomExtension macro.
16608
16609
16610# Check whether --with-custom-make-dir was given.
16611if test "${with_custom_make_dir+set}" = set; then :
16612  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
16613$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16614fi
16615
16616
16617
16618
16619# These are needed to be able to create a configuration name (and thus the output directory)
16620
16621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16622$as_echo_n "checking which variant of the JDK to build... " >&6; }
16623
16624# Check whether --with-jdk-variant was given.
16625if test "${with_jdk_variant+set}" = set; then :
16626  withval=$with_jdk_variant;
16627fi
16628
16629
16630  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16631    JDK_VARIANT="normal"
16632  else
16633    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16634  fi
16635
16636
16637
16638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16639$as_echo "$JDK_VARIANT" >&6; }
16640
16641
16642  DEBUG_LEVEL="release"
16643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16644$as_echo_n "checking which debug level to use... " >&6; }
16645  # Check whether --enable-debug was given.
16646if test "${enable_debug+set}" = set; then :
16647  enableval=$enable_debug;
16648        ENABLE_DEBUG="${enableval}"
16649        DEBUG_LEVEL="fastdebug"
16650
16651else
16652  ENABLE_DEBUG="no"
16653fi
16654
16655
16656
16657# Check whether --with-debug-level was given.
16658if test "${with_debug_level+set}" = set; then :
16659  withval=$with_debug_level;
16660        DEBUG_LEVEL="${withval}"
16661        if test "x$ENABLE_DEBUG" = xyes; then
16662          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16663        fi
16664
16665fi
16666
16667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16668$as_echo "$DEBUG_LEVEL" >&6; }
16669
16670  if test "x$DEBUG_LEVEL" != xrelease && \
16671      test "x$DEBUG_LEVEL" != xoptimized && \
16672      test "x$DEBUG_LEVEL" != xfastdebug && \
16673      test "x$DEBUG_LEVEL" != xslowdebug; then
16674    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16675  fi
16676
16677  # Translate DEBUG_LEVEL to debug level used by Hotspot
16678  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16679  if test "x$DEBUG_LEVEL" = xrelease; then
16680    HOTSPOT_DEBUG_LEVEL="product"
16681  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16682    HOTSPOT_DEBUG_LEVEL="debug"
16683  fi
16684
16685  if test "x$DEBUG_LEVEL" = xoptimized; then
16686    # The debug level 'optimized' is a little special because it is currently only
16687    # applicable to the HotSpot build where it means to build a completely
16688    # optimized version of the VM without any debugging code (like for the
16689    # 'release' debug level which is called 'product' in the HotSpot build) but
16690    # with the exception that it can contain additional code which is otherwise
16691    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16692    # test new and/or experimental features which are not intended for customer
16693    # shipment. Because these new features need to be tested and benchmarked in
16694    # real world scenarios, we want to build the containing JDK at the 'release'
16695    # debug level.
16696    DEBUG_LEVEL="release"
16697  fi
16698
16699
16700
16701
16702
16703
16704# Check whether --with-jvm-variants was given.
16705if test "${with_jvm_variants+set}" = set; then :
16706  withval=$with_jvm_variants;
16707fi
16708
16709
16710  if test "x$with_jvm_variants" = x; then
16711    with_jvm_variants="server"
16712  fi
16713  JVM_VARIANTS_OPT="$with_jvm_variants"
16714
16715  # Has the user listed more than one variant?
16716  # Additional [] needed to keep m4 from mangling shell constructs.
16717  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16718    BUILDING_MULTIPLE_JVM_VARIANTS=true
16719  else
16720    BUILDING_MULTIPLE_JVM_VARIANTS=false
16721  fi
16722  # Replace the commas with AND for use in the build directory name.
16723  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16724
16725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16726$as_echo_n "checking which variants of the JVM to build... " >&6; }
16727  # JVM_VARIANTS is a space-separated list.
16728  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16729  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16731$as_echo "$JVM_VARIANTS" >&6; }
16732
16733  # Check that the selected variants are valid
16734
16735  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16736  # Notice that the original variant failes on SLES 10 and 11
16737  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16738  STACK=${JVM_VARIANTS// /$'\n'}
16739  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16740  if test "x$INVALID_VARIANTS" != x; then
16741    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16742$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16743    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16744  fi
16745
16746  # All "special" variants share the same output directory ("server")
16747  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16748  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16749  STACK=${JVM_VARIANTS// /$'\n'}
16750  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16751  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16752    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16753  fi
16754
16755
16756
16757
16758  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16759    # zero behaves as a platform and rewrites these values. This is really weird. :(
16760    # We are guaranteed that we do not build any other variants when building zero.
16761    HOTSPOT_TARGET_CPU=zero
16762    HOTSPOT_TARGET_CPU_ARCH=zero
16763  fi
16764
16765
16766# With basic setup done, call the custom early hook.
16767
16768
16769# Check if we have devkits, extra paths or sysroot set.
16770
16771
16772# Check whether --with-devkit was given.
16773if test "${with_devkit+set}" = set; then :
16774  withval=$with_devkit;
16775
16776  # Only process if variable expands to non-empty
16777
16778  if test "x$with_devkit" != x; then
16779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16780
16781  # Input might be given as Windows format, start by converting to
16782  # unix format.
16783  path="$with_devkit"
16784  new_path=`$CYGPATH -u "$path"`
16785
16786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16789  # "foo.exe" is OK but "foo" is an error.
16790  #
16791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16792  # It is also a way to make sure we got the proper file name for the real test later on.
16793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16794  if test "x$test_shortpath" = x; then
16795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16796$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16797    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16798  fi
16799
16800  # Call helper function which possibly converts this using DOS-style short mode.
16801  # If so, the updated path is stored in $new_path.
16802
16803  input_path="$new_path"
16804  # Check if we need to convert this using DOS-style short mode. If the path
16805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16806  # take no chances and rewrite it.
16807  # Note: m4 eats our [], so we need to use [ and ] instead.
16808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16809  if test "x$has_forbidden_chars" != x; then
16810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16814      # Going to short mode and back again did indeed matter. Since short mode is
16815      # case insensitive, let's make it lowercase to improve readability.
16816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16817      # Now convert it back to Unix-style (cygpath)
16818      input_path=`$CYGPATH -u "$shortmode_path"`
16819      new_path="$input_path"
16820    fi
16821  fi
16822
16823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16824  if test "x$test_cygdrive_prefix" = x; then
16825    # As a simple fix, exclude /usr/bin since it's not a real path.
16826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16828      # a path prefixed by /cygdrive for fixpath to work.
16829      new_path="$CYGWIN_ROOT_PATH$input_path"
16830    fi
16831  fi
16832
16833
16834  if test "x$path" != "x$new_path"; then
16835    with_devkit="$new_path"
16836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16837$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16838  fi
16839
16840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16841
16842  path="$with_devkit"
16843  has_colon=`$ECHO $path | $GREP ^.:`
16844  new_path="$path"
16845  if test "x$has_colon" = x; then
16846    # Not in mixed or Windows style, start by that.
16847    new_path=`cmd //c echo $path`
16848  fi
16849
16850
16851  input_path="$new_path"
16852  # Check if we need to convert this using DOS-style short mode. If the path
16853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16854  # take no chances and rewrite it.
16855  # Note: m4 eats our [], so we need to use [ and ] instead.
16856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16857  if test "x$has_forbidden_chars" != x; then
16858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16860  fi
16861
16862
16863  windows_path="$new_path"
16864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16865    unix_path=`$CYGPATH -u "$windows_path"`
16866    new_path="$unix_path"
16867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16869    new_path="$unix_path"
16870  fi
16871
16872  if test "x$path" != "x$new_path"; then
16873    with_devkit="$new_path"
16874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16875$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16876  fi
16877
16878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16880
16881    else
16882      # We're on a unix platform. Hooray! :)
16883      path="$with_devkit"
16884      has_space=`$ECHO "$path" | $GREP " "`
16885      if test "x$has_space" != x; then
16886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16887$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16888        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16889      fi
16890
16891      # Use eval to expand a potential ~
16892      eval path="$path"
16893      if test ! -f "$path" && test ! -d "$path"; then
16894        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16895      fi
16896
16897      if test -d "$path"; then
16898        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16899      else
16900        dir="`$DIRNAME "$path"`"
16901        base="`$BASENAME "$path"`"
16902        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16903      fi
16904    fi
16905  fi
16906
16907        DEVKIT_ROOT="$with_devkit"
16908        # Check for a meta data info file in the root of the devkit
16909        if test -f "$DEVKIT_ROOT/devkit.info"; then
16910          . $DEVKIT_ROOT/devkit.info
16911          # This potentially sets the following:
16912          # A descriptive name of the devkit
16913
16914  if test "x$DEVKIT_NAME" = x; then
16915    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16916  fi
16917
16918          # Corresponds to --with-extra-path
16919
16920  if test "x$DEVKIT_EXTRA_PATH" = x; then
16921    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16922  fi
16923
16924          # Corresponds to --with-toolchain-path
16925
16926  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16927    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16928  fi
16929
16930          # Corresponds to --with-sysroot
16931
16932  if test "x$DEVKIT_SYSROOT" = x; then
16933    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16934  fi
16935
16936
16937          # Identifies the Visual Studio version in the devkit
16938
16939  if test "x$DEVKIT_VS_VERSION" = x; then
16940    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16941  fi
16942
16943          # The Visual Studio include environment variable
16944
16945  if test "x$DEVKIT_VS_INCLUDE" = x; then
16946    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16947  fi
16948
16949          # The Visual Studio lib environment variable
16950
16951  if test "x$DEVKIT_VS_LIB" = x; then
16952    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16953  fi
16954
16955          # Corresponds to --with-msvcr-dll
16956
16957  if test "x$DEVKIT_MSVCR_DLL" = x; then
16958    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16959  fi
16960
16961          # Corresponds to --with-msvcp-dll
16962
16963  if test "x$DEVKIT_MSVCP_DLL" = x; then
16964    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16965  fi
16966
16967        fi
16968
16969        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16970$as_echo_n "checking for devkit... " >&6; }
16971        if test "x$DEVKIT_NAME" != x; then
16972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16973$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16974        else
16975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16976$as_echo "$DEVKIT_ROOT" >&6; }
16977        fi
16978
16979
16980  if test "x$DEVKIT_EXTRA_PATH" != x; then
16981    if test "x$EXTRA_PATH" = x; then
16982      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16983    else
16984      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16985    fi
16986  fi
16987
16988
16989        # Fallback default of just /bin if DEVKIT_PATH is not defined
16990        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16991          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16992        fi
16993
16994  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16995    if test "x$TOOLCHAIN_PATH" = x; then
16996      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16997    else
16998      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16999    fi
17000  fi
17001
17002
17003        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17004        # places for backwards compatiblity.
17005        if test "x$DEVKIT_SYSROOT" != x; then
17006          SYSROOT="$DEVKIT_SYSROOT"
17007        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17008          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17009        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17010          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17011        fi
17012
17013
17014fi
17015
17016
17017  # You can force the sysroot if the sysroot encoded into the compiler tools
17018  # is not correct.
17019
17020# Check whether --with-sys-root was given.
17021if test "${with_sys_root+set}" = set; then :
17022  withval=$with_sys_root; SYSROOT=$with_sys_root
17023
17024fi
17025
17026
17027
17028# Check whether --with-sysroot was given.
17029if test "${with_sysroot+set}" = set; then :
17030  withval=$with_sysroot; SYSROOT=$with_sysroot
17031
17032fi
17033
17034
17035
17036# Check whether --with-tools-dir was given.
17037if test "${with_tools_dir+set}" = set; then :
17038  withval=$with_tools_dir;
17039  if test "x$with_tools_dir" != x; then
17040    if test "x$TOOLCHAIN_PATH" = x; then
17041      TOOLCHAIN_PATH="$with_tools_dir"
17042    else
17043      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17044    fi
17045  fi
17046
17047
17048fi
17049
17050
17051
17052# Check whether --with-toolchain-path was given.
17053if test "${with_toolchain_path+set}" = set; then :
17054  withval=$with_toolchain_path;
17055  if test "x$with_toolchain_path" != x; then
17056    if test "x$TOOLCHAIN_PATH" = x; then
17057      TOOLCHAIN_PATH="$with_toolchain_path"
17058    else
17059      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17060    fi
17061  fi
17062
17063
17064fi
17065
17066
17067
17068# Check whether --with-extra-path was given.
17069if test "${with_extra_path+set}" = set; then :
17070  withval=$with_extra_path;
17071  if test "x$with_extra_path" != x; then
17072    if test "x$EXTRA_PATH" = x; then
17073      EXTRA_PATH="$with_extra_path"
17074    else
17075      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17076    fi
17077  fi
17078
17079
17080fi
17081
17082
17083  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17084    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17085    # If not, detect if Xcode is installed by running xcodebuild -version
17086    # if no Xcode installed, xcodebuild exits with 1
17087    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17088    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17089      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17090      # fall back on the stub binary in /usr/bin/xcodebuild
17091      # Extract the first word of "xcodebuild", so it can be a program name with args.
17092set dummy xcodebuild; ac_word=$2
17093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17094$as_echo_n "checking for $ac_word... " >&6; }
17095if ${ac_cv_path_XCODEBUILD+:} false; then :
17096  $as_echo_n "(cached) " >&6
17097else
17098  case $XCODEBUILD in
17099  [\\/]* | ?:[\\/]*)
17100  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17101  ;;
17102  *)
17103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17104for as_dir in $TOOLCHAIN_PATH
17105do
17106  IFS=$as_save_IFS
17107  test -z "$as_dir" && as_dir=.
17108    for ac_exec_ext in '' $ac_executable_extensions; do
17109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17110    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17112    break 2
17113  fi
17114done
17115  done
17116IFS=$as_save_IFS
17117
17118  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17119  ;;
17120esac
17121fi
17122XCODEBUILD=$ac_cv_path_XCODEBUILD
17123if test -n "$XCODEBUILD"; then
17124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17125$as_echo "$XCODEBUILD" >&6; }
17126else
17127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17128$as_echo "no" >&6; }
17129fi
17130
17131
17132    else
17133      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17134      # when only the command line tools are installed there are no SDKs, so headers
17135      # are copied into the system frameworks
17136      XCODEBUILD=
17137
17138    fi
17139
17140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17141$as_echo_n "checking for sdk name... " >&6; }
17142
17143# Check whether --with-sdk-name was given.
17144if test "${with_sdk_name+set}" = set; then :
17145  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17146
17147fi
17148
17149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17150$as_echo "$SDKNAME" >&6; }
17151
17152    # if toolchain path is specified then don't rely on system headers, they may not compile
17153    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17154    test -z "$TOOLCHAIN_PATH" && \
17155      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17156
17157    if test -z "$SYSROOT"; then
17158      if test -n "$XCODEBUILD"; then
17159        # if we don't have system headers, use default SDK name (last resort)
17160        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17161          SDKNAME=${SDKNAME:-macosx}
17162        fi
17163
17164        if test -n "$SDKNAME"; then
17165          # Call xcodebuild to determine SYSROOT
17166          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17167        fi
17168      else
17169        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17170          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
17171        fi
17172      fi
17173    else
17174      # warn user if --with-sdk-name was also set
17175      if test -n "$with_sdk_name"; then
17176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17177$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17178      fi
17179    fi
17180
17181    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17182      # If no system framework headers, then SYSROOT must be set, or we won't build
17183      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
17184    fi
17185
17186    # Perform a basic sanity test
17187    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17188      if test -z "$SYSROOT"; then
17189        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
17190      else
17191        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17192      fi
17193    fi
17194
17195    # set SDKROOT too, Xcode tools will pick it up
17196    SDKROOT=$SYSROOT
17197
17198  fi
17199
17200  # Prepend the extra path to the global path
17201
17202  if test "x$EXTRA_PATH" != x; then
17203    if test "x$PATH" = x; then
17204      PATH="$EXTRA_PATH"
17205    else
17206      PATH="$EXTRA_PATH:$PATH"
17207    fi
17208  fi
17209
17210
17211  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
17212    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
17213    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
17214  fi
17215
17216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17217$as_echo_n "checking for sysroot... " >&6; }
17218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17219$as_echo "$SYSROOT" >&6; }
17220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17221$as_echo_n "checking for toolchain path... " >&6; }
17222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17223$as_echo "$TOOLCHAIN_PATH" >&6; }
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17225$as_echo_n "checking for extra path... " >&6; }
17226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17227$as_echo "$EXTRA_PATH" >&6; }
17228
17229
17230# To properly create a configuration name, we need to have the OpenJDK target
17231# and options (variants and debug level) parsed.
17232
17233
17234
17235# Check whether --with-conf-name was given.
17236if test "${with_conf_name+set}" = set; then :
17237  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17238fi
17239
17240
17241  # Test from where we are running configure, in or outside of src root.
17242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17243$as_echo_n "checking where to store configuration... " >&6; }
17244  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17245      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17246      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17247    # We are running configure from the src root.
17248    # Create a default ./build/target-variant-debuglevel output root.
17249    if test "x${CONF_NAME}" = x; then
17250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17251$as_echo "in default location" >&6; }
17252      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17253    else
17254      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17255$as_echo "in build directory with custom name" >&6; }
17256    fi
17257    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17258    $MKDIR -p "$OUTPUT_ROOT"
17259    if test ! -d "$OUTPUT_ROOT"; then
17260      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17261    fi
17262  else
17263    # We are running configure from outside of the src dir.
17264    # Then use the current directory as output dir!
17265    # If configuration is situated in normal build directory, just use the build
17266    # directory name as configuration name, otherwise use the complete path.
17267    if test "x${CONF_NAME}" = x; then
17268      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17269    fi
17270    OUTPUT_ROOT="$CURDIR"
17271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17272$as_echo "in current directory" >&6; }
17273
17274    # WARNING: This might be a bad thing to do. You need to be sure you want to
17275    # have a configuration in this directory. Do some sanity checks!
17276
17277    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17278      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17279      # other files
17280      files_present=`$LS $OUTPUT_ROOT`
17281      # Configure has already touched config.log and confdefs.h in the current dir when this check
17282      # is performed.
17283      filtered_files=`$ECHO "$files_present" \
17284          | $SED -e 's/config.log//g' \
17285              -e 's/configure.log//g' \
17286              -e 's/confdefs.h//g' \
17287              -e 's/ //g' \
17288          | $TR -d '\n'`
17289      if test "x$filtered_files" != x; then
17290        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17291$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17292        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17293$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17294        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17295$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17296        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17297$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17299$as_echo "$as_me: seriously mess up just about everything." >&6;}
17300        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17301$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17302        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17303$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17304        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17305      fi
17306    fi
17307  fi
17308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17309$as_echo_n "checking what configuration name to use... " >&6; }
17310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17311$as_echo "$CONF_NAME" >&6; }
17312
17313
17314  # Only process if variable expands to non-empty
17315
17316  if test "x$OUTPUT_ROOT" != x; then
17317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17318
17319  # Input might be given as Windows format, start by converting to
17320  # unix format.
17321  path="$OUTPUT_ROOT"
17322  new_path=`$CYGPATH -u "$path"`
17323
17324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17327  # "foo.exe" is OK but "foo" is an error.
17328  #
17329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17330  # It is also a way to make sure we got the proper file name for the real test later on.
17331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17332  if test "x$test_shortpath" = x; then
17333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17334$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17335    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17336  fi
17337
17338  # Call helper function which possibly converts this using DOS-style short mode.
17339  # If so, the updated path is stored in $new_path.
17340
17341  input_path="$new_path"
17342  # Check if we need to convert this using DOS-style short mode. If the path
17343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17344  # take no chances and rewrite it.
17345  # Note: m4 eats our [], so we need to use [ and ] instead.
17346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17347  if test "x$has_forbidden_chars" != x; then
17348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17352      # Going to short mode and back again did indeed matter. Since short mode is
17353      # case insensitive, let's make it lowercase to improve readability.
17354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17355      # Now convert it back to Unix-style (cygpath)
17356      input_path=`$CYGPATH -u "$shortmode_path"`
17357      new_path="$input_path"
17358    fi
17359  fi
17360
17361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17362  if test "x$test_cygdrive_prefix" = x; then
17363    # As a simple fix, exclude /usr/bin since it's not a real path.
17364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17366      # a path prefixed by /cygdrive for fixpath to work.
17367      new_path="$CYGWIN_ROOT_PATH$input_path"
17368    fi
17369  fi
17370
17371
17372  if test "x$path" != "x$new_path"; then
17373    OUTPUT_ROOT="$new_path"
17374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17375$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17376  fi
17377
17378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17379
17380  path="$OUTPUT_ROOT"
17381  has_colon=`$ECHO $path | $GREP ^.:`
17382  new_path="$path"
17383  if test "x$has_colon" = x; then
17384    # Not in mixed or Windows style, start by that.
17385    new_path=`cmd //c echo $path`
17386  fi
17387
17388
17389  input_path="$new_path"
17390  # Check if we need to convert this using DOS-style short mode. If the path
17391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17392  # take no chances and rewrite it.
17393  # Note: m4 eats our [], so we need to use [ and ] instead.
17394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17395  if test "x$has_forbidden_chars" != x; then
17396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17398  fi
17399
17400
17401  windows_path="$new_path"
17402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17403    unix_path=`$CYGPATH -u "$windows_path"`
17404    new_path="$unix_path"
17405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17407    new_path="$unix_path"
17408  fi
17409
17410  if test "x$path" != "x$new_path"; then
17411    OUTPUT_ROOT="$new_path"
17412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17413$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17414  fi
17415
17416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17418
17419    else
17420      # We're on a unix platform. Hooray! :)
17421      path="$OUTPUT_ROOT"
17422      has_space=`$ECHO "$path" | $GREP " "`
17423      if test "x$has_space" != x; then
17424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17425$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17426        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17427      fi
17428
17429      # Use eval to expand a potential ~
17430      eval path="$path"
17431      if test ! -f "$path" && test ! -d "$path"; then
17432        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17433      fi
17434
17435      if test -d "$path"; then
17436        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17437      else
17438        dir="`$DIRNAME "$path"`"
17439        base="`$BASENAME "$path"`"
17440        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17441      fi
17442    fi
17443  fi
17444
17445
17446  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17447  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17448
17449  SPEC=$OUTPUT_ROOT/spec.gmk
17450
17451  CONF_NAME=$CONF_NAME
17452
17453  OUTPUT_ROOT=$OUTPUT_ROOT
17454
17455
17456
17457  # The spec.gmk file contains all variables for the make system.
17458  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17459
17460  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17461  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17462
17463  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17464  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17465
17466  # The compare.sh is used to compare the build output to other builds.
17467  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17468
17469  # The generated Makefile knows where the spec.gmk is and where the source is.
17470  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17471  # which will look for generated configurations
17472  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17473
17474
17475
17476# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17477
17478  for ac_prog in apt-get yum port pkgutil pkgadd
17479do
17480  # Extract the first word of "$ac_prog", so it can be a program name with args.
17481set dummy $ac_prog; ac_word=$2
17482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17483$as_echo_n "checking for $ac_word... " >&6; }
17484if ${ac_cv_prog_PKGHANDLER+:} false; then :
17485  $as_echo_n "(cached) " >&6
17486else
17487  if test -n "$PKGHANDLER"; then
17488  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17489else
17490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17491for as_dir in $PATH
17492do
17493  IFS=$as_save_IFS
17494  test -z "$as_dir" && as_dir=.
17495    for ac_exec_ext in '' $ac_executable_extensions; do
17496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17497    ac_cv_prog_PKGHANDLER="$ac_prog"
17498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17499    break 2
17500  fi
17501done
17502  done
17503IFS=$as_save_IFS
17504
17505fi
17506fi
17507PKGHANDLER=$ac_cv_prog_PKGHANDLER
17508if test -n "$PKGHANDLER"; then
17509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17510$as_echo "$PKGHANDLER" >&6; }
17511else
17512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17513$as_echo "no" >&6; }
17514fi
17515
17516
17517  test -n "$PKGHANDLER" && break
17518done
17519
17520
17521
17522# Setup tools that requires more complex handling, or that is not needed by the configure script.
17523
17524
17525
17526  # Publish this variable in the help.
17527
17528
17529  if [ -z "${MAKE+x}" ]; then
17530    # The variable is not set by user, try to locate tool using the code snippet
17531
17532    # Try our hardest to locate a correct version of GNU make
17533    for ac_prog in gmake
17534do
17535  # Extract the first word of "$ac_prog", so it can be a program name with args.
17536set dummy $ac_prog; ac_word=$2
17537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17538$as_echo_n "checking for $ac_word... " >&6; }
17539if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17540  $as_echo_n "(cached) " >&6
17541else
17542  case $CHECK_GMAKE in
17543  [\\/]* | ?:[\\/]*)
17544  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17545  ;;
17546  *)
17547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17548for as_dir in $PATH
17549do
17550  IFS=$as_save_IFS
17551  test -z "$as_dir" && as_dir=.
17552    for ac_exec_ext in '' $ac_executable_extensions; do
17553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17554    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17556    break 2
17557  fi
17558done
17559  done
17560IFS=$as_save_IFS
17561
17562  ;;
17563esac
17564fi
17565CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17566if test -n "$CHECK_GMAKE"; then
17567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17568$as_echo "$CHECK_GMAKE" >&6; }
17569else
17570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17571$as_echo "no" >&6; }
17572fi
17573
17574
17575  test -n "$CHECK_GMAKE" && break
17576done
17577
17578
17579  MAKE_CANDIDATE=""$CHECK_GMAKE""
17580  DESCRIPTION="gmake in PATH"
17581
17582  # On Cygwin, we require a newer version of make than on other platforms
17583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17584    MAKE_VERSION_EXPR="-e 4\."
17585    MAKE_REQUIRED_VERSION="4.0"
17586   else
17587    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17588    MAKE_REQUIRED_VERSION="3.81"
17589  fi
17590
17591  if test "x$MAKE_CANDIDATE" != x; then
17592    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17593$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17594    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17595    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17596    if test "x$IS_GNU_MAKE" = x; then
17597      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17598$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17599    else
17600      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17601      if test "x$IS_MODERN_MAKE" = x; then
17602        { $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
17603$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;}
17604      else
17605        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17606          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17607            MAKE_EXPECTED_ENV='cygwin'
17608          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17609            MAKE_EXPECTED_ENV='msys'
17610          else
17611            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17612          fi
17613          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17614          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17615        else
17616          # Not relevant for non-Windows
17617          IS_MAKE_CORRECT_ENV=true
17618        fi
17619        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17620          { $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
17621$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;}
17622        else
17623          FOUND_MAKE=$MAKE_CANDIDATE
17624
17625  # Only process if variable expands to non-empty
17626
17627  if test "x$FOUND_MAKE" != x; then
17628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17629
17630  # First separate the path from the arguments. This will split at the first
17631  # space.
17632  complete="$FOUND_MAKE"
17633  path="${complete%% *}"
17634  tmp="$complete EOL"
17635  arguments="${tmp#* }"
17636
17637  # Input might be given as Windows format, start by converting to
17638  # unix format.
17639  new_path=`$CYGPATH -u "$path"`
17640
17641  # Now try to locate executable using which
17642  new_path=`$WHICH "$new_path" 2> /dev/null`
17643  # bat and cmd files are not always considered executable in cygwin causing which
17644  # to not find them
17645  if test "x$new_path" = x \
17646      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17647      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17648    new_path=`$CYGPATH -u "$path"`
17649  fi
17650  if test "x$new_path" = x; then
17651    # Oops. Which didn't find the executable.
17652    # The splitting of arguments from the executable at a space might have been incorrect,
17653    # since paths with space are more likely in Windows. Give it another try with the whole
17654    # argument.
17655    path="$complete"
17656    arguments="EOL"
17657    new_path=`$CYGPATH -u "$path"`
17658    new_path=`$WHICH "$new_path" 2> /dev/null`
17659    # bat and cmd files are not always considered executable in cygwin causing which
17660    # to not find them
17661    if test "x$new_path" = x \
17662        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17663        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17664      new_path=`$CYGPATH -u "$path"`
17665    fi
17666    if test "x$new_path" = x; then
17667      # It's still not found. Now this is an unrecoverable error.
17668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17669$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17670      has_space=`$ECHO "$complete" | $GREP " "`
17671      if test "x$has_space" != x; then
17672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17674      fi
17675      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17676    fi
17677  fi
17678
17679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17682  # "foo.exe" is OK but "foo" is an error.
17683  #
17684  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17685  # It is also a way to make sure we got the proper file name for the real test later on.
17686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17687  if test "x$test_shortpath" = x; then
17688    # Short path failed, file does not exist as specified.
17689    # Try adding .exe or .cmd
17690    if test -f "${new_path}.exe"; then
17691      input_to_shortpath="${new_path}.exe"
17692    elif test -f "${new_path}.cmd"; then
17693      input_to_shortpath="${new_path}.cmd"
17694    else
17695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17696$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17697      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17698$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17699      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17700    fi
17701  else
17702    input_to_shortpath="$new_path"
17703  fi
17704
17705  # Call helper function which possibly converts this using DOS-style short mode.
17706  # If so, the updated path is stored in $new_path.
17707  new_path="$input_to_shortpath"
17708
17709  input_path="$input_to_shortpath"
17710  # Check if we need to convert this using DOS-style short mode. If the path
17711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17712  # take no chances and rewrite it.
17713  # Note: m4 eats our [], so we need to use [ and ] instead.
17714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17715  if test "x$has_forbidden_chars" != x; then
17716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17720      # Going to short mode and back again did indeed matter. Since short mode is
17721      # case insensitive, let's make it lowercase to improve readability.
17722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17723      # Now convert it back to Unix-style (cygpath)
17724      input_path=`$CYGPATH -u "$shortmode_path"`
17725      new_path="$input_path"
17726    fi
17727  fi
17728
17729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17730  if test "x$test_cygdrive_prefix" = x; then
17731    # As a simple fix, exclude /usr/bin since it's not a real path.
17732    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17734      # a path prefixed by /cygdrive for fixpath to work.
17735      new_path="$CYGWIN_ROOT_PATH$input_path"
17736    fi
17737  fi
17738
17739  # remove trailing .exe if any
17740  new_path="${new_path/%.exe/}"
17741
17742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17743
17744  # First separate the path from the arguments. This will split at the first
17745  # space.
17746  complete="$FOUND_MAKE"
17747  path="${complete%% *}"
17748  tmp="$complete EOL"
17749  arguments="${tmp#* }"
17750
17751  # Input might be given as Windows format, start by converting to
17752  # unix format.
17753  new_path="$path"
17754
17755  windows_path="$new_path"
17756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17757    unix_path=`$CYGPATH -u "$windows_path"`
17758    new_path="$unix_path"
17759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17761    new_path="$unix_path"
17762  fi
17763
17764
17765  # Now try to locate executable using which
17766  new_path=`$WHICH "$new_path" 2> /dev/null`
17767
17768  if test "x$new_path" = x; then
17769    # Oops. Which didn't find the executable.
17770    # The splitting of arguments from the executable at a space might have been incorrect,
17771    # since paths with space are more likely in Windows. Give it another try with the whole
17772    # argument.
17773    path="$complete"
17774    arguments="EOL"
17775    new_path="$path"
17776
17777  windows_path="$new_path"
17778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17779    unix_path=`$CYGPATH -u "$windows_path"`
17780    new_path="$unix_path"
17781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17783    new_path="$unix_path"
17784  fi
17785
17786
17787    new_path=`$WHICH "$new_path" 2> /dev/null`
17788    # bat and cmd files are not always considered executable in MSYS causing which
17789    # to not find them
17790    if test "x$new_path" = x \
17791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17793      new_path="$path"
17794
17795  windows_path="$new_path"
17796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17797    unix_path=`$CYGPATH -u "$windows_path"`
17798    new_path="$unix_path"
17799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17801    new_path="$unix_path"
17802  fi
17803
17804    fi
17805
17806    if test "x$new_path" = x; then
17807      # It's still not found. Now this is an unrecoverable error.
17808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17809$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17810      has_space=`$ECHO "$complete" | $GREP " "`
17811      if test "x$has_space" != x; then
17812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17814      fi
17815      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17816    fi
17817  fi
17818
17819  # Now new_path has a complete unix path to the binary
17820  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17821    # Keep paths in /bin as-is, but remove trailing .exe if any
17822    new_path="${new_path/%.exe/}"
17823    # Do not save /bin paths to all_fixpath_prefixes!
17824  else
17825    # Not in mixed or Windows style, start by that.
17826    new_path=`cmd //c echo $new_path`
17827
17828  input_path="$new_path"
17829  # Check if we need to convert this using DOS-style short mode. If the path
17830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17831  # take no chances and rewrite it.
17832  # Note: m4 eats our [], so we need to use [ and ] instead.
17833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17834  if test "x$has_forbidden_chars" != x; then
17835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17837  fi
17838
17839    # Output is in $new_path
17840
17841  windows_path="$new_path"
17842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17843    unix_path=`$CYGPATH -u "$windows_path"`
17844    new_path="$unix_path"
17845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17847    new_path="$unix_path"
17848  fi
17849
17850    # remove trailing .exe if any
17851    new_path="${new_path/%.exe/}"
17852
17853    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17854    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17855  fi
17856
17857    else
17858      # We're on a unix platform. Hooray! :)
17859      # First separate the path from the arguments. This will split at the first
17860      # space.
17861      complete="$FOUND_MAKE"
17862      path="${complete%% *}"
17863      tmp="$complete EOL"
17864      arguments="${tmp#* }"
17865
17866      # Cannot rely on the command "which" here since it doesn't always work.
17867      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17868      if test -z "$is_absolute_path"; then
17869        # Path to executable is not absolute. Find it.
17870        IFS_save="$IFS"
17871        IFS=:
17872        for p in $PATH; do
17873          if test -f "$p/$path" && test -x "$p/$path"; then
17874            new_path="$p/$path"
17875            break
17876          fi
17877        done
17878        IFS="$IFS_save"
17879      else
17880        # This is an absolute path, we can use it without further modifications.
17881        new_path="$path"
17882      fi
17883
17884      if test "x$new_path" = x; then
17885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17886$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17887        has_space=`$ECHO "$complete" | $GREP " "`
17888        if test "x$has_space" != x; then
17889          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17890$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17891        fi
17892        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17893      fi
17894    fi
17895
17896    # Now join together the path and the arguments once again
17897    if test "x$arguments" != xEOL; then
17898      new_complete="$new_path ${arguments% *}"
17899    else
17900      new_complete="$new_path"
17901    fi
17902
17903    if test "x$complete" != "x$new_complete"; then
17904      FOUND_MAKE="$new_complete"
17905      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17906$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17907    fi
17908  fi
17909
17910        fi
17911      fi
17912    fi
17913  fi
17914
17915
17916    if test "x$FOUND_MAKE" = x; then
17917      for ac_prog in make
17918do
17919  # Extract the first word of "$ac_prog", so it can be a program name with args.
17920set dummy $ac_prog; ac_word=$2
17921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17922$as_echo_n "checking for $ac_word... " >&6; }
17923if ${ac_cv_path_CHECK_MAKE+:} false; then :
17924  $as_echo_n "(cached) " >&6
17925else
17926  case $CHECK_MAKE in
17927  [\\/]* | ?:[\\/]*)
17928  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17929  ;;
17930  *)
17931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17932for as_dir in $PATH
17933do
17934  IFS=$as_save_IFS
17935  test -z "$as_dir" && as_dir=.
17936    for ac_exec_ext in '' $ac_executable_extensions; do
17937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17938    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17940    break 2
17941  fi
17942done
17943  done
17944IFS=$as_save_IFS
17945
17946  ;;
17947esac
17948fi
17949CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17950if test -n "$CHECK_MAKE"; then
17951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17952$as_echo "$CHECK_MAKE" >&6; }
17953else
17954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17955$as_echo "no" >&6; }
17956fi
17957
17958
17959  test -n "$CHECK_MAKE" && break
17960done
17961
17962
17963  MAKE_CANDIDATE=""$CHECK_MAKE""
17964  DESCRIPTION="make in PATH"
17965
17966  # On Cygwin, we require a newer version of make than on other platforms
17967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17968    MAKE_VERSION_EXPR="-e 4\."
17969    MAKE_REQUIRED_VERSION="4.0"
17970   else
17971    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17972    MAKE_REQUIRED_VERSION="3.81"
17973  fi
17974
17975  if test "x$MAKE_CANDIDATE" != x; then
17976    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17977$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17978    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17979    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17980    if test "x$IS_GNU_MAKE" = x; then
17981      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17982$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17983    else
17984      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17985      if test "x$IS_MODERN_MAKE" = x; then
17986        { $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
17987$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;}
17988      else
17989        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17990          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17991            MAKE_EXPECTED_ENV='cygwin'
17992          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17993            MAKE_EXPECTED_ENV='msys'
17994          else
17995            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17996          fi
17997          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17998          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17999        else
18000          # Not relevant for non-Windows
18001          IS_MAKE_CORRECT_ENV=true
18002        fi
18003        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18004          { $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
18005$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;}
18006        else
18007          FOUND_MAKE=$MAKE_CANDIDATE
18008
18009  # Only process if variable expands to non-empty
18010
18011  if test "x$FOUND_MAKE" != x; then
18012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18013
18014  # First separate the path from the arguments. This will split at the first
18015  # space.
18016  complete="$FOUND_MAKE"
18017  path="${complete%% *}"
18018  tmp="$complete EOL"
18019  arguments="${tmp#* }"
18020
18021  # Input might be given as Windows format, start by converting to
18022  # unix format.
18023  new_path=`$CYGPATH -u "$path"`
18024
18025  # Now try to locate executable using which
18026  new_path=`$WHICH "$new_path" 2> /dev/null`
18027  # bat and cmd files are not always considered executable in cygwin causing which
18028  # to not find them
18029  if test "x$new_path" = x \
18030      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18031      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18032    new_path=`$CYGPATH -u "$path"`
18033  fi
18034  if test "x$new_path" = x; then
18035    # Oops. Which didn't find the executable.
18036    # The splitting of arguments from the executable at a space might have been incorrect,
18037    # since paths with space are more likely in Windows. Give it another try with the whole
18038    # argument.
18039    path="$complete"
18040    arguments="EOL"
18041    new_path=`$CYGPATH -u "$path"`
18042    new_path=`$WHICH "$new_path" 2> /dev/null`
18043    # bat and cmd files are not always considered executable in cygwin causing which
18044    # to not find them
18045    if test "x$new_path" = x \
18046        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18047        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18048      new_path=`$CYGPATH -u "$path"`
18049    fi
18050    if test "x$new_path" = x; then
18051      # It's still not found. Now this is an unrecoverable error.
18052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18053$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18054      has_space=`$ECHO "$complete" | $GREP " "`
18055      if test "x$has_space" != x; then
18056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18058      fi
18059      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18060    fi
18061  fi
18062
18063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18066  # "foo.exe" is OK but "foo" is an error.
18067  #
18068  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18069  # It is also a way to make sure we got the proper file name for the real test later on.
18070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18071  if test "x$test_shortpath" = x; then
18072    # Short path failed, file does not exist as specified.
18073    # Try adding .exe or .cmd
18074    if test -f "${new_path}.exe"; then
18075      input_to_shortpath="${new_path}.exe"
18076    elif test -f "${new_path}.cmd"; then
18077      input_to_shortpath="${new_path}.cmd"
18078    else
18079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18080$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18081      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18082$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18084    fi
18085  else
18086    input_to_shortpath="$new_path"
18087  fi
18088
18089  # Call helper function which possibly converts this using DOS-style short mode.
18090  # If so, the updated path is stored in $new_path.
18091  new_path="$input_to_shortpath"
18092
18093  input_path="$input_to_shortpath"
18094  # Check if we need to convert this using DOS-style short mode. If the path
18095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18096  # take no chances and rewrite it.
18097  # Note: m4 eats our [], so we need to use [ and ] instead.
18098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18099  if test "x$has_forbidden_chars" != x; then
18100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18104      # Going to short mode and back again did indeed matter. Since short mode is
18105      # case insensitive, let's make it lowercase to improve readability.
18106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18107      # Now convert it back to Unix-style (cygpath)
18108      input_path=`$CYGPATH -u "$shortmode_path"`
18109      new_path="$input_path"
18110    fi
18111  fi
18112
18113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18114  if test "x$test_cygdrive_prefix" = x; then
18115    # As a simple fix, exclude /usr/bin since it's not a real path.
18116    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18118      # a path prefixed by /cygdrive for fixpath to work.
18119      new_path="$CYGWIN_ROOT_PATH$input_path"
18120    fi
18121  fi
18122
18123  # remove trailing .exe if any
18124  new_path="${new_path/%.exe/}"
18125
18126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18127
18128  # First separate the path from the arguments. This will split at the first
18129  # space.
18130  complete="$FOUND_MAKE"
18131  path="${complete%% *}"
18132  tmp="$complete EOL"
18133  arguments="${tmp#* }"
18134
18135  # Input might be given as Windows format, start by converting to
18136  # unix format.
18137  new_path="$path"
18138
18139  windows_path="$new_path"
18140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18141    unix_path=`$CYGPATH -u "$windows_path"`
18142    new_path="$unix_path"
18143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18145    new_path="$unix_path"
18146  fi
18147
18148
18149  # Now try to locate executable using which
18150  new_path=`$WHICH "$new_path" 2> /dev/null`
18151
18152  if test "x$new_path" = x; then
18153    # Oops. Which didn't find the executable.
18154    # The splitting of arguments from the executable at a space might have been incorrect,
18155    # since paths with space are more likely in Windows. Give it another try with the whole
18156    # argument.
18157    path="$complete"
18158    arguments="EOL"
18159    new_path="$path"
18160
18161  windows_path="$new_path"
18162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18163    unix_path=`$CYGPATH -u "$windows_path"`
18164    new_path="$unix_path"
18165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18167    new_path="$unix_path"
18168  fi
18169
18170
18171    new_path=`$WHICH "$new_path" 2> /dev/null`
18172    # bat and cmd files are not always considered executable in MSYS causing which
18173    # to not find them
18174    if test "x$new_path" = x \
18175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18177      new_path="$path"
18178
18179  windows_path="$new_path"
18180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18181    unix_path=`$CYGPATH -u "$windows_path"`
18182    new_path="$unix_path"
18183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18185    new_path="$unix_path"
18186  fi
18187
18188    fi
18189
18190    if test "x$new_path" = x; then
18191      # It's still not found. Now this is an unrecoverable error.
18192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18193$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18194      has_space=`$ECHO "$complete" | $GREP " "`
18195      if test "x$has_space" != x; then
18196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18198      fi
18199      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18200    fi
18201  fi
18202
18203  # Now new_path has a complete unix path to the binary
18204  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18205    # Keep paths in /bin as-is, but remove trailing .exe if any
18206    new_path="${new_path/%.exe/}"
18207    # Do not save /bin paths to all_fixpath_prefixes!
18208  else
18209    # Not in mixed or Windows style, start by that.
18210    new_path=`cmd //c echo $new_path`
18211
18212  input_path="$new_path"
18213  # Check if we need to convert this using DOS-style short mode. If the path
18214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18215  # take no chances and rewrite it.
18216  # Note: m4 eats our [], so we need to use [ and ] instead.
18217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18218  if test "x$has_forbidden_chars" != x; then
18219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18221  fi
18222
18223    # Output is in $new_path
18224
18225  windows_path="$new_path"
18226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18227    unix_path=`$CYGPATH -u "$windows_path"`
18228    new_path="$unix_path"
18229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18231    new_path="$unix_path"
18232  fi
18233
18234    # remove trailing .exe if any
18235    new_path="${new_path/%.exe/}"
18236
18237    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18238    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18239  fi
18240
18241    else
18242      # We're on a unix platform. Hooray! :)
18243      # First separate the path from the arguments. This will split at the first
18244      # space.
18245      complete="$FOUND_MAKE"
18246      path="${complete%% *}"
18247      tmp="$complete EOL"
18248      arguments="${tmp#* }"
18249
18250      # Cannot rely on the command "which" here since it doesn't always work.
18251      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18252      if test -z "$is_absolute_path"; then
18253        # Path to executable is not absolute. Find it.
18254        IFS_save="$IFS"
18255        IFS=:
18256        for p in $PATH; do
18257          if test -f "$p/$path" && test -x "$p/$path"; then
18258            new_path="$p/$path"
18259            break
18260          fi
18261        done
18262        IFS="$IFS_save"
18263      else
18264        # This is an absolute path, we can use it without further modifications.
18265        new_path="$path"
18266      fi
18267
18268      if test "x$new_path" = x; then
18269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18270$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18271        has_space=`$ECHO "$complete" | $GREP " "`
18272        if test "x$has_space" != x; then
18273          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18274$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18275        fi
18276        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18277      fi
18278    fi
18279
18280    # Now join together the path and the arguments once again
18281    if test "x$arguments" != xEOL; then
18282      new_complete="$new_path ${arguments% *}"
18283    else
18284      new_complete="$new_path"
18285    fi
18286
18287    if test "x$complete" != "x$new_complete"; then
18288      FOUND_MAKE="$new_complete"
18289      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18290$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18291    fi
18292  fi
18293
18294        fi
18295      fi
18296    fi
18297  fi
18298
18299    fi
18300
18301    if test "x$FOUND_MAKE" = x; then
18302      if test "x$TOOLCHAIN_PATH" != x; then
18303        # We have a toolchain path, check that as well before giving up.
18304        OLD_PATH=$PATH
18305        PATH=$TOOLCHAIN_PATH:$PATH
18306        for ac_prog in gmake
18307do
18308  # Extract the first word of "$ac_prog", so it can be a program name with args.
18309set dummy $ac_prog; ac_word=$2
18310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18311$as_echo_n "checking for $ac_word... " >&6; }
18312if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18313  $as_echo_n "(cached) " >&6
18314else
18315  case $CHECK_TOOLSDIR_GMAKE in
18316  [\\/]* | ?:[\\/]*)
18317  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18318  ;;
18319  *)
18320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18321for as_dir in $PATH
18322do
18323  IFS=$as_save_IFS
18324  test -z "$as_dir" && as_dir=.
18325    for ac_exec_ext in '' $ac_executable_extensions; do
18326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18327    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18329    break 2
18330  fi
18331done
18332  done
18333IFS=$as_save_IFS
18334
18335  ;;
18336esac
18337fi
18338CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18339if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18341$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18342else
18343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18344$as_echo "no" >&6; }
18345fi
18346
18347
18348  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18349done
18350
18351
18352  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18353  DESCRIPTION="gmake in tools-dir"
18354
18355  # On Cygwin, we require a newer version of make than on other platforms
18356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18357    MAKE_VERSION_EXPR="-e 4\."
18358    MAKE_REQUIRED_VERSION="4.0"
18359   else
18360    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18361    MAKE_REQUIRED_VERSION="3.81"
18362  fi
18363
18364  if test "x$MAKE_CANDIDATE" != x; then
18365    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18366$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18367    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18368    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18369    if test "x$IS_GNU_MAKE" = x; then
18370      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18371$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18372    else
18373      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18374      if test "x$IS_MODERN_MAKE" = x; then
18375        { $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
18376$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;}
18377      else
18378        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18379          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18380            MAKE_EXPECTED_ENV='cygwin'
18381          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18382            MAKE_EXPECTED_ENV='msys'
18383          else
18384            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18385          fi
18386          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18387          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18388        else
18389          # Not relevant for non-Windows
18390          IS_MAKE_CORRECT_ENV=true
18391        fi
18392        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18393          { $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
18394$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;}
18395        else
18396          FOUND_MAKE=$MAKE_CANDIDATE
18397
18398  # Only process if variable expands to non-empty
18399
18400  if test "x$FOUND_MAKE" != x; then
18401    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18402
18403  # First separate the path from the arguments. This will split at the first
18404  # space.
18405  complete="$FOUND_MAKE"
18406  path="${complete%% *}"
18407  tmp="$complete EOL"
18408  arguments="${tmp#* }"
18409
18410  # Input might be given as Windows format, start by converting to
18411  # unix format.
18412  new_path=`$CYGPATH -u "$path"`
18413
18414  # Now try to locate executable using which
18415  new_path=`$WHICH "$new_path" 2> /dev/null`
18416  # bat and cmd files are not always considered executable in cygwin causing which
18417  # to not find them
18418  if test "x$new_path" = x \
18419      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18420      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18421    new_path=`$CYGPATH -u "$path"`
18422  fi
18423  if test "x$new_path" = x; then
18424    # Oops. Which didn't find the executable.
18425    # The splitting of arguments from the executable at a space might have been incorrect,
18426    # since paths with space are more likely in Windows. Give it another try with the whole
18427    # argument.
18428    path="$complete"
18429    arguments="EOL"
18430    new_path=`$CYGPATH -u "$path"`
18431    new_path=`$WHICH "$new_path" 2> /dev/null`
18432    # bat and cmd files are not always considered executable in cygwin causing which
18433    # to not find them
18434    if test "x$new_path" = x \
18435        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18436        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18437      new_path=`$CYGPATH -u "$path"`
18438    fi
18439    if test "x$new_path" = x; then
18440      # It's still not found. Now this is an unrecoverable error.
18441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18442$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18443      has_space=`$ECHO "$complete" | $GREP " "`
18444      if test "x$has_space" != x; then
18445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18447      fi
18448      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18449    fi
18450  fi
18451
18452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18455  # "foo.exe" is OK but "foo" is an error.
18456  #
18457  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18458  # It is also a way to make sure we got the proper file name for the real test later on.
18459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18460  if test "x$test_shortpath" = x; then
18461    # Short path failed, file does not exist as specified.
18462    # Try adding .exe or .cmd
18463    if test -f "${new_path}.exe"; then
18464      input_to_shortpath="${new_path}.exe"
18465    elif test -f "${new_path}.cmd"; then
18466      input_to_shortpath="${new_path}.cmd"
18467    else
18468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18469$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18470      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18471$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18472      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18473    fi
18474  else
18475    input_to_shortpath="$new_path"
18476  fi
18477
18478  # Call helper function which possibly converts this using DOS-style short mode.
18479  # If so, the updated path is stored in $new_path.
18480  new_path="$input_to_shortpath"
18481
18482  input_path="$input_to_shortpath"
18483  # Check if we need to convert this using DOS-style short mode. If the path
18484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18485  # take no chances and rewrite it.
18486  # Note: m4 eats our [], so we need to use [ and ] instead.
18487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18488  if test "x$has_forbidden_chars" != x; then
18489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18493      # Going to short mode and back again did indeed matter. Since short mode is
18494      # case insensitive, let's make it lowercase to improve readability.
18495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18496      # Now convert it back to Unix-style (cygpath)
18497      input_path=`$CYGPATH -u "$shortmode_path"`
18498      new_path="$input_path"
18499    fi
18500  fi
18501
18502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18503  if test "x$test_cygdrive_prefix" = x; then
18504    # As a simple fix, exclude /usr/bin since it's not a real path.
18505    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18507      # a path prefixed by /cygdrive for fixpath to work.
18508      new_path="$CYGWIN_ROOT_PATH$input_path"
18509    fi
18510  fi
18511
18512  # remove trailing .exe if any
18513  new_path="${new_path/%.exe/}"
18514
18515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18516
18517  # First separate the path from the arguments. This will split at the first
18518  # space.
18519  complete="$FOUND_MAKE"
18520  path="${complete%% *}"
18521  tmp="$complete EOL"
18522  arguments="${tmp#* }"
18523
18524  # Input might be given as Windows format, start by converting to
18525  # unix format.
18526  new_path="$path"
18527
18528  windows_path="$new_path"
18529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18530    unix_path=`$CYGPATH -u "$windows_path"`
18531    new_path="$unix_path"
18532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18534    new_path="$unix_path"
18535  fi
18536
18537
18538  # Now try to locate executable using which
18539  new_path=`$WHICH "$new_path" 2> /dev/null`
18540
18541  if test "x$new_path" = x; then
18542    # Oops. Which didn't find the executable.
18543    # The splitting of arguments from the executable at a space might have been incorrect,
18544    # since paths with space are more likely in Windows. Give it another try with the whole
18545    # argument.
18546    path="$complete"
18547    arguments="EOL"
18548    new_path="$path"
18549
18550  windows_path="$new_path"
18551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18552    unix_path=`$CYGPATH -u "$windows_path"`
18553    new_path="$unix_path"
18554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18556    new_path="$unix_path"
18557  fi
18558
18559
18560    new_path=`$WHICH "$new_path" 2> /dev/null`
18561    # bat and cmd files are not always considered executable in MSYS causing which
18562    # to not find them
18563    if test "x$new_path" = x \
18564        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18565        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18566      new_path="$path"
18567
18568  windows_path="$new_path"
18569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18570    unix_path=`$CYGPATH -u "$windows_path"`
18571    new_path="$unix_path"
18572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18574    new_path="$unix_path"
18575  fi
18576
18577    fi
18578
18579    if test "x$new_path" = x; then
18580      # It's still not found. Now this is an unrecoverable error.
18581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18582$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18583      has_space=`$ECHO "$complete" | $GREP " "`
18584      if test "x$has_space" != x; then
18585        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18586$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18587      fi
18588      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18589    fi
18590  fi
18591
18592  # Now new_path has a complete unix path to the binary
18593  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18594    # Keep paths in /bin as-is, but remove trailing .exe if any
18595    new_path="${new_path/%.exe/}"
18596    # Do not save /bin paths to all_fixpath_prefixes!
18597  else
18598    # Not in mixed or Windows style, start by that.
18599    new_path=`cmd //c echo $new_path`
18600
18601  input_path="$new_path"
18602  # Check if we need to convert this using DOS-style short mode. If the path
18603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18604  # take no chances and rewrite it.
18605  # Note: m4 eats our [], so we need to use [ and ] instead.
18606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18607  if test "x$has_forbidden_chars" != x; then
18608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18610  fi
18611
18612    # Output is in $new_path
18613
18614  windows_path="$new_path"
18615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18616    unix_path=`$CYGPATH -u "$windows_path"`
18617    new_path="$unix_path"
18618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18620    new_path="$unix_path"
18621  fi
18622
18623    # remove trailing .exe if any
18624    new_path="${new_path/%.exe/}"
18625
18626    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18627    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18628  fi
18629
18630    else
18631      # We're on a unix platform. Hooray! :)
18632      # First separate the path from the arguments. This will split at the first
18633      # space.
18634      complete="$FOUND_MAKE"
18635      path="${complete%% *}"
18636      tmp="$complete EOL"
18637      arguments="${tmp#* }"
18638
18639      # Cannot rely on the command "which" here since it doesn't always work.
18640      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18641      if test -z "$is_absolute_path"; then
18642        # Path to executable is not absolute. Find it.
18643        IFS_save="$IFS"
18644        IFS=:
18645        for p in $PATH; do
18646          if test -f "$p/$path" && test -x "$p/$path"; then
18647            new_path="$p/$path"
18648            break
18649          fi
18650        done
18651        IFS="$IFS_save"
18652      else
18653        # This is an absolute path, we can use it without further modifications.
18654        new_path="$path"
18655      fi
18656
18657      if test "x$new_path" = x; then
18658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18659$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18660        has_space=`$ECHO "$complete" | $GREP " "`
18661        if test "x$has_space" != x; then
18662          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18663$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18664        fi
18665        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18666      fi
18667    fi
18668
18669    # Now join together the path and the arguments once again
18670    if test "x$arguments" != xEOL; then
18671      new_complete="$new_path ${arguments% *}"
18672    else
18673      new_complete="$new_path"
18674    fi
18675
18676    if test "x$complete" != "x$new_complete"; then
18677      FOUND_MAKE="$new_complete"
18678      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18679$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18680    fi
18681  fi
18682
18683        fi
18684      fi
18685    fi
18686  fi
18687
18688        if test "x$FOUND_MAKE" = x; then
18689          for ac_prog in make
18690do
18691  # Extract the first word of "$ac_prog", so it can be a program name with args.
18692set dummy $ac_prog; ac_word=$2
18693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18694$as_echo_n "checking for $ac_word... " >&6; }
18695if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18696  $as_echo_n "(cached) " >&6
18697else
18698  case $CHECK_TOOLSDIR_MAKE in
18699  [\\/]* | ?:[\\/]*)
18700  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18701  ;;
18702  *)
18703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18704for as_dir in $PATH
18705do
18706  IFS=$as_save_IFS
18707  test -z "$as_dir" && as_dir=.
18708    for ac_exec_ext in '' $ac_executable_extensions; do
18709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18710    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18712    break 2
18713  fi
18714done
18715  done
18716IFS=$as_save_IFS
18717
18718  ;;
18719esac
18720fi
18721CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18722if test -n "$CHECK_TOOLSDIR_MAKE"; then
18723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18724$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18725else
18726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18727$as_echo "no" >&6; }
18728fi
18729
18730
18731  test -n "$CHECK_TOOLSDIR_MAKE" && break
18732done
18733
18734
18735  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18736  DESCRIPTION="make in tools-dir"
18737
18738  # On Cygwin, we require a newer version of make than on other platforms
18739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18740    MAKE_VERSION_EXPR="-e 4\."
18741    MAKE_REQUIRED_VERSION="4.0"
18742   else
18743    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18744    MAKE_REQUIRED_VERSION="3.81"
18745  fi
18746
18747  if test "x$MAKE_CANDIDATE" != x; then
18748    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18749$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18750    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18751    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18752    if test "x$IS_GNU_MAKE" = x; then
18753      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18754$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18755    else
18756      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18757      if test "x$IS_MODERN_MAKE" = x; then
18758        { $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
18759$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;}
18760      else
18761        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18762          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18763            MAKE_EXPECTED_ENV='cygwin'
18764          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18765            MAKE_EXPECTED_ENV='msys'
18766          else
18767            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18768          fi
18769          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18770          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18771        else
18772          # Not relevant for non-Windows
18773          IS_MAKE_CORRECT_ENV=true
18774        fi
18775        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18776          { $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
18777$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;}
18778        else
18779          FOUND_MAKE=$MAKE_CANDIDATE
18780
18781  # Only process if variable expands to non-empty
18782
18783  if test "x$FOUND_MAKE" != x; then
18784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18785
18786  # First separate the path from the arguments. This will split at the first
18787  # space.
18788  complete="$FOUND_MAKE"
18789  path="${complete%% *}"
18790  tmp="$complete EOL"
18791  arguments="${tmp#* }"
18792
18793  # Input might be given as Windows format, start by converting to
18794  # unix format.
18795  new_path=`$CYGPATH -u "$path"`
18796
18797  # Now try to locate executable using which
18798  new_path=`$WHICH "$new_path" 2> /dev/null`
18799  # bat and cmd files are not always considered executable in cygwin causing which
18800  # to not find them
18801  if test "x$new_path" = x \
18802      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18803      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18804    new_path=`$CYGPATH -u "$path"`
18805  fi
18806  if test "x$new_path" = x; then
18807    # Oops. Which didn't find the executable.
18808    # The splitting of arguments from the executable at a space might have been incorrect,
18809    # since paths with space are more likely in Windows. Give it another try with the whole
18810    # argument.
18811    path="$complete"
18812    arguments="EOL"
18813    new_path=`$CYGPATH -u "$path"`
18814    new_path=`$WHICH "$new_path" 2> /dev/null`
18815    # bat and cmd files are not always considered executable in cygwin causing which
18816    # to not find them
18817    if test "x$new_path" = x \
18818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18820      new_path=`$CYGPATH -u "$path"`
18821    fi
18822    if test "x$new_path" = x; then
18823      # It's still not found. Now this is an unrecoverable error.
18824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18825$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18826      has_space=`$ECHO "$complete" | $GREP " "`
18827      if test "x$has_space" != x; then
18828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18830      fi
18831      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18832    fi
18833  fi
18834
18835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18838  # "foo.exe" is OK but "foo" is an error.
18839  #
18840  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18841  # It is also a way to make sure we got the proper file name for the real test later on.
18842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18843  if test "x$test_shortpath" = x; then
18844    # Short path failed, file does not exist as specified.
18845    # Try adding .exe or .cmd
18846    if test -f "${new_path}.exe"; then
18847      input_to_shortpath="${new_path}.exe"
18848    elif test -f "${new_path}.cmd"; then
18849      input_to_shortpath="${new_path}.cmd"
18850    else
18851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18852$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18853      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18854$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18855      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18856    fi
18857  else
18858    input_to_shortpath="$new_path"
18859  fi
18860
18861  # Call helper function which possibly converts this using DOS-style short mode.
18862  # If so, the updated path is stored in $new_path.
18863  new_path="$input_to_shortpath"
18864
18865  input_path="$input_to_shortpath"
18866  # Check if we need to convert this using DOS-style short mode. If the path
18867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18868  # take no chances and rewrite it.
18869  # Note: m4 eats our [], so we need to use [ and ] instead.
18870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18871  if test "x$has_forbidden_chars" != x; then
18872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18876      # Going to short mode and back again did indeed matter. Since short mode is
18877      # case insensitive, let's make it lowercase to improve readability.
18878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18879      # Now convert it back to Unix-style (cygpath)
18880      input_path=`$CYGPATH -u "$shortmode_path"`
18881      new_path="$input_path"
18882    fi
18883  fi
18884
18885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18886  if test "x$test_cygdrive_prefix" = x; then
18887    # As a simple fix, exclude /usr/bin since it's not a real path.
18888    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18890      # a path prefixed by /cygdrive for fixpath to work.
18891      new_path="$CYGWIN_ROOT_PATH$input_path"
18892    fi
18893  fi
18894
18895  # remove trailing .exe if any
18896  new_path="${new_path/%.exe/}"
18897
18898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18899
18900  # First separate the path from the arguments. This will split at the first
18901  # space.
18902  complete="$FOUND_MAKE"
18903  path="${complete%% *}"
18904  tmp="$complete EOL"
18905  arguments="${tmp#* }"
18906
18907  # Input might be given as Windows format, start by converting to
18908  # unix format.
18909  new_path="$path"
18910
18911  windows_path="$new_path"
18912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18913    unix_path=`$CYGPATH -u "$windows_path"`
18914    new_path="$unix_path"
18915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18917    new_path="$unix_path"
18918  fi
18919
18920
18921  # Now try to locate executable using which
18922  new_path=`$WHICH "$new_path" 2> /dev/null`
18923
18924  if test "x$new_path" = x; then
18925    # Oops. Which didn't find the executable.
18926    # The splitting of arguments from the executable at a space might have been incorrect,
18927    # since paths with space are more likely in Windows. Give it another try with the whole
18928    # argument.
18929    path="$complete"
18930    arguments="EOL"
18931    new_path="$path"
18932
18933  windows_path="$new_path"
18934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18935    unix_path=`$CYGPATH -u "$windows_path"`
18936    new_path="$unix_path"
18937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18939    new_path="$unix_path"
18940  fi
18941
18942
18943    new_path=`$WHICH "$new_path" 2> /dev/null`
18944    # bat and cmd files are not always considered executable in MSYS causing which
18945    # to not find them
18946    if test "x$new_path" = x \
18947        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18948        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18949      new_path="$path"
18950
18951  windows_path="$new_path"
18952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18953    unix_path=`$CYGPATH -u "$windows_path"`
18954    new_path="$unix_path"
18955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18957    new_path="$unix_path"
18958  fi
18959
18960    fi
18961
18962    if test "x$new_path" = x; then
18963      # It's still not found. Now this is an unrecoverable error.
18964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18965$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18966      has_space=`$ECHO "$complete" | $GREP " "`
18967      if test "x$has_space" != x; then
18968        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18969$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18970      fi
18971      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18972    fi
18973  fi
18974
18975  # Now new_path has a complete unix path to the binary
18976  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18977    # Keep paths in /bin as-is, but remove trailing .exe if any
18978    new_path="${new_path/%.exe/}"
18979    # Do not save /bin paths to all_fixpath_prefixes!
18980  else
18981    # Not in mixed or Windows style, start by that.
18982    new_path=`cmd //c echo $new_path`
18983
18984  input_path="$new_path"
18985  # Check if we need to convert this using DOS-style short mode. If the path
18986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18987  # take no chances and rewrite it.
18988  # Note: m4 eats our [], so we need to use [ and ] instead.
18989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18990  if test "x$has_forbidden_chars" != x; then
18991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18993  fi
18994
18995    # Output is in $new_path
18996
18997  windows_path="$new_path"
18998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18999    unix_path=`$CYGPATH -u "$windows_path"`
19000    new_path="$unix_path"
19001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19003    new_path="$unix_path"
19004  fi
19005
19006    # remove trailing .exe if any
19007    new_path="${new_path/%.exe/}"
19008
19009    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19010    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19011  fi
19012
19013    else
19014      # We're on a unix platform. Hooray! :)
19015      # First separate the path from the arguments. This will split at the first
19016      # space.
19017      complete="$FOUND_MAKE"
19018      path="${complete%% *}"
19019      tmp="$complete EOL"
19020      arguments="${tmp#* }"
19021
19022      # Cannot rely on the command "which" here since it doesn't always work.
19023      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19024      if test -z "$is_absolute_path"; then
19025        # Path to executable is not absolute. Find it.
19026        IFS_save="$IFS"
19027        IFS=:
19028        for p in $PATH; do
19029          if test -f "$p/$path" && test -x "$p/$path"; then
19030            new_path="$p/$path"
19031            break
19032          fi
19033        done
19034        IFS="$IFS_save"
19035      else
19036        # This is an absolute path, we can use it without further modifications.
19037        new_path="$path"
19038      fi
19039
19040      if test "x$new_path" = x; then
19041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19042$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19043        has_space=`$ECHO "$complete" | $GREP " "`
19044        if test "x$has_space" != x; then
19045          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19047        fi
19048        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19049      fi
19050    fi
19051
19052    # Now join together the path and the arguments once again
19053    if test "x$arguments" != xEOL; then
19054      new_complete="$new_path ${arguments% *}"
19055    else
19056      new_complete="$new_path"
19057    fi
19058
19059    if test "x$complete" != "x$new_complete"; then
19060      FOUND_MAKE="$new_complete"
19061      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19062$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19063    fi
19064  fi
19065
19066        fi
19067      fi
19068    fi
19069  fi
19070
19071        fi
19072        PATH=$OLD_PATH
19073      fi
19074    fi
19075
19076    if test "x$FOUND_MAKE" = x; then
19077      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
19078    fi
19079
19080  else
19081    # The variable is set, but is it from the command line or the environment?
19082
19083    # Try to remove the string !MAKE! from our list.
19084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19086      # If it failed, the variable was not from the command line. Ignore it,
19087      # but warn the user (except for BASH, which is always set by the calling BASH).
19088      if test "xMAKE" != xBASH; then
19089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19090$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19091      fi
19092      # Try to locate tool using the code snippet
19093
19094    # Try our hardest to locate a correct version of GNU make
19095    for ac_prog in gmake
19096do
19097  # Extract the first word of "$ac_prog", so it can be a program name with args.
19098set dummy $ac_prog; ac_word=$2
19099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19100$as_echo_n "checking for $ac_word... " >&6; }
19101if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19102  $as_echo_n "(cached) " >&6
19103else
19104  case $CHECK_GMAKE in
19105  [\\/]* | ?:[\\/]*)
19106  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19107  ;;
19108  *)
19109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19110for as_dir in $PATH
19111do
19112  IFS=$as_save_IFS
19113  test -z "$as_dir" && as_dir=.
19114    for ac_exec_ext in '' $ac_executable_extensions; do
19115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19116    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19118    break 2
19119  fi
19120done
19121  done
19122IFS=$as_save_IFS
19123
19124  ;;
19125esac
19126fi
19127CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19128if test -n "$CHECK_GMAKE"; then
19129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19130$as_echo "$CHECK_GMAKE" >&6; }
19131else
19132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19133$as_echo "no" >&6; }
19134fi
19135
19136
19137  test -n "$CHECK_GMAKE" && break
19138done
19139
19140
19141  MAKE_CANDIDATE=""$CHECK_GMAKE""
19142  DESCRIPTION="gmake in PATH"
19143
19144  # On Cygwin, we require a newer version of make than on other platforms
19145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19146    MAKE_VERSION_EXPR="-e 4\."
19147    MAKE_REQUIRED_VERSION="4.0"
19148   else
19149    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19150    MAKE_REQUIRED_VERSION="3.81"
19151  fi
19152
19153  if test "x$MAKE_CANDIDATE" != x; then
19154    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19155$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19156    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19157    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19158    if test "x$IS_GNU_MAKE" = x; then
19159      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19160$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19161    else
19162      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19163      if test "x$IS_MODERN_MAKE" = x; then
19164        { $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
19165$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;}
19166      else
19167        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19168          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19169            MAKE_EXPECTED_ENV='cygwin'
19170          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19171            MAKE_EXPECTED_ENV='msys'
19172          else
19173            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19174          fi
19175          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19176          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19177        else
19178          # Not relevant for non-Windows
19179          IS_MAKE_CORRECT_ENV=true
19180        fi
19181        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19182          { $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
19183$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;}
19184        else
19185          FOUND_MAKE=$MAKE_CANDIDATE
19186
19187  # Only process if variable expands to non-empty
19188
19189  if test "x$FOUND_MAKE" != x; then
19190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19191
19192  # First separate the path from the arguments. This will split at the first
19193  # space.
19194  complete="$FOUND_MAKE"
19195  path="${complete%% *}"
19196  tmp="$complete EOL"
19197  arguments="${tmp#* }"
19198
19199  # Input might be given as Windows format, start by converting to
19200  # unix format.
19201  new_path=`$CYGPATH -u "$path"`
19202
19203  # Now try to locate executable using which
19204  new_path=`$WHICH "$new_path" 2> /dev/null`
19205  # bat and cmd files are not always considered executable in cygwin causing which
19206  # to not find them
19207  if test "x$new_path" = x \
19208      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19209      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19210    new_path=`$CYGPATH -u "$path"`
19211  fi
19212  if test "x$new_path" = x; then
19213    # Oops. Which didn't find the executable.
19214    # The splitting of arguments from the executable at a space might have been incorrect,
19215    # since paths with space are more likely in Windows. Give it another try with the whole
19216    # argument.
19217    path="$complete"
19218    arguments="EOL"
19219    new_path=`$CYGPATH -u "$path"`
19220    new_path=`$WHICH "$new_path" 2> /dev/null`
19221    # bat and cmd files are not always considered executable in cygwin causing which
19222    # to not find them
19223    if test "x$new_path" = x \
19224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19226      new_path=`$CYGPATH -u "$path"`
19227    fi
19228    if test "x$new_path" = x; then
19229      # It's still not found. Now this is an unrecoverable error.
19230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19231$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19232      has_space=`$ECHO "$complete" | $GREP " "`
19233      if test "x$has_space" != x; then
19234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19236      fi
19237      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19238    fi
19239  fi
19240
19241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19244  # "foo.exe" is OK but "foo" is an error.
19245  #
19246  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19247  # It is also a way to make sure we got the proper file name for the real test later on.
19248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19249  if test "x$test_shortpath" = x; then
19250    # Short path failed, file does not exist as specified.
19251    # Try adding .exe or .cmd
19252    if test -f "${new_path}.exe"; then
19253      input_to_shortpath="${new_path}.exe"
19254    elif test -f "${new_path}.cmd"; then
19255      input_to_shortpath="${new_path}.cmd"
19256    else
19257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19258$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19259      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19260$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19261      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19262    fi
19263  else
19264    input_to_shortpath="$new_path"
19265  fi
19266
19267  # Call helper function which possibly converts this using DOS-style short mode.
19268  # If so, the updated path is stored in $new_path.
19269  new_path="$input_to_shortpath"
19270
19271  input_path="$input_to_shortpath"
19272  # Check if we need to convert this using DOS-style short mode. If the path
19273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19274  # take no chances and rewrite it.
19275  # Note: m4 eats our [], so we need to use [ and ] instead.
19276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19277  if test "x$has_forbidden_chars" != x; then
19278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19282      # Going to short mode and back again did indeed matter. Since short mode is
19283      # case insensitive, let's make it lowercase to improve readability.
19284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19285      # Now convert it back to Unix-style (cygpath)
19286      input_path=`$CYGPATH -u "$shortmode_path"`
19287      new_path="$input_path"
19288    fi
19289  fi
19290
19291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19292  if test "x$test_cygdrive_prefix" = x; then
19293    # As a simple fix, exclude /usr/bin since it's not a real path.
19294    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19296      # a path prefixed by /cygdrive for fixpath to work.
19297      new_path="$CYGWIN_ROOT_PATH$input_path"
19298    fi
19299  fi
19300
19301  # remove trailing .exe if any
19302  new_path="${new_path/%.exe/}"
19303
19304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19305
19306  # First separate the path from the arguments. This will split at the first
19307  # space.
19308  complete="$FOUND_MAKE"
19309  path="${complete%% *}"
19310  tmp="$complete EOL"
19311  arguments="${tmp#* }"
19312
19313  # Input might be given as Windows format, start by converting to
19314  # unix format.
19315  new_path="$path"
19316
19317  windows_path="$new_path"
19318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19319    unix_path=`$CYGPATH -u "$windows_path"`
19320    new_path="$unix_path"
19321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19323    new_path="$unix_path"
19324  fi
19325
19326
19327  # Now try to locate executable using which
19328  new_path=`$WHICH "$new_path" 2> /dev/null`
19329
19330  if test "x$new_path" = x; then
19331    # Oops. Which didn't find the executable.
19332    # The splitting of arguments from the executable at a space might have been incorrect,
19333    # since paths with space are more likely in Windows. Give it another try with the whole
19334    # argument.
19335    path="$complete"
19336    arguments="EOL"
19337    new_path="$path"
19338
19339  windows_path="$new_path"
19340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19341    unix_path=`$CYGPATH -u "$windows_path"`
19342    new_path="$unix_path"
19343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19345    new_path="$unix_path"
19346  fi
19347
19348
19349    new_path=`$WHICH "$new_path" 2> /dev/null`
19350    # bat and cmd files are not always considered executable in MSYS causing which
19351    # to not find them
19352    if test "x$new_path" = x \
19353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19355      new_path="$path"
19356
19357  windows_path="$new_path"
19358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19359    unix_path=`$CYGPATH -u "$windows_path"`
19360    new_path="$unix_path"
19361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19363    new_path="$unix_path"
19364  fi
19365
19366    fi
19367
19368    if test "x$new_path" = x; then
19369      # It's still not found. Now this is an unrecoverable error.
19370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19371$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19372      has_space=`$ECHO "$complete" | $GREP " "`
19373      if test "x$has_space" != x; then
19374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19376      fi
19377      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19378    fi
19379  fi
19380
19381  # Now new_path has a complete unix path to the binary
19382  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19383    # Keep paths in /bin as-is, but remove trailing .exe if any
19384    new_path="${new_path/%.exe/}"
19385    # Do not save /bin paths to all_fixpath_prefixes!
19386  else
19387    # Not in mixed or Windows style, start by that.
19388    new_path=`cmd //c echo $new_path`
19389
19390  input_path="$new_path"
19391  # Check if we need to convert this using DOS-style short mode. If the path
19392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19393  # take no chances and rewrite it.
19394  # Note: m4 eats our [], so we need to use [ and ] instead.
19395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19396  if test "x$has_forbidden_chars" != x; then
19397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19399  fi
19400
19401    # Output is in $new_path
19402
19403  windows_path="$new_path"
19404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19405    unix_path=`$CYGPATH -u "$windows_path"`
19406    new_path="$unix_path"
19407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19409    new_path="$unix_path"
19410  fi
19411
19412    # remove trailing .exe if any
19413    new_path="${new_path/%.exe/}"
19414
19415    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19416    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19417  fi
19418
19419    else
19420      # We're on a unix platform. Hooray! :)
19421      # First separate the path from the arguments. This will split at the first
19422      # space.
19423      complete="$FOUND_MAKE"
19424      path="${complete%% *}"
19425      tmp="$complete EOL"
19426      arguments="${tmp#* }"
19427
19428      # Cannot rely on the command "which" here since it doesn't always work.
19429      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19430      if test -z "$is_absolute_path"; then
19431        # Path to executable is not absolute. Find it.
19432        IFS_save="$IFS"
19433        IFS=:
19434        for p in $PATH; do
19435          if test -f "$p/$path" && test -x "$p/$path"; then
19436            new_path="$p/$path"
19437            break
19438          fi
19439        done
19440        IFS="$IFS_save"
19441      else
19442        # This is an absolute path, we can use it without further modifications.
19443        new_path="$path"
19444      fi
19445
19446      if test "x$new_path" = x; then
19447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19448$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19449        has_space=`$ECHO "$complete" | $GREP " "`
19450        if test "x$has_space" != x; then
19451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19453        fi
19454        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19455      fi
19456    fi
19457
19458    # Now join together the path and the arguments once again
19459    if test "x$arguments" != xEOL; then
19460      new_complete="$new_path ${arguments% *}"
19461    else
19462      new_complete="$new_path"
19463    fi
19464
19465    if test "x$complete" != "x$new_complete"; then
19466      FOUND_MAKE="$new_complete"
19467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19468$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19469    fi
19470  fi
19471
19472        fi
19473      fi
19474    fi
19475  fi
19476
19477
19478    if test "x$FOUND_MAKE" = x; then
19479      for ac_prog in make
19480do
19481  # Extract the first word of "$ac_prog", so it can be a program name with args.
19482set dummy $ac_prog; ac_word=$2
19483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19484$as_echo_n "checking for $ac_word... " >&6; }
19485if ${ac_cv_path_CHECK_MAKE+:} false; then :
19486  $as_echo_n "(cached) " >&6
19487else
19488  case $CHECK_MAKE in
19489  [\\/]* | ?:[\\/]*)
19490  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19491  ;;
19492  *)
19493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19494for as_dir in $PATH
19495do
19496  IFS=$as_save_IFS
19497  test -z "$as_dir" && as_dir=.
19498    for ac_exec_ext in '' $ac_executable_extensions; do
19499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19500    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19502    break 2
19503  fi
19504done
19505  done
19506IFS=$as_save_IFS
19507
19508  ;;
19509esac
19510fi
19511CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19512if test -n "$CHECK_MAKE"; then
19513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19514$as_echo "$CHECK_MAKE" >&6; }
19515else
19516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19517$as_echo "no" >&6; }
19518fi
19519
19520
19521  test -n "$CHECK_MAKE" && break
19522done
19523
19524
19525  MAKE_CANDIDATE=""$CHECK_MAKE""
19526  DESCRIPTION="make in PATH"
19527
19528  # On Cygwin, we require a newer version of make than on other platforms
19529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19530    MAKE_VERSION_EXPR="-e 4\."
19531    MAKE_REQUIRED_VERSION="4.0"
19532   else
19533    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19534    MAKE_REQUIRED_VERSION="3.81"
19535  fi
19536
19537  if test "x$MAKE_CANDIDATE" != x; then
19538    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19539$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19540    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19541    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19542    if test "x$IS_GNU_MAKE" = x; then
19543      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19544$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19545    else
19546      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19547      if test "x$IS_MODERN_MAKE" = x; then
19548        { $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
19549$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;}
19550      else
19551        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19552          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19553            MAKE_EXPECTED_ENV='cygwin'
19554          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19555            MAKE_EXPECTED_ENV='msys'
19556          else
19557            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19558          fi
19559          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19560          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19561        else
19562          # Not relevant for non-Windows
19563          IS_MAKE_CORRECT_ENV=true
19564        fi
19565        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19566          { $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
19567$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;}
19568        else
19569          FOUND_MAKE=$MAKE_CANDIDATE
19570
19571  # Only process if variable expands to non-empty
19572
19573  if test "x$FOUND_MAKE" != x; then
19574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19575
19576  # First separate the path from the arguments. This will split at the first
19577  # space.
19578  complete="$FOUND_MAKE"
19579  path="${complete%% *}"
19580  tmp="$complete EOL"
19581  arguments="${tmp#* }"
19582
19583  # Input might be given as Windows format, start by converting to
19584  # unix format.
19585  new_path=`$CYGPATH -u "$path"`
19586
19587  # Now try to locate executable using which
19588  new_path=`$WHICH "$new_path" 2> /dev/null`
19589  # bat and cmd files are not always considered executable in cygwin causing which
19590  # to not find them
19591  if test "x$new_path" = x \
19592      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19593      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19594    new_path=`$CYGPATH -u "$path"`
19595  fi
19596  if test "x$new_path" = x; then
19597    # Oops. Which didn't find the executable.
19598    # The splitting of arguments from the executable at a space might have been incorrect,
19599    # since paths with space are more likely in Windows. Give it another try with the whole
19600    # argument.
19601    path="$complete"
19602    arguments="EOL"
19603    new_path=`$CYGPATH -u "$path"`
19604    new_path=`$WHICH "$new_path" 2> /dev/null`
19605    # bat and cmd files are not always considered executable in cygwin causing which
19606    # to not find them
19607    if test "x$new_path" = x \
19608        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19609        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19610      new_path=`$CYGPATH -u "$path"`
19611    fi
19612    if test "x$new_path" = x; then
19613      # It's still not found. Now this is an unrecoverable error.
19614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19615$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19616      has_space=`$ECHO "$complete" | $GREP " "`
19617      if test "x$has_space" != x; then
19618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19620      fi
19621      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19622    fi
19623  fi
19624
19625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19628  # "foo.exe" is OK but "foo" is an error.
19629  #
19630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19631  # It is also a way to make sure we got the proper file name for the real test later on.
19632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19633  if test "x$test_shortpath" = x; then
19634    # Short path failed, file does not exist as specified.
19635    # Try adding .exe or .cmd
19636    if test -f "${new_path}.exe"; then
19637      input_to_shortpath="${new_path}.exe"
19638    elif test -f "${new_path}.cmd"; then
19639      input_to_shortpath="${new_path}.cmd"
19640    else
19641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19642$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19645      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19646    fi
19647  else
19648    input_to_shortpath="$new_path"
19649  fi
19650
19651  # Call helper function which possibly converts this using DOS-style short mode.
19652  # If so, the updated path is stored in $new_path.
19653  new_path="$input_to_shortpath"
19654
19655  input_path="$input_to_shortpath"
19656  # Check if we need to convert this using DOS-style short mode. If the path
19657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19658  # take no chances and rewrite it.
19659  # Note: m4 eats our [], so we need to use [ and ] instead.
19660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19661  if test "x$has_forbidden_chars" != x; then
19662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19666      # Going to short mode and back again did indeed matter. Since short mode is
19667      # case insensitive, let's make it lowercase to improve readability.
19668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19669      # Now convert it back to Unix-style (cygpath)
19670      input_path=`$CYGPATH -u "$shortmode_path"`
19671      new_path="$input_path"
19672    fi
19673  fi
19674
19675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19676  if test "x$test_cygdrive_prefix" = x; then
19677    # As a simple fix, exclude /usr/bin since it's not a real path.
19678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19680      # a path prefixed by /cygdrive for fixpath to work.
19681      new_path="$CYGWIN_ROOT_PATH$input_path"
19682    fi
19683  fi
19684
19685  # remove trailing .exe if any
19686  new_path="${new_path/%.exe/}"
19687
19688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19689
19690  # First separate the path from the arguments. This will split at the first
19691  # space.
19692  complete="$FOUND_MAKE"
19693  path="${complete%% *}"
19694  tmp="$complete EOL"
19695  arguments="${tmp#* }"
19696
19697  # Input might be given as Windows format, start by converting to
19698  # unix format.
19699  new_path="$path"
19700
19701  windows_path="$new_path"
19702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19703    unix_path=`$CYGPATH -u "$windows_path"`
19704    new_path="$unix_path"
19705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19707    new_path="$unix_path"
19708  fi
19709
19710
19711  # Now try to locate executable using which
19712  new_path=`$WHICH "$new_path" 2> /dev/null`
19713
19714  if test "x$new_path" = x; then
19715    # Oops. Which didn't find the executable.
19716    # The splitting of arguments from the executable at a space might have been incorrect,
19717    # since paths with space are more likely in Windows. Give it another try with the whole
19718    # argument.
19719    path="$complete"
19720    arguments="EOL"
19721    new_path="$path"
19722
19723  windows_path="$new_path"
19724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19725    unix_path=`$CYGPATH -u "$windows_path"`
19726    new_path="$unix_path"
19727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19729    new_path="$unix_path"
19730  fi
19731
19732
19733    new_path=`$WHICH "$new_path" 2> /dev/null`
19734    # bat and cmd files are not always considered executable in MSYS causing which
19735    # to not find them
19736    if test "x$new_path" = x \
19737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19739      new_path="$path"
19740
19741  windows_path="$new_path"
19742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19743    unix_path=`$CYGPATH -u "$windows_path"`
19744    new_path="$unix_path"
19745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19747    new_path="$unix_path"
19748  fi
19749
19750    fi
19751
19752    if test "x$new_path" = x; then
19753      # It's still not found. Now this is an unrecoverable error.
19754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19755$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19756      has_space=`$ECHO "$complete" | $GREP " "`
19757      if test "x$has_space" != x; then
19758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19760      fi
19761      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19762    fi
19763  fi
19764
19765  # Now new_path has a complete unix path to the binary
19766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19767    # Keep paths in /bin as-is, but remove trailing .exe if any
19768    new_path="${new_path/%.exe/}"
19769    # Do not save /bin paths to all_fixpath_prefixes!
19770  else
19771    # Not in mixed or Windows style, start by that.
19772    new_path=`cmd //c echo $new_path`
19773
19774  input_path="$new_path"
19775  # Check if we need to convert this using DOS-style short mode. If the path
19776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19777  # take no chances and rewrite it.
19778  # Note: m4 eats our [], so we need to use [ and ] instead.
19779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19780  if test "x$has_forbidden_chars" != x; then
19781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19783  fi
19784
19785    # Output is in $new_path
19786
19787  windows_path="$new_path"
19788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19789    unix_path=`$CYGPATH -u "$windows_path"`
19790    new_path="$unix_path"
19791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19793    new_path="$unix_path"
19794  fi
19795
19796    # remove trailing .exe if any
19797    new_path="${new_path/%.exe/}"
19798
19799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19801  fi
19802
19803    else
19804      # We're on a unix platform. Hooray! :)
19805      # First separate the path from the arguments. This will split at the first
19806      # space.
19807      complete="$FOUND_MAKE"
19808      path="${complete%% *}"
19809      tmp="$complete EOL"
19810      arguments="${tmp#* }"
19811
19812      # Cannot rely on the command "which" here since it doesn't always work.
19813      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19814      if test -z "$is_absolute_path"; then
19815        # Path to executable is not absolute. Find it.
19816        IFS_save="$IFS"
19817        IFS=:
19818        for p in $PATH; do
19819          if test -f "$p/$path" && test -x "$p/$path"; then
19820            new_path="$p/$path"
19821            break
19822          fi
19823        done
19824        IFS="$IFS_save"
19825      else
19826        # This is an absolute path, we can use it without further modifications.
19827        new_path="$path"
19828      fi
19829
19830      if test "x$new_path" = x; then
19831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19832$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19833        has_space=`$ECHO "$complete" | $GREP " "`
19834        if test "x$has_space" != x; then
19835          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19837        fi
19838        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19839      fi
19840    fi
19841
19842    # Now join together the path and the arguments once again
19843    if test "x$arguments" != xEOL; then
19844      new_complete="$new_path ${arguments% *}"
19845    else
19846      new_complete="$new_path"
19847    fi
19848
19849    if test "x$complete" != "x$new_complete"; then
19850      FOUND_MAKE="$new_complete"
19851      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19852$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19853    fi
19854  fi
19855
19856        fi
19857      fi
19858    fi
19859  fi
19860
19861    fi
19862
19863    if test "x$FOUND_MAKE" = x; then
19864      if test "x$TOOLCHAIN_PATH" != x; then
19865        # We have a toolchain path, check that as well before giving up.
19866        OLD_PATH=$PATH
19867        PATH=$TOOLCHAIN_PATH:$PATH
19868        for ac_prog in gmake
19869do
19870  # Extract the first word of "$ac_prog", so it can be a program name with args.
19871set dummy $ac_prog; ac_word=$2
19872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19873$as_echo_n "checking for $ac_word... " >&6; }
19874if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19875  $as_echo_n "(cached) " >&6
19876else
19877  case $CHECK_TOOLSDIR_GMAKE in
19878  [\\/]* | ?:[\\/]*)
19879  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19880  ;;
19881  *)
19882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19883for as_dir in $PATH
19884do
19885  IFS=$as_save_IFS
19886  test -z "$as_dir" && as_dir=.
19887    for ac_exec_ext in '' $ac_executable_extensions; do
19888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19889    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19891    break 2
19892  fi
19893done
19894  done
19895IFS=$as_save_IFS
19896
19897  ;;
19898esac
19899fi
19900CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19901if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19903$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19904else
19905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19906$as_echo "no" >&6; }
19907fi
19908
19909
19910  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19911done
19912
19913
19914  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19915  DESCRIPTION="gmake in tools-dir"
19916
19917  # On Cygwin, we require a newer version of make than on other platforms
19918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19919    MAKE_VERSION_EXPR="-e 4\."
19920    MAKE_REQUIRED_VERSION="4.0"
19921   else
19922    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19923    MAKE_REQUIRED_VERSION="3.81"
19924  fi
19925
19926  if test "x$MAKE_CANDIDATE" != x; then
19927    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19928$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19929    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19930    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19931    if test "x$IS_GNU_MAKE" = x; then
19932      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19933$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19934    else
19935      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19936      if test "x$IS_MODERN_MAKE" = x; then
19937        { $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
19938$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;}
19939      else
19940        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19941          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19942            MAKE_EXPECTED_ENV='cygwin'
19943          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19944            MAKE_EXPECTED_ENV='msys'
19945          else
19946            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19947          fi
19948          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19949          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19950        else
19951          # Not relevant for non-Windows
19952          IS_MAKE_CORRECT_ENV=true
19953        fi
19954        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19955          { $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
19956$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;}
19957        else
19958          FOUND_MAKE=$MAKE_CANDIDATE
19959
19960  # Only process if variable expands to non-empty
19961
19962  if test "x$FOUND_MAKE" != x; then
19963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19964
19965  # First separate the path from the arguments. This will split at the first
19966  # space.
19967  complete="$FOUND_MAKE"
19968  path="${complete%% *}"
19969  tmp="$complete EOL"
19970  arguments="${tmp#* }"
19971
19972  # Input might be given as Windows format, start by converting to
19973  # unix format.
19974  new_path=`$CYGPATH -u "$path"`
19975
19976  # Now try to locate executable using which
19977  new_path=`$WHICH "$new_path" 2> /dev/null`
19978  # bat and cmd files are not always considered executable in cygwin causing which
19979  # to not find them
19980  if test "x$new_path" = x \
19981      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19982      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19983    new_path=`$CYGPATH -u "$path"`
19984  fi
19985  if test "x$new_path" = x; then
19986    # Oops. Which didn't find the executable.
19987    # The splitting of arguments from the executable at a space might have been incorrect,
19988    # since paths with space are more likely in Windows. Give it another try with the whole
19989    # argument.
19990    path="$complete"
19991    arguments="EOL"
19992    new_path=`$CYGPATH -u "$path"`
19993    new_path=`$WHICH "$new_path" 2> /dev/null`
19994    # bat and cmd files are not always considered executable in cygwin causing which
19995    # to not find them
19996    if test "x$new_path" = x \
19997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19999      new_path=`$CYGPATH -u "$path"`
20000    fi
20001    if test "x$new_path" = x; then
20002      # It's still not found. Now this is an unrecoverable error.
20003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20005      has_space=`$ECHO "$complete" | $GREP " "`
20006      if test "x$has_space" != x; then
20007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20009      fi
20010      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20011    fi
20012  fi
20013
20014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20017  # "foo.exe" is OK but "foo" is an error.
20018  #
20019  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20020  # It is also a way to make sure we got the proper file name for the real test later on.
20021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20022  if test "x$test_shortpath" = x; then
20023    # Short path failed, file does not exist as specified.
20024    # Try adding .exe or .cmd
20025    if test -f "${new_path}.exe"; then
20026      input_to_shortpath="${new_path}.exe"
20027    elif test -f "${new_path}.cmd"; then
20028      input_to_shortpath="${new_path}.cmd"
20029    else
20030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20031$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20032      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20033$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20034      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20035    fi
20036  else
20037    input_to_shortpath="$new_path"
20038  fi
20039
20040  # Call helper function which possibly converts this using DOS-style short mode.
20041  # If so, the updated path is stored in $new_path.
20042  new_path="$input_to_shortpath"
20043
20044  input_path="$input_to_shortpath"
20045  # Check if we need to convert this using DOS-style short mode. If the path
20046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20047  # take no chances and rewrite it.
20048  # Note: m4 eats our [], so we need to use [ and ] instead.
20049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20050  if test "x$has_forbidden_chars" != x; then
20051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20055      # Going to short mode and back again did indeed matter. Since short mode is
20056      # case insensitive, let's make it lowercase to improve readability.
20057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20058      # Now convert it back to Unix-style (cygpath)
20059      input_path=`$CYGPATH -u "$shortmode_path"`
20060      new_path="$input_path"
20061    fi
20062  fi
20063
20064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20065  if test "x$test_cygdrive_prefix" = x; then
20066    # As a simple fix, exclude /usr/bin since it's not a real path.
20067    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20069      # a path prefixed by /cygdrive for fixpath to work.
20070      new_path="$CYGWIN_ROOT_PATH$input_path"
20071    fi
20072  fi
20073
20074  # remove trailing .exe if any
20075  new_path="${new_path/%.exe/}"
20076
20077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20078
20079  # First separate the path from the arguments. This will split at the first
20080  # space.
20081  complete="$FOUND_MAKE"
20082  path="${complete%% *}"
20083  tmp="$complete EOL"
20084  arguments="${tmp#* }"
20085
20086  # Input might be given as Windows format, start by converting to
20087  # unix format.
20088  new_path="$path"
20089
20090  windows_path="$new_path"
20091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20092    unix_path=`$CYGPATH -u "$windows_path"`
20093    new_path="$unix_path"
20094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20096    new_path="$unix_path"
20097  fi
20098
20099
20100  # Now try to locate executable using which
20101  new_path=`$WHICH "$new_path" 2> /dev/null`
20102
20103  if test "x$new_path" = x; then
20104    # Oops. Which didn't find the executable.
20105    # The splitting of arguments from the executable at a space might have been incorrect,
20106    # since paths with space are more likely in Windows. Give it another try with the whole
20107    # argument.
20108    path="$complete"
20109    arguments="EOL"
20110    new_path="$path"
20111
20112  windows_path="$new_path"
20113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20114    unix_path=`$CYGPATH -u "$windows_path"`
20115    new_path="$unix_path"
20116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20118    new_path="$unix_path"
20119  fi
20120
20121
20122    new_path=`$WHICH "$new_path" 2> /dev/null`
20123    # bat and cmd files are not always considered executable in MSYS causing which
20124    # to not find them
20125    if test "x$new_path" = x \
20126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20128      new_path="$path"
20129
20130  windows_path="$new_path"
20131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20132    unix_path=`$CYGPATH -u "$windows_path"`
20133    new_path="$unix_path"
20134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20136    new_path="$unix_path"
20137  fi
20138
20139    fi
20140
20141    if test "x$new_path" = x; then
20142      # It's still not found. Now this is an unrecoverable error.
20143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20144$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20145      has_space=`$ECHO "$complete" | $GREP " "`
20146      if test "x$has_space" != x; then
20147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20149      fi
20150      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20151    fi
20152  fi
20153
20154  # Now new_path has a complete unix path to the binary
20155  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20156    # Keep paths in /bin as-is, but remove trailing .exe if any
20157    new_path="${new_path/%.exe/}"
20158    # Do not save /bin paths to all_fixpath_prefixes!
20159  else
20160    # Not in mixed or Windows style, start by that.
20161    new_path=`cmd //c echo $new_path`
20162
20163  input_path="$new_path"
20164  # Check if we need to convert this using DOS-style short mode. If the path
20165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20166  # take no chances and rewrite it.
20167  # Note: m4 eats our [], so we need to use [ and ] instead.
20168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20169  if test "x$has_forbidden_chars" != x; then
20170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20172  fi
20173
20174    # Output is in $new_path
20175
20176  windows_path="$new_path"
20177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20178    unix_path=`$CYGPATH -u "$windows_path"`
20179    new_path="$unix_path"
20180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20182    new_path="$unix_path"
20183  fi
20184
20185    # remove trailing .exe if any
20186    new_path="${new_path/%.exe/}"
20187
20188    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20189    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20190  fi
20191
20192    else
20193      # We're on a unix platform. Hooray! :)
20194      # First separate the path from the arguments. This will split at the first
20195      # space.
20196      complete="$FOUND_MAKE"
20197      path="${complete%% *}"
20198      tmp="$complete EOL"
20199      arguments="${tmp#* }"
20200
20201      # Cannot rely on the command "which" here since it doesn't always work.
20202      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20203      if test -z "$is_absolute_path"; then
20204        # Path to executable is not absolute. Find it.
20205        IFS_save="$IFS"
20206        IFS=:
20207        for p in $PATH; do
20208          if test -f "$p/$path" && test -x "$p/$path"; then
20209            new_path="$p/$path"
20210            break
20211          fi
20212        done
20213        IFS="$IFS_save"
20214      else
20215        # This is an absolute path, we can use it without further modifications.
20216        new_path="$path"
20217      fi
20218
20219      if test "x$new_path" = x; then
20220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20221$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20222        has_space=`$ECHO "$complete" | $GREP " "`
20223        if test "x$has_space" != x; then
20224          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20225$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20226        fi
20227        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20228      fi
20229    fi
20230
20231    # Now join together the path and the arguments once again
20232    if test "x$arguments" != xEOL; then
20233      new_complete="$new_path ${arguments% *}"
20234    else
20235      new_complete="$new_path"
20236    fi
20237
20238    if test "x$complete" != "x$new_complete"; then
20239      FOUND_MAKE="$new_complete"
20240      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20241$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20242    fi
20243  fi
20244
20245        fi
20246      fi
20247    fi
20248  fi
20249
20250        if test "x$FOUND_MAKE" = x; then
20251          for ac_prog in make
20252do
20253  # Extract the first word of "$ac_prog", so it can be a program name with args.
20254set dummy $ac_prog; ac_word=$2
20255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20256$as_echo_n "checking for $ac_word... " >&6; }
20257if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20258  $as_echo_n "(cached) " >&6
20259else
20260  case $CHECK_TOOLSDIR_MAKE in
20261  [\\/]* | ?:[\\/]*)
20262  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20263  ;;
20264  *)
20265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20266for as_dir in $PATH
20267do
20268  IFS=$as_save_IFS
20269  test -z "$as_dir" && as_dir=.
20270    for ac_exec_ext in '' $ac_executable_extensions; do
20271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20272    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20274    break 2
20275  fi
20276done
20277  done
20278IFS=$as_save_IFS
20279
20280  ;;
20281esac
20282fi
20283CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20284if test -n "$CHECK_TOOLSDIR_MAKE"; then
20285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20286$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20287else
20288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20289$as_echo "no" >&6; }
20290fi
20291
20292
20293  test -n "$CHECK_TOOLSDIR_MAKE" && break
20294done
20295
20296
20297  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20298  DESCRIPTION="make in tools-dir"
20299
20300  # On Cygwin, we require a newer version of make than on other platforms
20301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20302    MAKE_VERSION_EXPR="-e 4\."
20303    MAKE_REQUIRED_VERSION="4.0"
20304   else
20305    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20306    MAKE_REQUIRED_VERSION="3.81"
20307  fi
20308
20309  if test "x$MAKE_CANDIDATE" != x; then
20310    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20311$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20312    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20313    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20314    if test "x$IS_GNU_MAKE" = x; then
20315      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20316$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20317    else
20318      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20319      if test "x$IS_MODERN_MAKE" = x; then
20320        { $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
20321$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;}
20322      else
20323        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20324          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20325            MAKE_EXPECTED_ENV='cygwin'
20326          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20327            MAKE_EXPECTED_ENV='msys'
20328          else
20329            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20330          fi
20331          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20332          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20333        else
20334          # Not relevant for non-Windows
20335          IS_MAKE_CORRECT_ENV=true
20336        fi
20337        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20338          { $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
20339$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;}
20340        else
20341          FOUND_MAKE=$MAKE_CANDIDATE
20342
20343  # Only process if variable expands to non-empty
20344
20345  if test "x$FOUND_MAKE" != x; then
20346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20347
20348  # First separate the path from the arguments. This will split at the first
20349  # space.
20350  complete="$FOUND_MAKE"
20351  path="${complete%% *}"
20352  tmp="$complete EOL"
20353  arguments="${tmp#* }"
20354
20355  # Input might be given as Windows format, start by converting to
20356  # unix format.
20357  new_path=`$CYGPATH -u "$path"`
20358
20359  # Now try to locate executable using which
20360  new_path=`$WHICH "$new_path" 2> /dev/null`
20361  # bat and cmd files are not always considered executable in cygwin causing which
20362  # to not find them
20363  if test "x$new_path" = x \
20364      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20365      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20366    new_path=`$CYGPATH -u "$path"`
20367  fi
20368  if test "x$new_path" = x; then
20369    # Oops. Which didn't find the executable.
20370    # The splitting of arguments from the executable at a space might have been incorrect,
20371    # since paths with space are more likely in Windows. Give it another try with the whole
20372    # argument.
20373    path="$complete"
20374    arguments="EOL"
20375    new_path=`$CYGPATH -u "$path"`
20376    new_path=`$WHICH "$new_path" 2> /dev/null`
20377    # bat and cmd files are not always considered executable in cygwin causing which
20378    # to not find them
20379    if test "x$new_path" = x \
20380        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20381        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20382      new_path=`$CYGPATH -u "$path"`
20383    fi
20384    if test "x$new_path" = x; then
20385      # It's still not found. Now this is an unrecoverable error.
20386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20387$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20388      has_space=`$ECHO "$complete" | $GREP " "`
20389      if test "x$has_space" != x; then
20390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20392      fi
20393      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20394    fi
20395  fi
20396
20397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20400  # "foo.exe" is OK but "foo" is an error.
20401  #
20402  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20403  # It is also a way to make sure we got the proper file name for the real test later on.
20404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20405  if test "x$test_shortpath" = x; then
20406    # Short path failed, file does not exist as specified.
20407    # Try adding .exe or .cmd
20408    if test -f "${new_path}.exe"; then
20409      input_to_shortpath="${new_path}.exe"
20410    elif test -f "${new_path}.cmd"; then
20411      input_to_shortpath="${new_path}.cmd"
20412    else
20413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20414$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20415      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20416$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20418    fi
20419  else
20420    input_to_shortpath="$new_path"
20421  fi
20422
20423  # Call helper function which possibly converts this using DOS-style short mode.
20424  # If so, the updated path is stored in $new_path.
20425  new_path="$input_to_shortpath"
20426
20427  input_path="$input_to_shortpath"
20428  # Check if we need to convert this using DOS-style short mode. If the path
20429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20430  # take no chances and rewrite it.
20431  # Note: m4 eats our [], so we need to use [ and ] instead.
20432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20433  if test "x$has_forbidden_chars" != x; then
20434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20438      # Going to short mode and back again did indeed matter. Since short mode is
20439      # case insensitive, let's make it lowercase to improve readability.
20440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20441      # Now convert it back to Unix-style (cygpath)
20442      input_path=`$CYGPATH -u "$shortmode_path"`
20443      new_path="$input_path"
20444    fi
20445  fi
20446
20447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20448  if test "x$test_cygdrive_prefix" = x; then
20449    # As a simple fix, exclude /usr/bin since it's not a real path.
20450    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20452      # a path prefixed by /cygdrive for fixpath to work.
20453      new_path="$CYGWIN_ROOT_PATH$input_path"
20454    fi
20455  fi
20456
20457  # remove trailing .exe if any
20458  new_path="${new_path/%.exe/}"
20459
20460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20461
20462  # First separate the path from the arguments. This will split at the first
20463  # space.
20464  complete="$FOUND_MAKE"
20465  path="${complete%% *}"
20466  tmp="$complete EOL"
20467  arguments="${tmp#* }"
20468
20469  # Input might be given as Windows format, start by converting to
20470  # unix format.
20471  new_path="$path"
20472
20473  windows_path="$new_path"
20474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20475    unix_path=`$CYGPATH -u "$windows_path"`
20476    new_path="$unix_path"
20477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20479    new_path="$unix_path"
20480  fi
20481
20482
20483  # Now try to locate executable using which
20484  new_path=`$WHICH "$new_path" 2> /dev/null`
20485
20486  if test "x$new_path" = x; then
20487    # Oops. Which didn't find the executable.
20488    # The splitting of arguments from the executable at a space might have been incorrect,
20489    # since paths with space are more likely in Windows. Give it another try with the whole
20490    # argument.
20491    path="$complete"
20492    arguments="EOL"
20493    new_path="$path"
20494
20495  windows_path="$new_path"
20496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20497    unix_path=`$CYGPATH -u "$windows_path"`
20498    new_path="$unix_path"
20499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20501    new_path="$unix_path"
20502  fi
20503
20504
20505    new_path=`$WHICH "$new_path" 2> /dev/null`
20506    # bat and cmd files are not always considered executable in MSYS causing which
20507    # to not find them
20508    if test "x$new_path" = x \
20509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20511      new_path="$path"
20512
20513  windows_path="$new_path"
20514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20515    unix_path=`$CYGPATH -u "$windows_path"`
20516    new_path="$unix_path"
20517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20519    new_path="$unix_path"
20520  fi
20521
20522    fi
20523
20524    if test "x$new_path" = x; then
20525      # It's still not found. Now this is an unrecoverable error.
20526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20527$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20528      has_space=`$ECHO "$complete" | $GREP " "`
20529      if test "x$has_space" != x; then
20530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20532      fi
20533      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20534    fi
20535  fi
20536
20537  # Now new_path has a complete unix path to the binary
20538  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20539    # Keep paths in /bin as-is, but remove trailing .exe if any
20540    new_path="${new_path/%.exe/}"
20541    # Do not save /bin paths to all_fixpath_prefixes!
20542  else
20543    # Not in mixed or Windows style, start by that.
20544    new_path=`cmd //c echo $new_path`
20545
20546  input_path="$new_path"
20547  # Check if we need to convert this using DOS-style short mode. If the path
20548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20549  # take no chances and rewrite it.
20550  # Note: m4 eats our [], so we need to use [ and ] instead.
20551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20552  if test "x$has_forbidden_chars" != x; then
20553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20555  fi
20556
20557    # Output is in $new_path
20558
20559  windows_path="$new_path"
20560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20561    unix_path=`$CYGPATH -u "$windows_path"`
20562    new_path="$unix_path"
20563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20565    new_path="$unix_path"
20566  fi
20567
20568    # remove trailing .exe if any
20569    new_path="${new_path/%.exe/}"
20570
20571    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20572    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20573  fi
20574
20575    else
20576      # We're on a unix platform. Hooray! :)
20577      # First separate the path from the arguments. This will split at the first
20578      # space.
20579      complete="$FOUND_MAKE"
20580      path="${complete%% *}"
20581      tmp="$complete EOL"
20582      arguments="${tmp#* }"
20583
20584      # Cannot rely on the command "which" here since it doesn't always work.
20585      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20586      if test -z "$is_absolute_path"; then
20587        # Path to executable is not absolute. Find it.
20588        IFS_save="$IFS"
20589        IFS=:
20590        for p in $PATH; do
20591          if test -f "$p/$path" && test -x "$p/$path"; then
20592            new_path="$p/$path"
20593            break
20594          fi
20595        done
20596        IFS="$IFS_save"
20597      else
20598        # This is an absolute path, we can use it without further modifications.
20599        new_path="$path"
20600      fi
20601
20602      if test "x$new_path" = x; then
20603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20604$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20605        has_space=`$ECHO "$complete" | $GREP " "`
20606        if test "x$has_space" != x; then
20607          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20608$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20609        fi
20610        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20611      fi
20612    fi
20613
20614    # Now join together the path and the arguments once again
20615    if test "x$arguments" != xEOL; then
20616      new_complete="$new_path ${arguments% *}"
20617    else
20618      new_complete="$new_path"
20619    fi
20620
20621    if test "x$complete" != "x$new_complete"; then
20622      FOUND_MAKE="$new_complete"
20623      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20624$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20625    fi
20626  fi
20627
20628        fi
20629      fi
20630    fi
20631  fi
20632
20633        fi
20634        PATH=$OLD_PATH
20635      fi
20636    fi
20637
20638    if test "x$FOUND_MAKE" = x; then
20639      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
20640    fi
20641
20642    else
20643      # If it succeeded, then it was overridden by the user. We will use it
20644      # for the tool.
20645
20646      # First remove it from the list of overridden variables, so we can test
20647      # for unknown variables in the end.
20648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20649
20650      # Check if we try to supply an empty value
20651      if test "x$MAKE" = x; then
20652        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20653$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20655$as_echo_n "checking for MAKE... " >&6; }
20656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20657$as_echo "disabled" >&6; }
20658      else
20659        # Check if the provided tool contains a complete path.
20660        tool_specified="$MAKE"
20661        tool_basename="${tool_specified##*/}"
20662        if test "x$tool_basename" = "x$tool_specified"; then
20663          # A command without a complete path is provided, search $PATH.
20664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20665$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20666          # Extract the first word of "$tool_basename", so it can be a program name with args.
20667set dummy $tool_basename; ac_word=$2
20668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20669$as_echo_n "checking for $ac_word... " >&6; }
20670if ${ac_cv_path_MAKE+:} false; then :
20671  $as_echo_n "(cached) " >&6
20672else
20673  case $MAKE in
20674  [\\/]* | ?:[\\/]*)
20675  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20676  ;;
20677  *)
20678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20679for as_dir in $PATH
20680do
20681  IFS=$as_save_IFS
20682  test -z "$as_dir" && as_dir=.
20683    for ac_exec_ext in '' $ac_executable_extensions; do
20684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20685    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20687    break 2
20688  fi
20689done
20690  done
20691IFS=$as_save_IFS
20692
20693  ;;
20694esac
20695fi
20696MAKE=$ac_cv_path_MAKE
20697if test -n "$MAKE"; then
20698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20699$as_echo "$MAKE" >&6; }
20700else
20701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20702$as_echo "no" >&6; }
20703fi
20704
20705
20706          if test "x$MAKE" = x; then
20707            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20708          fi
20709        else
20710          # Otherwise we believe it is a complete path. Use it as it is.
20711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20712$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20713          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20714$as_echo_n "checking for MAKE... " >&6; }
20715          if test ! -x "$tool_specified"; then
20716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20717$as_echo "not found" >&6; }
20718            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20719          fi
20720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20721$as_echo "$tool_specified" >&6; }
20722        fi
20723      fi
20724    fi
20725
20726    # If MAKE was set by user, verify the version
20727
20728  MAKE_CANDIDATE=""$MAKE""
20729  DESCRIPTION="user supplied MAKE=$MAKE"
20730
20731  # On Cygwin, we require a newer version of make than on other platforms
20732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20733    MAKE_VERSION_EXPR="-e 4\."
20734    MAKE_REQUIRED_VERSION="4.0"
20735   else
20736    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20737    MAKE_REQUIRED_VERSION="3.81"
20738  fi
20739
20740  if test "x$MAKE_CANDIDATE" != x; then
20741    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20742$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20743    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20744    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20745    if test "x$IS_GNU_MAKE" = x; then
20746      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20747$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20748    else
20749      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20750      if test "x$IS_MODERN_MAKE" = x; then
20751        { $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
20752$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;}
20753      else
20754        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20755          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20756            MAKE_EXPECTED_ENV='cygwin'
20757          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20758            MAKE_EXPECTED_ENV='msys'
20759          else
20760            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20761          fi
20762          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20763          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20764        else
20765          # Not relevant for non-Windows
20766          IS_MAKE_CORRECT_ENV=true
20767        fi
20768        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20769          { $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
20770$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;}
20771        else
20772          FOUND_MAKE=$MAKE_CANDIDATE
20773
20774  # Only process if variable expands to non-empty
20775
20776  if test "x$FOUND_MAKE" != x; then
20777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20778
20779  # First separate the path from the arguments. This will split at the first
20780  # space.
20781  complete="$FOUND_MAKE"
20782  path="${complete%% *}"
20783  tmp="$complete EOL"
20784  arguments="${tmp#* }"
20785
20786  # Input might be given as Windows format, start by converting to
20787  # unix format.
20788  new_path=`$CYGPATH -u "$path"`
20789
20790  # Now try to locate executable using which
20791  new_path=`$WHICH "$new_path" 2> /dev/null`
20792  # bat and cmd files are not always considered executable in cygwin causing which
20793  # to not find them
20794  if test "x$new_path" = x \
20795      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20796      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20797    new_path=`$CYGPATH -u "$path"`
20798  fi
20799  if test "x$new_path" = x; then
20800    # Oops. Which didn't find the executable.
20801    # The splitting of arguments from the executable at a space might have been incorrect,
20802    # since paths with space are more likely in Windows. Give it another try with the whole
20803    # argument.
20804    path="$complete"
20805    arguments="EOL"
20806    new_path=`$CYGPATH -u "$path"`
20807    new_path=`$WHICH "$new_path" 2> /dev/null`
20808    # bat and cmd files are not always considered executable in cygwin causing which
20809    # to not find them
20810    if test "x$new_path" = x \
20811        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20812        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20813      new_path=`$CYGPATH -u "$path"`
20814    fi
20815    if test "x$new_path" = x; then
20816      # It's still not found. Now this is an unrecoverable error.
20817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20818$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20819      has_space=`$ECHO "$complete" | $GREP " "`
20820      if test "x$has_space" != x; then
20821        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20822$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20823      fi
20824      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20825    fi
20826  fi
20827
20828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20831  # "foo.exe" is OK but "foo" is an error.
20832  #
20833  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20834  # It is also a way to make sure we got the proper file name for the real test later on.
20835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20836  if test "x$test_shortpath" = x; then
20837    # Short path failed, file does not exist as specified.
20838    # Try adding .exe or .cmd
20839    if test -f "${new_path}.exe"; then
20840      input_to_shortpath="${new_path}.exe"
20841    elif test -f "${new_path}.cmd"; then
20842      input_to_shortpath="${new_path}.cmd"
20843    else
20844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20845$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20846      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20847$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20848      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20849    fi
20850  else
20851    input_to_shortpath="$new_path"
20852  fi
20853
20854  # Call helper function which possibly converts this using DOS-style short mode.
20855  # If so, the updated path is stored in $new_path.
20856  new_path="$input_to_shortpath"
20857
20858  input_path="$input_to_shortpath"
20859  # Check if we need to convert this using DOS-style short mode. If the path
20860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20861  # take no chances and rewrite it.
20862  # Note: m4 eats our [], so we need to use [ and ] instead.
20863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20864  if test "x$has_forbidden_chars" != x; then
20865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20869      # Going to short mode and back again did indeed matter. Since short mode is
20870      # case insensitive, let's make it lowercase to improve readability.
20871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20872      # Now convert it back to Unix-style (cygpath)
20873      input_path=`$CYGPATH -u "$shortmode_path"`
20874      new_path="$input_path"
20875    fi
20876  fi
20877
20878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20879  if test "x$test_cygdrive_prefix" = x; then
20880    # As a simple fix, exclude /usr/bin since it's not a real path.
20881    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20883      # a path prefixed by /cygdrive for fixpath to work.
20884      new_path="$CYGWIN_ROOT_PATH$input_path"
20885    fi
20886  fi
20887
20888  # remove trailing .exe if any
20889  new_path="${new_path/%.exe/}"
20890
20891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20892
20893  # First separate the path from the arguments. This will split at the first
20894  # space.
20895  complete="$FOUND_MAKE"
20896  path="${complete%% *}"
20897  tmp="$complete EOL"
20898  arguments="${tmp#* }"
20899
20900  # Input might be given as Windows format, start by converting to
20901  # unix format.
20902  new_path="$path"
20903
20904  windows_path="$new_path"
20905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20906    unix_path=`$CYGPATH -u "$windows_path"`
20907    new_path="$unix_path"
20908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20910    new_path="$unix_path"
20911  fi
20912
20913
20914  # Now try to locate executable using which
20915  new_path=`$WHICH "$new_path" 2> /dev/null`
20916
20917  if test "x$new_path" = x; then
20918    # Oops. Which didn't find the executable.
20919    # The splitting of arguments from the executable at a space might have been incorrect,
20920    # since paths with space are more likely in Windows. Give it another try with the whole
20921    # argument.
20922    path="$complete"
20923    arguments="EOL"
20924    new_path="$path"
20925
20926  windows_path="$new_path"
20927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20928    unix_path=`$CYGPATH -u "$windows_path"`
20929    new_path="$unix_path"
20930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20932    new_path="$unix_path"
20933  fi
20934
20935
20936    new_path=`$WHICH "$new_path" 2> /dev/null`
20937    # bat and cmd files are not always considered executable in MSYS causing which
20938    # to not find them
20939    if test "x$new_path" = x \
20940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20942      new_path="$path"
20943
20944  windows_path="$new_path"
20945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20946    unix_path=`$CYGPATH -u "$windows_path"`
20947    new_path="$unix_path"
20948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20950    new_path="$unix_path"
20951  fi
20952
20953    fi
20954
20955    if test "x$new_path" = x; then
20956      # It's still not found. Now this is an unrecoverable error.
20957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20958$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20959      has_space=`$ECHO "$complete" | $GREP " "`
20960      if test "x$has_space" != x; then
20961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20963      fi
20964      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20965    fi
20966  fi
20967
20968  # Now new_path has a complete unix path to the binary
20969  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20970    # Keep paths in /bin as-is, but remove trailing .exe if any
20971    new_path="${new_path/%.exe/}"
20972    # Do not save /bin paths to all_fixpath_prefixes!
20973  else
20974    # Not in mixed or Windows style, start by that.
20975    new_path=`cmd //c echo $new_path`
20976
20977  input_path="$new_path"
20978  # Check if we need to convert this using DOS-style short mode. If the path
20979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20980  # take no chances and rewrite it.
20981  # Note: m4 eats our [], so we need to use [ and ] instead.
20982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20983  if test "x$has_forbidden_chars" != x; then
20984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20986  fi
20987
20988    # Output is in $new_path
20989
20990  windows_path="$new_path"
20991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20992    unix_path=`$CYGPATH -u "$windows_path"`
20993    new_path="$unix_path"
20994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20996    new_path="$unix_path"
20997  fi
20998
20999    # remove trailing .exe if any
21000    new_path="${new_path/%.exe/}"
21001
21002    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21003    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21004  fi
21005
21006    else
21007      # We're on a unix platform. Hooray! :)
21008      # First separate the path from the arguments. This will split at the first
21009      # space.
21010      complete="$FOUND_MAKE"
21011      path="${complete%% *}"
21012      tmp="$complete EOL"
21013      arguments="${tmp#* }"
21014
21015      # Cannot rely on the command "which" here since it doesn't always work.
21016      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21017      if test -z "$is_absolute_path"; then
21018        # Path to executable is not absolute. Find it.
21019        IFS_save="$IFS"
21020        IFS=:
21021        for p in $PATH; do
21022          if test -f "$p/$path" && test -x "$p/$path"; then
21023            new_path="$p/$path"
21024            break
21025          fi
21026        done
21027        IFS="$IFS_save"
21028      else
21029        # This is an absolute path, we can use it without further modifications.
21030        new_path="$path"
21031      fi
21032
21033      if test "x$new_path" = x; then
21034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21035$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21036        has_space=`$ECHO "$complete" | $GREP " "`
21037        if test "x$has_space" != x; then
21038          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21039$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21040        fi
21041        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21042      fi
21043    fi
21044
21045    # Now join together the path and the arguments once again
21046    if test "x$arguments" != xEOL; then
21047      new_complete="$new_path ${arguments% *}"
21048    else
21049      new_complete="$new_path"
21050    fi
21051
21052    if test "x$complete" != "x$new_complete"; then
21053      FOUND_MAKE="$new_complete"
21054      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21055$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21056    fi
21057  fi
21058
21059        fi
21060      fi
21061    fi
21062  fi
21063
21064    if test "x$FOUND_MAKE" = x; then
21065      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21066    fi
21067
21068  fi
21069
21070
21071  MAKE=$FOUND_MAKE
21072
21073  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21074$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21075
21076
21077  # Check if make supports the output sync option and if so, setup using it.
21078  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21079$as_echo_n "checking if make --output-sync is supported... " >&6; }
21080  if $MAKE --version -O > /dev/null 2>&1; then
21081    OUTPUT_SYNC_SUPPORTED=true
21082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21083$as_echo "yes" >&6; }
21084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21085$as_echo_n "checking for output-sync value... " >&6; }
21086
21087# Check whether --with-output-sync was given.
21088if test "${with_output_sync+set}" = set; then :
21089  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21090fi
21091
21092    if test "x$OUTPUT_SYNC" = "x"; then
21093      OUTPUT_SYNC=none
21094    fi
21095    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21096$as_echo "$OUTPUT_SYNC" >&6; }
21097    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21098      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21099    fi
21100  else
21101    OUTPUT_SYNC_SUPPORTED=false
21102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21103$as_echo "no" >&6; }
21104  fi
21105
21106
21107
21108
21109
21110
21111  # Test if find supports -delete
21112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21113$as_echo_n "checking if find supports -delete... " >&6; }
21114  FIND_DELETE="-delete"
21115
21116  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21117
21118  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21119
21120  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21121  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21122    # No, it does not.
21123    $RM $DELETEDIR/TestIfFindSupportsDelete
21124    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21125      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21126      FIND_DELETE="-print | $XARGS $RM"
21127    else
21128      FIND_DELETE="-exec $RM \{\} \+"
21129    fi
21130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21131$as_echo "no" >&6; }
21132  else
21133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21134$as_echo "yes" >&6; }
21135  fi
21136  $RMDIR $DELETEDIR
21137
21138
21139
21140  # Test which kind of tar was found
21141  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21142    TAR_TYPE="gnu"
21143  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21144    TAR_TYPE="bsd"
21145  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21146    TAR_TYPE="solaris"
21147  fi
21148  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21149$as_echo_n "checking what type of tar was found... " >&6; }
21150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21151$as_echo "$TAR_TYPE" >&6; }
21152
21153  TAR_CREATE_FILE_PARAM=""
21154
21155  if test "x$TAR_TYPE" = "xgnu"; then
21156    TAR_INCLUDE_PARAM="T"
21157    TAR_SUPPORTS_TRANSFORM="true"
21158    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21159      # When using gnu tar for Solaris targets, need to use compatibility mode
21160      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21161    fi
21162  else
21163    TAR_INCLUDE_PARAM="I"
21164    TAR_SUPPORTS_TRANSFORM="false"
21165  fi
21166
21167
21168
21169
21170
21171
21172  # These tools might not be installed by default,
21173  # need hint on how to install them.
21174
21175
21176
21177  # Publish this variable in the help.
21178
21179
21180  if [ -z "${UNZIP+x}" ]; then
21181    # The variable is not set by user, try to locate tool using the code snippet
21182    for ac_prog in unzip
21183do
21184  # Extract the first word of "$ac_prog", so it can be a program name with args.
21185set dummy $ac_prog; ac_word=$2
21186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21187$as_echo_n "checking for $ac_word... " >&6; }
21188if ${ac_cv_path_UNZIP+:} false; then :
21189  $as_echo_n "(cached) " >&6
21190else
21191  case $UNZIP in
21192  [\\/]* | ?:[\\/]*)
21193  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21194  ;;
21195  *)
21196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21197for as_dir in $PATH
21198do
21199  IFS=$as_save_IFS
21200  test -z "$as_dir" && as_dir=.
21201    for ac_exec_ext in '' $ac_executable_extensions; do
21202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21203    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21205    break 2
21206  fi
21207done
21208  done
21209IFS=$as_save_IFS
21210
21211  ;;
21212esac
21213fi
21214UNZIP=$ac_cv_path_UNZIP
21215if test -n "$UNZIP"; then
21216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21217$as_echo "$UNZIP" >&6; }
21218else
21219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21220$as_echo "no" >&6; }
21221fi
21222
21223
21224  test -n "$UNZIP" && break
21225done
21226
21227  else
21228    # The variable is set, but is it from the command line or the environment?
21229
21230    # Try to remove the string !UNZIP! from our list.
21231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21233      # If it failed, the variable was not from the command line. Ignore it,
21234      # but warn the user (except for BASH, which is always set by the calling BASH).
21235      if test "xUNZIP" != xBASH; then
21236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21237$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21238      fi
21239      # Try to locate tool using the code snippet
21240      for ac_prog in unzip
21241do
21242  # Extract the first word of "$ac_prog", so it can be a program name with args.
21243set dummy $ac_prog; ac_word=$2
21244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21245$as_echo_n "checking for $ac_word... " >&6; }
21246if ${ac_cv_path_UNZIP+:} false; then :
21247  $as_echo_n "(cached) " >&6
21248else
21249  case $UNZIP in
21250  [\\/]* | ?:[\\/]*)
21251  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21252  ;;
21253  *)
21254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21255for as_dir in $PATH
21256do
21257  IFS=$as_save_IFS
21258  test -z "$as_dir" && as_dir=.
21259    for ac_exec_ext in '' $ac_executable_extensions; do
21260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21261    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21263    break 2
21264  fi
21265done
21266  done
21267IFS=$as_save_IFS
21268
21269  ;;
21270esac
21271fi
21272UNZIP=$ac_cv_path_UNZIP
21273if test -n "$UNZIP"; then
21274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21275$as_echo "$UNZIP" >&6; }
21276else
21277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21278$as_echo "no" >&6; }
21279fi
21280
21281
21282  test -n "$UNZIP" && break
21283done
21284
21285    else
21286      # If it succeeded, then it was overridden by the user. We will use it
21287      # for the tool.
21288
21289      # First remove it from the list of overridden variables, so we can test
21290      # for unknown variables in the end.
21291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21292
21293      # Check if we try to supply an empty value
21294      if test "x$UNZIP" = x; then
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21296$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21298$as_echo_n "checking for UNZIP... " >&6; }
21299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21300$as_echo "disabled" >&6; }
21301      else
21302        # Check if the provided tool contains a complete path.
21303        tool_specified="$UNZIP"
21304        tool_basename="${tool_specified##*/}"
21305        if test "x$tool_basename" = "x$tool_specified"; then
21306          # A command without a complete path is provided, search $PATH.
21307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21308$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21309          # Extract the first word of "$tool_basename", so it can be a program name with args.
21310set dummy $tool_basename; 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_UNZIP+:} false; then :
21314  $as_echo_n "(cached) " >&6
21315else
21316  case $UNZIP in
21317  [\\/]* | ?:[\\/]*)
21318  ac_cv_path_UNZIP="$UNZIP" # 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_UNZIP="$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
21339UNZIP=$ac_cv_path_UNZIP
21340if test -n "$UNZIP"; then
21341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21342$as_echo "$UNZIP" >&6; }
21343else
21344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21345$as_echo "no" >&6; }
21346fi
21347
21348
21349          if test "x$UNZIP" = x; then
21350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21351          fi
21352        else
21353          # Otherwise we believe it is a complete path. Use it as it is.
21354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21355$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21357$as_echo_n "checking for UNZIP... " >&6; }
21358          if test ! -x "$tool_specified"; then
21359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21360$as_echo "not found" >&6; }
21361            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21362          fi
21363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21364$as_echo "$tool_specified" >&6; }
21365        fi
21366      fi
21367    fi
21368
21369  fi
21370
21371
21372
21373  if test "x$UNZIP" = x; then
21374    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21375  fi
21376
21377
21378
21379
21380
21381  # Publish this variable in the help.
21382
21383
21384  if [ -z "${ZIP+x}" ]; then
21385    # The variable is not set by user, try to locate tool using the code snippet
21386    for ac_prog in zip
21387do
21388  # Extract the first word of "$ac_prog", so it can be a program name with args.
21389set dummy $ac_prog; ac_word=$2
21390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21391$as_echo_n "checking for $ac_word... " >&6; }
21392if ${ac_cv_path_ZIP+:} false; then :
21393  $as_echo_n "(cached) " >&6
21394else
21395  case $ZIP in
21396  [\\/]* | ?:[\\/]*)
21397  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21398  ;;
21399  *)
21400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21401for as_dir in $PATH
21402do
21403  IFS=$as_save_IFS
21404  test -z "$as_dir" && as_dir=.
21405    for ac_exec_ext in '' $ac_executable_extensions; do
21406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21407    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21409    break 2
21410  fi
21411done
21412  done
21413IFS=$as_save_IFS
21414
21415  ;;
21416esac
21417fi
21418ZIP=$ac_cv_path_ZIP
21419if test -n "$ZIP"; then
21420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21421$as_echo "$ZIP" >&6; }
21422else
21423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21424$as_echo "no" >&6; }
21425fi
21426
21427
21428  test -n "$ZIP" && break
21429done
21430
21431  else
21432    # The variable is set, but is it from the command line or the environment?
21433
21434    # Try to remove the string !ZIP! from our list.
21435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21437      # If it failed, the variable was not from the command line. Ignore it,
21438      # but warn the user (except for BASH, which is always set by the calling BASH).
21439      if test "xZIP" != xBASH; then
21440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21441$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21442      fi
21443      # Try to locate tool using the code snippet
21444      for ac_prog in zip
21445do
21446  # Extract the first word of "$ac_prog", so it can be a program name with args.
21447set dummy $ac_prog; ac_word=$2
21448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21449$as_echo_n "checking for $ac_word... " >&6; }
21450if ${ac_cv_path_ZIP+:} false; then :
21451  $as_echo_n "(cached) " >&6
21452else
21453  case $ZIP in
21454  [\\/]* | ?:[\\/]*)
21455  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21456  ;;
21457  *)
21458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21459for as_dir in $PATH
21460do
21461  IFS=$as_save_IFS
21462  test -z "$as_dir" && as_dir=.
21463    for ac_exec_ext in '' $ac_executable_extensions; do
21464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21465    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21467    break 2
21468  fi
21469done
21470  done
21471IFS=$as_save_IFS
21472
21473  ;;
21474esac
21475fi
21476ZIP=$ac_cv_path_ZIP
21477if test -n "$ZIP"; then
21478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21479$as_echo "$ZIP" >&6; }
21480else
21481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21482$as_echo "no" >&6; }
21483fi
21484
21485
21486  test -n "$ZIP" && break
21487done
21488
21489    else
21490      # If it succeeded, then it was overridden by the user. We will use it
21491      # for the tool.
21492
21493      # First remove it from the list of overridden variables, so we can test
21494      # for unknown variables in the end.
21495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21496
21497      # Check if we try to supply an empty value
21498      if test "x$ZIP" = x; then
21499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21500$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21502$as_echo_n "checking for ZIP... " >&6; }
21503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21504$as_echo "disabled" >&6; }
21505      else
21506        # Check if the provided tool contains a complete path.
21507        tool_specified="$ZIP"
21508        tool_basename="${tool_specified##*/}"
21509        if test "x$tool_basename" = "x$tool_specified"; then
21510          # A command without a complete path is provided, search $PATH.
21511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21512$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21513          # Extract the first word of "$tool_basename", so it can be a program name with args.
21514set dummy $tool_basename; ac_word=$2
21515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21516$as_echo_n "checking for $ac_word... " >&6; }
21517if ${ac_cv_path_ZIP+:} false; then :
21518  $as_echo_n "(cached) " >&6
21519else
21520  case $ZIP in
21521  [\\/]* | ?:[\\/]*)
21522  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21523  ;;
21524  *)
21525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21526for as_dir in $PATH
21527do
21528  IFS=$as_save_IFS
21529  test -z "$as_dir" && as_dir=.
21530    for ac_exec_ext in '' $ac_executable_extensions; do
21531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21532    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21534    break 2
21535  fi
21536done
21537  done
21538IFS=$as_save_IFS
21539
21540  ;;
21541esac
21542fi
21543ZIP=$ac_cv_path_ZIP
21544if test -n "$ZIP"; then
21545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21546$as_echo "$ZIP" >&6; }
21547else
21548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21549$as_echo "no" >&6; }
21550fi
21551
21552
21553          if test "x$ZIP" = x; then
21554            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21555          fi
21556        else
21557          # Otherwise we believe it is a complete path. Use it as it is.
21558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21559$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21561$as_echo_n "checking for ZIP... " >&6; }
21562          if test ! -x "$tool_specified"; then
21563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21564$as_echo "not found" >&6; }
21565            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21566          fi
21567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21568$as_echo "$tool_specified" >&6; }
21569        fi
21570      fi
21571    fi
21572
21573  fi
21574
21575
21576
21577  if test "x$ZIP" = x; then
21578    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21579  fi
21580
21581
21582
21583  # Non-required basic tools
21584
21585
21586
21587  # Publish this variable in the help.
21588
21589
21590  if [ -z "${LDD+x}" ]; then
21591    # The variable is not set by user, try to locate tool using the code snippet
21592    for ac_prog in ldd
21593do
21594  # Extract the first word of "$ac_prog", so it can be a program name with args.
21595set dummy $ac_prog; ac_word=$2
21596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21597$as_echo_n "checking for $ac_word... " >&6; }
21598if ${ac_cv_path_LDD+:} false; then :
21599  $as_echo_n "(cached) " >&6
21600else
21601  case $LDD in
21602  [\\/]* | ?:[\\/]*)
21603  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21604  ;;
21605  *)
21606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21607for as_dir in $PATH
21608do
21609  IFS=$as_save_IFS
21610  test -z "$as_dir" && as_dir=.
21611    for ac_exec_ext in '' $ac_executable_extensions; do
21612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21613    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21615    break 2
21616  fi
21617done
21618  done
21619IFS=$as_save_IFS
21620
21621  ;;
21622esac
21623fi
21624LDD=$ac_cv_path_LDD
21625if test -n "$LDD"; then
21626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21627$as_echo "$LDD" >&6; }
21628else
21629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21630$as_echo "no" >&6; }
21631fi
21632
21633
21634  test -n "$LDD" && break
21635done
21636
21637  else
21638    # The variable is set, but is it from the command line or the environment?
21639
21640    # Try to remove the string !LDD! from our list.
21641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21643      # If it failed, the variable was not from the command line. Ignore it,
21644      # but warn the user (except for BASH, which is always set by the calling BASH).
21645      if test "xLDD" != xBASH; then
21646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21647$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21648      fi
21649      # Try to locate tool using the code snippet
21650      for ac_prog in ldd
21651do
21652  # Extract the first word of "$ac_prog", so it can be a program name with args.
21653set dummy $ac_prog; ac_word=$2
21654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21655$as_echo_n "checking for $ac_word... " >&6; }
21656if ${ac_cv_path_LDD+:} false; then :
21657  $as_echo_n "(cached) " >&6
21658else
21659  case $LDD in
21660  [\\/]* | ?:[\\/]*)
21661  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21662  ;;
21663  *)
21664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21665for as_dir in $PATH
21666do
21667  IFS=$as_save_IFS
21668  test -z "$as_dir" && as_dir=.
21669    for ac_exec_ext in '' $ac_executable_extensions; do
21670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21671    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21673    break 2
21674  fi
21675done
21676  done
21677IFS=$as_save_IFS
21678
21679  ;;
21680esac
21681fi
21682LDD=$ac_cv_path_LDD
21683if test -n "$LDD"; then
21684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21685$as_echo "$LDD" >&6; }
21686else
21687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21688$as_echo "no" >&6; }
21689fi
21690
21691
21692  test -n "$LDD" && break
21693done
21694
21695    else
21696      # If it succeeded, then it was overridden by the user. We will use it
21697      # for the tool.
21698
21699      # First remove it from the list of overridden variables, so we can test
21700      # for unknown variables in the end.
21701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21702
21703      # Check if we try to supply an empty value
21704      if test "x$LDD" = x; then
21705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21706$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21708$as_echo_n "checking for LDD... " >&6; }
21709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21710$as_echo "disabled" >&6; }
21711      else
21712        # Check if the provided tool contains a complete path.
21713        tool_specified="$LDD"
21714        tool_basename="${tool_specified##*/}"
21715        if test "x$tool_basename" = "x$tool_specified"; then
21716          # A command without a complete path is provided, search $PATH.
21717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21718$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21719          # Extract the first word of "$tool_basename", so it can be a program name with args.
21720set dummy $tool_basename; ac_word=$2
21721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21722$as_echo_n "checking for $ac_word... " >&6; }
21723if ${ac_cv_path_LDD+:} false; then :
21724  $as_echo_n "(cached) " >&6
21725else
21726  case $LDD in
21727  [\\/]* | ?:[\\/]*)
21728  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21729  ;;
21730  *)
21731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21732for as_dir in $PATH
21733do
21734  IFS=$as_save_IFS
21735  test -z "$as_dir" && as_dir=.
21736    for ac_exec_ext in '' $ac_executable_extensions; do
21737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21738    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21740    break 2
21741  fi
21742done
21743  done
21744IFS=$as_save_IFS
21745
21746  ;;
21747esac
21748fi
21749LDD=$ac_cv_path_LDD
21750if test -n "$LDD"; then
21751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21752$as_echo "$LDD" >&6; }
21753else
21754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21755$as_echo "no" >&6; }
21756fi
21757
21758
21759          if test "x$LDD" = x; then
21760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21761          fi
21762        else
21763          # Otherwise we believe it is a complete path. Use it as it is.
21764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21765$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21767$as_echo_n "checking for LDD... " >&6; }
21768          if test ! -x "$tool_specified"; then
21769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21770$as_echo "not found" >&6; }
21771            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21772          fi
21773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21774$as_echo "$tool_specified" >&6; }
21775        fi
21776      fi
21777    fi
21778
21779  fi
21780
21781
21782  if test "x$LDD" = "x"; then
21783    # List shared lib dependencies is used for
21784    # debug output and checking for forbidden dependencies.
21785    # We can build without it.
21786    LDD="true"
21787  fi
21788
21789
21790  # Publish this variable in the help.
21791
21792
21793  if [ -z "${OTOOL+x}" ]; then
21794    # The variable is not set by user, try to locate tool using the code snippet
21795    for ac_prog in otool
21796do
21797  # Extract the first word of "$ac_prog", so it can be a program name with args.
21798set dummy $ac_prog; ac_word=$2
21799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21800$as_echo_n "checking for $ac_word... " >&6; }
21801if ${ac_cv_path_OTOOL+:} false; then :
21802  $as_echo_n "(cached) " >&6
21803else
21804  case $OTOOL in
21805  [\\/]* | ?:[\\/]*)
21806  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21807  ;;
21808  *)
21809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21810for as_dir in $PATH
21811do
21812  IFS=$as_save_IFS
21813  test -z "$as_dir" && as_dir=.
21814    for ac_exec_ext in '' $ac_executable_extensions; do
21815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21816    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21818    break 2
21819  fi
21820done
21821  done
21822IFS=$as_save_IFS
21823
21824  ;;
21825esac
21826fi
21827OTOOL=$ac_cv_path_OTOOL
21828if test -n "$OTOOL"; then
21829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21830$as_echo "$OTOOL" >&6; }
21831else
21832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21833$as_echo "no" >&6; }
21834fi
21835
21836
21837  test -n "$OTOOL" && break
21838done
21839
21840  else
21841    # The variable is set, but is it from the command line or the environment?
21842
21843    # Try to remove the string !OTOOL! from our list.
21844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21846      # If it failed, the variable was not from the command line. Ignore it,
21847      # but warn the user (except for BASH, which is always set by the calling BASH).
21848      if test "xOTOOL" != xBASH; then
21849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21850$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21851      fi
21852      # Try to locate tool using the code snippet
21853      for ac_prog in otool
21854do
21855  # Extract the first word of "$ac_prog", so it can be a program name with args.
21856set dummy $ac_prog; ac_word=$2
21857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21858$as_echo_n "checking for $ac_word... " >&6; }
21859if ${ac_cv_path_OTOOL+:} false; then :
21860  $as_echo_n "(cached) " >&6
21861else
21862  case $OTOOL in
21863  [\\/]* | ?:[\\/]*)
21864  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21865  ;;
21866  *)
21867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21868for as_dir in $PATH
21869do
21870  IFS=$as_save_IFS
21871  test -z "$as_dir" && as_dir=.
21872    for ac_exec_ext in '' $ac_executable_extensions; do
21873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21874    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21876    break 2
21877  fi
21878done
21879  done
21880IFS=$as_save_IFS
21881
21882  ;;
21883esac
21884fi
21885OTOOL=$ac_cv_path_OTOOL
21886if test -n "$OTOOL"; then
21887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21888$as_echo "$OTOOL" >&6; }
21889else
21890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21891$as_echo "no" >&6; }
21892fi
21893
21894
21895  test -n "$OTOOL" && break
21896done
21897
21898    else
21899      # If it succeeded, then it was overridden by the user. We will use it
21900      # for the tool.
21901
21902      # First remove it from the list of overridden variables, so we can test
21903      # for unknown variables in the end.
21904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21905
21906      # Check if we try to supply an empty value
21907      if test "x$OTOOL" = x; then
21908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21909$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21911$as_echo_n "checking for OTOOL... " >&6; }
21912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21913$as_echo "disabled" >&6; }
21914      else
21915        # Check if the provided tool contains a complete path.
21916        tool_specified="$OTOOL"
21917        tool_basename="${tool_specified##*/}"
21918        if test "x$tool_basename" = "x$tool_specified"; then
21919          # A command without a complete path is provided, search $PATH.
21920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21921$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21922          # Extract the first word of "$tool_basename", so it can be a program name with args.
21923set dummy $tool_basename; ac_word=$2
21924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21925$as_echo_n "checking for $ac_word... " >&6; }
21926if ${ac_cv_path_OTOOL+:} false; then :
21927  $as_echo_n "(cached) " >&6
21928else
21929  case $OTOOL in
21930  [\\/]* | ?:[\\/]*)
21931  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21932  ;;
21933  *)
21934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21935for as_dir in $PATH
21936do
21937  IFS=$as_save_IFS
21938  test -z "$as_dir" && as_dir=.
21939    for ac_exec_ext in '' $ac_executable_extensions; do
21940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21941    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21943    break 2
21944  fi
21945done
21946  done
21947IFS=$as_save_IFS
21948
21949  ;;
21950esac
21951fi
21952OTOOL=$ac_cv_path_OTOOL
21953if test -n "$OTOOL"; then
21954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21955$as_echo "$OTOOL" >&6; }
21956else
21957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21958$as_echo "no" >&6; }
21959fi
21960
21961
21962          if test "x$OTOOL" = x; then
21963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21964          fi
21965        else
21966          # Otherwise we believe it is a complete path. Use it as it is.
21967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21968$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21970$as_echo_n "checking for OTOOL... " >&6; }
21971          if test ! -x "$tool_specified"; then
21972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21973$as_echo "not found" >&6; }
21974            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21975          fi
21976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21977$as_echo "$tool_specified" >&6; }
21978        fi
21979      fi
21980    fi
21981
21982  fi
21983
21984
21985  if test "x$OTOOL" = "x"; then
21986    OTOOL="true"
21987  fi
21988
21989
21990  # Publish this variable in the help.
21991
21992
21993  if [ -z "${READELF+x}" ]; then
21994    # The variable is not set by user, try to locate tool using the code snippet
21995    for ac_prog in greadelf readelf
21996do
21997  # Extract the first word of "$ac_prog", so it can be a program name with args.
21998set dummy $ac_prog; ac_word=$2
21999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22000$as_echo_n "checking for $ac_word... " >&6; }
22001if ${ac_cv_path_READELF+:} false; then :
22002  $as_echo_n "(cached) " >&6
22003else
22004  case $READELF in
22005  [\\/]* | ?:[\\/]*)
22006  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22007  ;;
22008  *)
22009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22010for as_dir in $PATH
22011do
22012  IFS=$as_save_IFS
22013  test -z "$as_dir" && as_dir=.
22014    for ac_exec_ext in '' $ac_executable_extensions; do
22015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22016    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22018    break 2
22019  fi
22020done
22021  done
22022IFS=$as_save_IFS
22023
22024  ;;
22025esac
22026fi
22027READELF=$ac_cv_path_READELF
22028if test -n "$READELF"; then
22029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22030$as_echo "$READELF" >&6; }
22031else
22032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22033$as_echo "no" >&6; }
22034fi
22035
22036
22037  test -n "$READELF" && break
22038done
22039
22040  else
22041    # The variable is set, but is it from the command line or the environment?
22042
22043    # Try to remove the string !READELF! from our list.
22044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22046      # If it failed, the variable was not from the command line. Ignore it,
22047      # but warn the user (except for BASH, which is always set by the calling BASH).
22048      if test "xREADELF" != xBASH; then
22049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22050$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22051      fi
22052      # Try to locate tool using the code snippet
22053      for ac_prog in greadelf readelf
22054do
22055  # Extract the first word of "$ac_prog", so it can be a program name with args.
22056set dummy $ac_prog; ac_word=$2
22057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22058$as_echo_n "checking for $ac_word... " >&6; }
22059if ${ac_cv_path_READELF+:} false; then :
22060  $as_echo_n "(cached) " >&6
22061else
22062  case $READELF in
22063  [\\/]* | ?:[\\/]*)
22064  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22065  ;;
22066  *)
22067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22068for as_dir in $PATH
22069do
22070  IFS=$as_save_IFS
22071  test -z "$as_dir" && as_dir=.
22072    for ac_exec_ext in '' $ac_executable_extensions; do
22073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22074    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22076    break 2
22077  fi
22078done
22079  done
22080IFS=$as_save_IFS
22081
22082  ;;
22083esac
22084fi
22085READELF=$ac_cv_path_READELF
22086if test -n "$READELF"; then
22087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22088$as_echo "$READELF" >&6; }
22089else
22090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22091$as_echo "no" >&6; }
22092fi
22093
22094
22095  test -n "$READELF" && break
22096done
22097
22098    else
22099      # If it succeeded, then it was overridden by the user. We will use it
22100      # for the tool.
22101
22102      # First remove it from the list of overridden variables, so we can test
22103      # for unknown variables in the end.
22104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22105
22106      # Check if we try to supply an empty value
22107      if test "x$READELF" = x; then
22108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22109$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22111$as_echo_n "checking for READELF... " >&6; }
22112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22113$as_echo "disabled" >&6; }
22114      else
22115        # Check if the provided tool contains a complete path.
22116        tool_specified="$READELF"
22117        tool_basename="${tool_specified##*/}"
22118        if test "x$tool_basename" = "x$tool_specified"; then
22119          # A command without a complete path is provided, search $PATH.
22120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22121$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22122          # Extract the first word of "$tool_basename", so it can be a program name with args.
22123set dummy $tool_basename; ac_word=$2
22124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22125$as_echo_n "checking for $ac_word... " >&6; }
22126if ${ac_cv_path_READELF+:} false; then :
22127  $as_echo_n "(cached) " >&6
22128else
22129  case $READELF in
22130  [\\/]* | ?:[\\/]*)
22131  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22132  ;;
22133  *)
22134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22135for as_dir in $PATH
22136do
22137  IFS=$as_save_IFS
22138  test -z "$as_dir" && as_dir=.
22139    for ac_exec_ext in '' $ac_executable_extensions; do
22140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22141    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22143    break 2
22144  fi
22145done
22146  done
22147IFS=$as_save_IFS
22148
22149  ;;
22150esac
22151fi
22152READELF=$ac_cv_path_READELF
22153if test -n "$READELF"; then
22154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22155$as_echo "$READELF" >&6; }
22156else
22157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22158$as_echo "no" >&6; }
22159fi
22160
22161
22162          if test "x$READELF" = x; then
22163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22164          fi
22165        else
22166          # Otherwise we believe it is a complete path. Use it as it is.
22167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22168$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22170$as_echo_n "checking for READELF... " >&6; }
22171          if test ! -x "$tool_specified"; then
22172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22173$as_echo "not found" >&6; }
22174            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22175          fi
22176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22177$as_echo "$tool_specified" >&6; }
22178        fi
22179      fi
22180    fi
22181
22182  fi
22183
22184
22185
22186
22187  # Publish this variable in the help.
22188
22189
22190  if [ -z "${HG+x}" ]; then
22191    # The variable is not set by user, try to locate tool using the code snippet
22192    for ac_prog in hg
22193do
22194  # Extract the first word of "$ac_prog", so it can be a program name with args.
22195set dummy $ac_prog; ac_word=$2
22196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22197$as_echo_n "checking for $ac_word... " >&6; }
22198if ${ac_cv_path_HG+:} false; then :
22199  $as_echo_n "(cached) " >&6
22200else
22201  case $HG in
22202  [\\/]* | ?:[\\/]*)
22203  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22204  ;;
22205  *)
22206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22207for as_dir in $PATH
22208do
22209  IFS=$as_save_IFS
22210  test -z "$as_dir" && as_dir=.
22211    for ac_exec_ext in '' $ac_executable_extensions; do
22212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22213    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22215    break 2
22216  fi
22217done
22218  done
22219IFS=$as_save_IFS
22220
22221  ;;
22222esac
22223fi
22224HG=$ac_cv_path_HG
22225if test -n "$HG"; then
22226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22227$as_echo "$HG" >&6; }
22228else
22229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22230$as_echo "no" >&6; }
22231fi
22232
22233
22234  test -n "$HG" && break
22235done
22236
22237  else
22238    # The variable is set, but is it from the command line or the environment?
22239
22240    # Try to remove the string !HG! from our list.
22241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22243      # If it failed, the variable was not from the command line. Ignore it,
22244      # but warn the user (except for BASH, which is always set by the calling BASH).
22245      if test "xHG" != xBASH; then
22246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22247$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22248      fi
22249      # Try to locate tool using the code snippet
22250      for ac_prog in hg
22251do
22252  # Extract the first word of "$ac_prog", so it can be a program name with args.
22253set dummy $ac_prog; ac_word=$2
22254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22255$as_echo_n "checking for $ac_word... " >&6; }
22256if ${ac_cv_path_HG+:} false; then :
22257  $as_echo_n "(cached) " >&6
22258else
22259  case $HG in
22260  [\\/]* | ?:[\\/]*)
22261  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22262  ;;
22263  *)
22264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22265for as_dir in $PATH
22266do
22267  IFS=$as_save_IFS
22268  test -z "$as_dir" && as_dir=.
22269    for ac_exec_ext in '' $ac_executable_extensions; do
22270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22271    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22273    break 2
22274  fi
22275done
22276  done
22277IFS=$as_save_IFS
22278
22279  ;;
22280esac
22281fi
22282HG=$ac_cv_path_HG
22283if test -n "$HG"; then
22284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22285$as_echo "$HG" >&6; }
22286else
22287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22288$as_echo "no" >&6; }
22289fi
22290
22291
22292  test -n "$HG" && break
22293done
22294
22295    else
22296      # If it succeeded, then it was overridden by the user. We will use it
22297      # for the tool.
22298
22299      # First remove it from the list of overridden variables, so we can test
22300      # for unknown variables in the end.
22301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22302
22303      # Check if we try to supply an empty value
22304      if test "x$HG" = x; then
22305        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22306$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22308$as_echo_n "checking for HG... " >&6; }
22309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22310$as_echo "disabled" >&6; }
22311      else
22312        # Check if the provided tool contains a complete path.
22313        tool_specified="$HG"
22314        tool_basename="${tool_specified##*/}"
22315        if test "x$tool_basename" = "x$tool_specified"; then
22316          # A command without a complete path is provided, search $PATH.
22317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22318$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22319          # Extract the first word of "$tool_basename", so it can be a program name with args.
22320set dummy $tool_basename; ac_word=$2
22321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22322$as_echo_n "checking for $ac_word... " >&6; }
22323if ${ac_cv_path_HG+:} false; then :
22324  $as_echo_n "(cached) " >&6
22325else
22326  case $HG in
22327  [\\/]* | ?:[\\/]*)
22328  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22329  ;;
22330  *)
22331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22332for as_dir in $PATH
22333do
22334  IFS=$as_save_IFS
22335  test -z "$as_dir" && as_dir=.
22336    for ac_exec_ext in '' $ac_executable_extensions; do
22337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22338    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22340    break 2
22341  fi
22342done
22343  done
22344IFS=$as_save_IFS
22345
22346  ;;
22347esac
22348fi
22349HG=$ac_cv_path_HG
22350if test -n "$HG"; then
22351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22352$as_echo "$HG" >&6; }
22353else
22354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22355$as_echo "no" >&6; }
22356fi
22357
22358
22359          if test "x$HG" = x; then
22360            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22361          fi
22362        else
22363          # Otherwise we believe it is a complete path. Use it as it is.
22364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22365$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22366          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22367$as_echo_n "checking for HG... " >&6; }
22368          if test ! -x "$tool_specified"; then
22369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22370$as_echo "not found" >&6; }
22371            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22372          fi
22373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22374$as_echo "$tool_specified" >&6; }
22375        fi
22376      fi
22377    fi
22378
22379  fi
22380
22381
22382
22383
22384  # Publish this variable in the help.
22385
22386
22387  if [ -z "${STAT+x}" ]; then
22388    # The variable is not set by user, try to locate tool using the code snippet
22389    for ac_prog in stat
22390do
22391  # Extract the first word of "$ac_prog", so it can be a program name with args.
22392set dummy $ac_prog; ac_word=$2
22393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22394$as_echo_n "checking for $ac_word... " >&6; }
22395if ${ac_cv_path_STAT+:} false; then :
22396  $as_echo_n "(cached) " >&6
22397else
22398  case $STAT in
22399  [\\/]* | ?:[\\/]*)
22400  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22401  ;;
22402  *)
22403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22404for as_dir in $PATH
22405do
22406  IFS=$as_save_IFS
22407  test -z "$as_dir" && as_dir=.
22408    for ac_exec_ext in '' $ac_executable_extensions; do
22409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22410    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22412    break 2
22413  fi
22414done
22415  done
22416IFS=$as_save_IFS
22417
22418  ;;
22419esac
22420fi
22421STAT=$ac_cv_path_STAT
22422if test -n "$STAT"; then
22423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22424$as_echo "$STAT" >&6; }
22425else
22426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22427$as_echo "no" >&6; }
22428fi
22429
22430
22431  test -n "$STAT" && break
22432done
22433
22434  else
22435    # The variable is set, but is it from the command line or the environment?
22436
22437    # Try to remove the string !STAT! from our list.
22438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22440      # If it failed, the variable was not from the command line. Ignore it,
22441      # but warn the user (except for BASH, which is always set by the calling BASH).
22442      if test "xSTAT" != xBASH; then
22443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22444$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22445      fi
22446      # Try to locate tool using the code snippet
22447      for ac_prog in stat
22448do
22449  # Extract the first word of "$ac_prog", so it can be a program name with args.
22450set dummy $ac_prog; ac_word=$2
22451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22452$as_echo_n "checking for $ac_word... " >&6; }
22453if ${ac_cv_path_STAT+:} false; then :
22454  $as_echo_n "(cached) " >&6
22455else
22456  case $STAT in
22457  [\\/]* | ?:[\\/]*)
22458  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22459  ;;
22460  *)
22461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22462for as_dir in $PATH
22463do
22464  IFS=$as_save_IFS
22465  test -z "$as_dir" && as_dir=.
22466    for ac_exec_ext in '' $ac_executable_extensions; do
22467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22468    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22470    break 2
22471  fi
22472done
22473  done
22474IFS=$as_save_IFS
22475
22476  ;;
22477esac
22478fi
22479STAT=$ac_cv_path_STAT
22480if test -n "$STAT"; then
22481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22482$as_echo "$STAT" >&6; }
22483else
22484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22485$as_echo "no" >&6; }
22486fi
22487
22488
22489  test -n "$STAT" && break
22490done
22491
22492    else
22493      # If it succeeded, then it was overridden by the user. We will use it
22494      # for the tool.
22495
22496      # First remove it from the list of overridden variables, so we can test
22497      # for unknown variables in the end.
22498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22499
22500      # Check if we try to supply an empty value
22501      if test "x$STAT" = x; then
22502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22503$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22505$as_echo_n "checking for STAT... " >&6; }
22506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22507$as_echo "disabled" >&6; }
22508      else
22509        # Check if the provided tool contains a complete path.
22510        tool_specified="$STAT"
22511        tool_basename="${tool_specified##*/}"
22512        if test "x$tool_basename" = "x$tool_specified"; then
22513          # A command without a complete path is provided, search $PATH.
22514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22515$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22516          # Extract the first word of "$tool_basename", so it can be a program name with args.
22517set dummy $tool_basename; ac_word=$2
22518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22519$as_echo_n "checking for $ac_word... " >&6; }
22520if ${ac_cv_path_STAT+:} false; then :
22521  $as_echo_n "(cached) " >&6
22522else
22523  case $STAT in
22524  [\\/]* | ?:[\\/]*)
22525  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22526  ;;
22527  *)
22528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22529for as_dir in $PATH
22530do
22531  IFS=$as_save_IFS
22532  test -z "$as_dir" && as_dir=.
22533    for ac_exec_ext in '' $ac_executable_extensions; do
22534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22535    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22537    break 2
22538  fi
22539done
22540  done
22541IFS=$as_save_IFS
22542
22543  ;;
22544esac
22545fi
22546STAT=$ac_cv_path_STAT
22547if test -n "$STAT"; then
22548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22549$as_echo "$STAT" >&6; }
22550else
22551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22552$as_echo "no" >&6; }
22553fi
22554
22555
22556          if test "x$STAT" = x; then
22557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22558          fi
22559        else
22560          # Otherwise we believe it is a complete path. Use it as it is.
22561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22562$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22564$as_echo_n "checking for STAT... " >&6; }
22565          if test ! -x "$tool_specified"; then
22566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22567$as_echo "not found" >&6; }
22568            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22569          fi
22570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22571$as_echo "$tool_specified" >&6; }
22572        fi
22573      fi
22574    fi
22575
22576  fi
22577
22578
22579
22580
22581  # Publish this variable in the help.
22582
22583
22584  if [ -z "${TIME+x}" ]; then
22585    # The variable is not set by user, try to locate tool using the code snippet
22586    for ac_prog in time
22587do
22588  # Extract the first word of "$ac_prog", so it can be a program name with args.
22589set dummy $ac_prog; ac_word=$2
22590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22591$as_echo_n "checking for $ac_word... " >&6; }
22592if ${ac_cv_path_TIME+:} false; then :
22593  $as_echo_n "(cached) " >&6
22594else
22595  case $TIME in
22596  [\\/]* | ?:[\\/]*)
22597  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22598  ;;
22599  *)
22600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22601for as_dir in $PATH
22602do
22603  IFS=$as_save_IFS
22604  test -z "$as_dir" && as_dir=.
22605    for ac_exec_ext in '' $ac_executable_extensions; do
22606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22607    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22609    break 2
22610  fi
22611done
22612  done
22613IFS=$as_save_IFS
22614
22615  ;;
22616esac
22617fi
22618TIME=$ac_cv_path_TIME
22619if test -n "$TIME"; then
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22621$as_echo "$TIME" >&6; }
22622else
22623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22624$as_echo "no" >&6; }
22625fi
22626
22627
22628  test -n "$TIME" && break
22629done
22630
22631  else
22632    # The variable is set, but is it from the command line or the environment?
22633
22634    # Try to remove the string !TIME! from our list.
22635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22637      # If it failed, the variable was not from the command line. Ignore it,
22638      # but warn the user (except for BASH, which is always set by the calling BASH).
22639      if test "xTIME" != xBASH; then
22640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22641$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22642      fi
22643      # Try to locate tool using the code snippet
22644      for ac_prog in time
22645do
22646  # Extract the first word of "$ac_prog", so it can be a program name with args.
22647set dummy $ac_prog; ac_word=$2
22648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22649$as_echo_n "checking for $ac_word... " >&6; }
22650if ${ac_cv_path_TIME+:} false; then :
22651  $as_echo_n "(cached) " >&6
22652else
22653  case $TIME in
22654  [\\/]* | ?:[\\/]*)
22655  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22656  ;;
22657  *)
22658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22659for as_dir in $PATH
22660do
22661  IFS=$as_save_IFS
22662  test -z "$as_dir" && as_dir=.
22663    for ac_exec_ext in '' $ac_executable_extensions; do
22664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22665    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22667    break 2
22668  fi
22669done
22670  done
22671IFS=$as_save_IFS
22672
22673  ;;
22674esac
22675fi
22676TIME=$ac_cv_path_TIME
22677if test -n "$TIME"; then
22678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22679$as_echo "$TIME" >&6; }
22680else
22681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22682$as_echo "no" >&6; }
22683fi
22684
22685
22686  test -n "$TIME" && break
22687done
22688
22689    else
22690      # If it succeeded, then it was overridden by the user. We will use it
22691      # for the tool.
22692
22693      # First remove it from the list of overridden variables, so we can test
22694      # for unknown variables in the end.
22695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22696
22697      # Check if we try to supply an empty value
22698      if test "x$TIME" = x; then
22699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22700$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22702$as_echo_n "checking for TIME... " >&6; }
22703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22704$as_echo "disabled" >&6; }
22705      else
22706        # Check if the provided tool contains a complete path.
22707        tool_specified="$TIME"
22708        tool_basename="${tool_specified##*/}"
22709        if test "x$tool_basename" = "x$tool_specified"; then
22710          # A command without a complete path is provided, search $PATH.
22711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22712$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22713          # Extract the first word of "$tool_basename", so it can be a program name with args.
22714set dummy $tool_basename; ac_word=$2
22715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22716$as_echo_n "checking for $ac_word... " >&6; }
22717if ${ac_cv_path_TIME+:} false; then :
22718  $as_echo_n "(cached) " >&6
22719else
22720  case $TIME in
22721  [\\/]* | ?:[\\/]*)
22722  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22723  ;;
22724  *)
22725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22726for as_dir in $PATH
22727do
22728  IFS=$as_save_IFS
22729  test -z "$as_dir" && as_dir=.
22730    for ac_exec_ext in '' $ac_executable_extensions; do
22731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22732    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22734    break 2
22735  fi
22736done
22737  done
22738IFS=$as_save_IFS
22739
22740  ;;
22741esac
22742fi
22743TIME=$ac_cv_path_TIME
22744if test -n "$TIME"; then
22745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22746$as_echo "$TIME" >&6; }
22747else
22748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22749$as_echo "no" >&6; }
22750fi
22751
22752
22753          if test "x$TIME" = x; then
22754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22755          fi
22756        else
22757          # Otherwise we believe it is a complete path. Use it as it is.
22758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22759$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22761$as_echo_n "checking for TIME... " >&6; }
22762          if test ! -x "$tool_specified"; then
22763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22764$as_echo "not found" >&6; }
22765            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22766          fi
22767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22768$as_echo "$tool_specified" >&6; }
22769        fi
22770      fi
22771    fi
22772
22773  fi
22774
22775
22776
22777
22778  # Publish this variable in the help.
22779
22780
22781  if [ -z "${DTRACE+x}" ]; then
22782    # The variable is not set by user, try to locate tool using the code snippet
22783    for ac_prog in dtrace
22784do
22785  # Extract the first word of "$ac_prog", so it can be a program name with args.
22786set dummy $ac_prog; ac_word=$2
22787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22788$as_echo_n "checking for $ac_word... " >&6; }
22789if ${ac_cv_path_DTRACE+:} false; then :
22790  $as_echo_n "(cached) " >&6
22791else
22792  case $DTRACE in
22793  [\\/]* | ?:[\\/]*)
22794  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22795  ;;
22796  *)
22797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22798for as_dir in $PATH
22799do
22800  IFS=$as_save_IFS
22801  test -z "$as_dir" && as_dir=.
22802    for ac_exec_ext in '' $ac_executable_extensions; do
22803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22804    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22806    break 2
22807  fi
22808done
22809  done
22810IFS=$as_save_IFS
22811
22812  ;;
22813esac
22814fi
22815DTRACE=$ac_cv_path_DTRACE
22816if test -n "$DTRACE"; then
22817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22818$as_echo "$DTRACE" >&6; }
22819else
22820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22821$as_echo "no" >&6; }
22822fi
22823
22824
22825  test -n "$DTRACE" && break
22826done
22827
22828  else
22829    # The variable is set, but is it from the command line or the environment?
22830
22831    # Try to remove the string !DTRACE! from our list.
22832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22834      # If it failed, the variable was not from the command line. Ignore it,
22835      # but warn the user (except for BASH, which is always set by the calling BASH).
22836      if test "xDTRACE" != xBASH; then
22837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22838$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22839      fi
22840      # Try to locate tool using the code snippet
22841      for ac_prog in dtrace
22842do
22843  # Extract the first word of "$ac_prog", so it can be a program name with args.
22844set dummy $ac_prog; ac_word=$2
22845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22846$as_echo_n "checking for $ac_word... " >&6; }
22847if ${ac_cv_path_DTRACE+:} false; then :
22848  $as_echo_n "(cached) " >&6
22849else
22850  case $DTRACE in
22851  [\\/]* | ?:[\\/]*)
22852  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22853  ;;
22854  *)
22855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22856for as_dir in $PATH
22857do
22858  IFS=$as_save_IFS
22859  test -z "$as_dir" && as_dir=.
22860    for ac_exec_ext in '' $ac_executable_extensions; do
22861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22862    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22864    break 2
22865  fi
22866done
22867  done
22868IFS=$as_save_IFS
22869
22870  ;;
22871esac
22872fi
22873DTRACE=$ac_cv_path_DTRACE
22874if test -n "$DTRACE"; then
22875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22876$as_echo "$DTRACE" >&6; }
22877else
22878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22879$as_echo "no" >&6; }
22880fi
22881
22882
22883  test -n "$DTRACE" && break
22884done
22885
22886    else
22887      # If it succeeded, then it was overridden by the user. We will use it
22888      # for the tool.
22889
22890      # First remove it from the list of overridden variables, so we can test
22891      # for unknown variables in the end.
22892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22893
22894      # Check if we try to supply an empty value
22895      if test "x$DTRACE" = x; then
22896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22897$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22899$as_echo_n "checking for DTRACE... " >&6; }
22900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22901$as_echo "disabled" >&6; }
22902      else
22903        # Check if the provided tool contains a complete path.
22904        tool_specified="$DTRACE"
22905        tool_basename="${tool_specified##*/}"
22906        if test "x$tool_basename" = "x$tool_specified"; then
22907          # A command without a complete path is provided, search $PATH.
22908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22909$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22910          # Extract the first word of "$tool_basename", so it can be a program name with args.
22911set dummy $tool_basename; ac_word=$2
22912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22913$as_echo_n "checking for $ac_word... " >&6; }
22914if ${ac_cv_path_DTRACE+:} false; then :
22915  $as_echo_n "(cached) " >&6
22916else
22917  case $DTRACE in
22918  [\\/]* | ?:[\\/]*)
22919  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22920  ;;
22921  *)
22922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22923for as_dir in $PATH
22924do
22925  IFS=$as_save_IFS
22926  test -z "$as_dir" && as_dir=.
22927    for ac_exec_ext in '' $ac_executable_extensions; do
22928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22929    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22931    break 2
22932  fi
22933done
22934  done
22935IFS=$as_save_IFS
22936
22937  ;;
22938esac
22939fi
22940DTRACE=$ac_cv_path_DTRACE
22941if test -n "$DTRACE"; then
22942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22943$as_echo "$DTRACE" >&6; }
22944else
22945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22946$as_echo "no" >&6; }
22947fi
22948
22949
22950          if test "x$DTRACE" = x; then
22951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22952          fi
22953        else
22954          # Otherwise we believe it is a complete path. Use it as it is.
22955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22956$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22958$as_echo_n "checking for DTRACE... " >&6; }
22959          if test ! -x "$tool_specified"; then
22960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22961$as_echo "not found" >&6; }
22962            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22963          fi
22964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22965$as_echo "$tool_specified" >&6; }
22966        fi
22967      fi
22968    fi
22969
22970  fi
22971
22972
22973
22974
22975  # Publish this variable in the help.
22976
22977
22978  if [ -z "${PATCH+x}" ]; then
22979    # The variable is not set by user, try to locate tool using the code snippet
22980    for ac_prog in gpatch patch
22981do
22982  # Extract the first word of "$ac_prog", so it can be a program name with args.
22983set dummy $ac_prog; ac_word=$2
22984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22985$as_echo_n "checking for $ac_word... " >&6; }
22986if ${ac_cv_path_PATCH+:} false; then :
22987  $as_echo_n "(cached) " >&6
22988else
22989  case $PATCH in
22990  [\\/]* | ?:[\\/]*)
22991  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22992  ;;
22993  *)
22994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22995for as_dir in $PATH
22996do
22997  IFS=$as_save_IFS
22998  test -z "$as_dir" && as_dir=.
22999    for ac_exec_ext in '' $ac_executable_extensions; do
23000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23001    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23003    break 2
23004  fi
23005done
23006  done
23007IFS=$as_save_IFS
23008
23009  ;;
23010esac
23011fi
23012PATCH=$ac_cv_path_PATCH
23013if test -n "$PATCH"; then
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23015$as_echo "$PATCH" >&6; }
23016else
23017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23018$as_echo "no" >&6; }
23019fi
23020
23021
23022  test -n "$PATCH" && break
23023done
23024
23025  else
23026    # The variable is set, but is it from the command line or the environment?
23027
23028    # Try to remove the string !PATCH! from our list.
23029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23031      # If it failed, the variable was not from the command line. Ignore it,
23032      # but warn the user (except for BASH, which is always set by the calling BASH).
23033      if test "xPATCH" != xBASH; then
23034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23035$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23036      fi
23037      # Try to locate tool using the code snippet
23038      for ac_prog in gpatch patch
23039do
23040  # Extract the first word of "$ac_prog", so it can be a program name with args.
23041set dummy $ac_prog; ac_word=$2
23042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23043$as_echo_n "checking for $ac_word... " >&6; }
23044if ${ac_cv_path_PATCH+:} false; then :
23045  $as_echo_n "(cached) " >&6
23046else
23047  case $PATCH in
23048  [\\/]* | ?:[\\/]*)
23049  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23050  ;;
23051  *)
23052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23053for as_dir in $PATH
23054do
23055  IFS=$as_save_IFS
23056  test -z "$as_dir" && as_dir=.
23057    for ac_exec_ext in '' $ac_executable_extensions; do
23058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23059    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23061    break 2
23062  fi
23063done
23064  done
23065IFS=$as_save_IFS
23066
23067  ;;
23068esac
23069fi
23070PATCH=$ac_cv_path_PATCH
23071if test -n "$PATCH"; then
23072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23073$as_echo "$PATCH" >&6; }
23074else
23075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23076$as_echo "no" >&6; }
23077fi
23078
23079
23080  test -n "$PATCH" && break
23081done
23082
23083    else
23084      # If it succeeded, then it was overridden by the user. We will use it
23085      # for the tool.
23086
23087      # First remove it from the list of overridden variables, so we can test
23088      # for unknown variables in the end.
23089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23090
23091      # Check if we try to supply an empty value
23092      if test "x$PATCH" = x; then
23093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23094$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23096$as_echo_n "checking for PATCH... " >&6; }
23097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23098$as_echo "disabled" >&6; }
23099      else
23100        # Check if the provided tool contains a complete path.
23101        tool_specified="$PATCH"
23102        tool_basename="${tool_specified##*/}"
23103        if test "x$tool_basename" = "x$tool_specified"; then
23104          # A command without a complete path is provided, search $PATH.
23105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23106$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23107          # Extract the first word of "$tool_basename", so it can be a program name with args.
23108set dummy $tool_basename; ac_word=$2
23109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23110$as_echo_n "checking for $ac_word... " >&6; }
23111if ${ac_cv_path_PATCH+:} false; then :
23112  $as_echo_n "(cached) " >&6
23113else
23114  case $PATCH in
23115  [\\/]* | ?:[\\/]*)
23116  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23117  ;;
23118  *)
23119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23120for as_dir in $PATH
23121do
23122  IFS=$as_save_IFS
23123  test -z "$as_dir" && as_dir=.
23124    for ac_exec_ext in '' $ac_executable_extensions; do
23125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23126    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23128    break 2
23129  fi
23130done
23131  done
23132IFS=$as_save_IFS
23133
23134  ;;
23135esac
23136fi
23137PATCH=$ac_cv_path_PATCH
23138if test -n "$PATCH"; then
23139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23140$as_echo "$PATCH" >&6; }
23141else
23142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23143$as_echo "no" >&6; }
23144fi
23145
23146
23147          if test "x$PATCH" = x; then
23148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23149          fi
23150        else
23151          # Otherwise we believe it is a complete path. Use it as it is.
23152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23153$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23155$as_echo_n "checking for PATCH... " >&6; }
23156          if test ! -x "$tool_specified"; then
23157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23158$as_echo "not found" >&6; }
23159            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23160          fi
23161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23162$as_echo "$tool_specified" >&6; }
23163        fi
23164      fi
23165    fi
23166
23167  fi
23168
23169
23170  # Check if it's GNU time
23171  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23172  if test "x$IS_GNU_TIME" != x; then
23173    IS_GNU_TIME=yes
23174  else
23175    IS_GNU_TIME=no
23176  fi
23177
23178
23179  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23180
23181
23182
23183  # Publish this variable in the help.
23184
23185
23186  if [ -z "${DSYMUTIL+x}" ]; then
23187    # The variable is not set by user, try to locate tool using the code snippet
23188    for ac_prog in dsymutil
23189do
23190  # Extract the first word of "$ac_prog", so it can be a program name with args.
23191set dummy $ac_prog; ac_word=$2
23192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23193$as_echo_n "checking for $ac_word... " >&6; }
23194if ${ac_cv_path_DSYMUTIL+:} false; then :
23195  $as_echo_n "(cached) " >&6
23196else
23197  case $DSYMUTIL in
23198  [\\/]* | ?:[\\/]*)
23199  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23200  ;;
23201  *)
23202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23203for as_dir in $PATH
23204do
23205  IFS=$as_save_IFS
23206  test -z "$as_dir" && as_dir=.
23207    for ac_exec_ext in '' $ac_executable_extensions; do
23208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23209    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23211    break 2
23212  fi
23213done
23214  done
23215IFS=$as_save_IFS
23216
23217  ;;
23218esac
23219fi
23220DSYMUTIL=$ac_cv_path_DSYMUTIL
23221if test -n "$DSYMUTIL"; then
23222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23223$as_echo "$DSYMUTIL" >&6; }
23224else
23225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23226$as_echo "no" >&6; }
23227fi
23228
23229
23230  test -n "$DSYMUTIL" && break
23231done
23232
23233  else
23234    # The variable is set, but is it from the command line or the environment?
23235
23236    # Try to remove the string !DSYMUTIL! from our list.
23237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23239      # If it failed, the variable was not from the command line. Ignore it,
23240      # but warn the user (except for BASH, which is always set by the calling BASH).
23241      if test "xDSYMUTIL" != xBASH; then
23242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23243$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23244      fi
23245      # Try to locate tool using the code snippet
23246      for ac_prog in dsymutil
23247do
23248  # Extract the first word of "$ac_prog", so it can be a program name with args.
23249set dummy $ac_prog; ac_word=$2
23250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23251$as_echo_n "checking for $ac_word... " >&6; }
23252if ${ac_cv_path_DSYMUTIL+:} false; then :
23253  $as_echo_n "(cached) " >&6
23254else
23255  case $DSYMUTIL in
23256  [\\/]* | ?:[\\/]*)
23257  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23258  ;;
23259  *)
23260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23261for as_dir in $PATH
23262do
23263  IFS=$as_save_IFS
23264  test -z "$as_dir" && as_dir=.
23265    for ac_exec_ext in '' $ac_executable_extensions; do
23266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23267    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23269    break 2
23270  fi
23271done
23272  done
23273IFS=$as_save_IFS
23274
23275  ;;
23276esac
23277fi
23278DSYMUTIL=$ac_cv_path_DSYMUTIL
23279if test -n "$DSYMUTIL"; then
23280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23281$as_echo "$DSYMUTIL" >&6; }
23282else
23283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23284$as_echo "no" >&6; }
23285fi
23286
23287
23288  test -n "$DSYMUTIL" && break
23289done
23290
23291    else
23292      # If it succeeded, then it was overridden by the user. We will use it
23293      # for the tool.
23294
23295      # First remove it from the list of overridden variables, so we can test
23296      # for unknown variables in the end.
23297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23298
23299      # Check if we try to supply an empty value
23300      if test "x$DSYMUTIL" = x; then
23301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23302$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23304$as_echo_n "checking for DSYMUTIL... " >&6; }
23305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23306$as_echo "disabled" >&6; }
23307      else
23308        # Check if the provided tool contains a complete path.
23309        tool_specified="$DSYMUTIL"
23310        tool_basename="${tool_specified##*/}"
23311        if test "x$tool_basename" = "x$tool_specified"; then
23312          # A command without a complete path is provided, search $PATH.
23313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23314$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23315          # Extract the first word of "$tool_basename", so it can be a program name with args.
23316set dummy $tool_basename; ac_word=$2
23317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23318$as_echo_n "checking for $ac_word... " >&6; }
23319if ${ac_cv_path_DSYMUTIL+:} false; then :
23320  $as_echo_n "(cached) " >&6
23321else
23322  case $DSYMUTIL in
23323  [\\/]* | ?:[\\/]*)
23324  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23325  ;;
23326  *)
23327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23328for as_dir in $PATH
23329do
23330  IFS=$as_save_IFS
23331  test -z "$as_dir" && as_dir=.
23332    for ac_exec_ext in '' $ac_executable_extensions; do
23333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23334    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23336    break 2
23337  fi
23338done
23339  done
23340IFS=$as_save_IFS
23341
23342  ;;
23343esac
23344fi
23345DSYMUTIL=$ac_cv_path_DSYMUTIL
23346if test -n "$DSYMUTIL"; then
23347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23348$as_echo "$DSYMUTIL" >&6; }
23349else
23350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23351$as_echo "no" >&6; }
23352fi
23353
23354
23355          if test "x$DSYMUTIL" = x; then
23356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23357          fi
23358        else
23359          # Otherwise we believe it is a complete path. Use it as it is.
23360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23361$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23363$as_echo_n "checking for DSYMUTIL... " >&6; }
23364          if test ! -x "$tool_specified"; then
23365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23366$as_echo "not found" >&6; }
23367            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23368          fi
23369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23370$as_echo "$tool_specified" >&6; }
23371        fi
23372      fi
23373    fi
23374
23375  fi
23376
23377
23378
23379  if test "x$DSYMUTIL" = x; then
23380    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23381  fi
23382
23383
23384
23385
23386
23387  # Publish this variable in the help.
23388
23389
23390  if [ -z "${XATTR+x}" ]; then
23391    # The variable is not set by user, try to locate tool using the code snippet
23392    for ac_prog in xattr
23393do
23394  # Extract the first word of "$ac_prog", so it can be a program name with args.
23395set dummy $ac_prog; ac_word=$2
23396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23397$as_echo_n "checking for $ac_word... " >&6; }
23398if ${ac_cv_path_XATTR+:} false; then :
23399  $as_echo_n "(cached) " >&6
23400else
23401  case $XATTR in
23402  [\\/]* | ?:[\\/]*)
23403  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23404  ;;
23405  *)
23406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23407for as_dir in $PATH
23408do
23409  IFS=$as_save_IFS
23410  test -z "$as_dir" && as_dir=.
23411    for ac_exec_ext in '' $ac_executable_extensions; do
23412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23413    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23415    break 2
23416  fi
23417done
23418  done
23419IFS=$as_save_IFS
23420
23421  ;;
23422esac
23423fi
23424XATTR=$ac_cv_path_XATTR
23425if test -n "$XATTR"; then
23426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23427$as_echo "$XATTR" >&6; }
23428else
23429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23430$as_echo "no" >&6; }
23431fi
23432
23433
23434  test -n "$XATTR" && break
23435done
23436
23437  else
23438    # The variable is set, but is it from the command line or the environment?
23439
23440    # Try to remove the string !XATTR! from our list.
23441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23443      # If it failed, the variable was not from the command line. Ignore it,
23444      # but warn the user (except for BASH, which is always set by the calling BASH).
23445      if test "xXATTR" != xBASH; then
23446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23447$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23448      fi
23449      # Try to locate tool using the code snippet
23450      for ac_prog in xattr
23451do
23452  # Extract the first word of "$ac_prog", so it can be a program name with args.
23453set dummy $ac_prog; ac_word=$2
23454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23455$as_echo_n "checking for $ac_word... " >&6; }
23456if ${ac_cv_path_XATTR+:} false; then :
23457  $as_echo_n "(cached) " >&6
23458else
23459  case $XATTR in
23460  [\\/]* | ?:[\\/]*)
23461  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23462  ;;
23463  *)
23464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23465for as_dir in $PATH
23466do
23467  IFS=$as_save_IFS
23468  test -z "$as_dir" && as_dir=.
23469    for ac_exec_ext in '' $ac_executable_extensions; do
23470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23471    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23473    break 2
23474  fi
23475done
23476  done
23477IFS=$as_save_IFS
23478
23479  ;;
23480esac
23481fi
23482XATTR=$ac_cv_path_XATTR
23483if test -n "$XATTR"; then
23484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23485$as_echo "$XATTR" >&6; }
23486else
23487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23488$as_echo "no" >&6; }
23489fi
23490
23491
23492  test -n "$XATTR" && break
23493done
23494
23495    else
23496      # If it succeeded, then it was overridden by the user. We will use it
23497      # for the tool.
23498
23499      # First remove it from the list of overridden variables, so we can test
23500      # for unknown variables in the end.
23501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23502
23503      # Check if we try to supply an empty value
23504      if test "x$XATTR" = x; then
23505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23506$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23508$as_echo_n "checking for XATTR... " >&6; }
23509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23510$as_echo "disabled" >&6; }
23511      else
23512        # Check if the provided tool contains a complete path.
23513        tool_specified="$XATTR"
23514        tool_basename="${tool_specified##*/}"
23515        if test "x$tool_basename" = "x$tool_specified"; then
23516          # A command without a complete path is provided, search $PATH.
23517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23518$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23519          # Extract the first word of "$tool_basename", so it can be a program name with args.
23520set dummy $tool_basename; ac_word=$2
23521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23522$as_echo_n "checking for $ac_word... " >&6; }
23523if ${ac_cv_path_XATTR+:} false; then :
23524  $as_echo_n "(cached) " >&6
23525else
23526  case $XATTR in
23527  [\\/]* | ?:[\\/]*)
23528  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23529  ;;
23530  *)
23531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23532for as_dir in $PATH
23533do
23534  IFS=$as_save_IFS
23535  test -z "$as_dir" && as_dir=.
23536    for ac_exec_ext in '' $ac_executable_extensions; do
23537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23538    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23540    break 2
23541  fi
23542done
23543  done
23544IFS=$as_save_IFS
23545
23546  ;;
23547esac
23548fi
23549XATTR=$ac_cv_path_XATTR
23550if test -n "$XATTR"; then
23551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23552$as_echo "$XATTR" >&6; }
23553else
23554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23555$as_echo "no" >&6; }
23556fi
23557
23558
23559          if test "x$XATTR" = x; then
23560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23561          fi
23562        else
23563          # Otherwise we believe it is a complete path. Use it as it is.
23564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23565$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23567$as_echo_n "checking for XATTR... " >&6; }
23568          if test ! -x "$tool_specified"; then
23569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23570$as_echo "not found" >&6; }
23571            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23572          fi
23573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23574$as_echo "$tool_specified" >&6; }
23575        fi
23576      fi
23577    fi
23578
23579  fi
23580
23581
23582
23583  if test "x$XATTR" = x; then
23584    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23585  fi
23586
23587
23588
23589
23590  # Publish this variable in the help.
23591
23592
23593  if [ -z "${CODESIGN+x}" ]; then
23594    # The variable is not set by user, try to locate tool using the code snippet
23595    for ac_prog in codesign
23596do
23597  # Extract the first word of "$ac_prog", so it can be a program name with args.
23598set dummy $ac_prog; ac_word=$2
23599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23600$as_echo_n "checking for $ac_word... " >&6; }
23601if ${ac_cv_path_CODESIGN+:} false; then :
23602  $as_echo_n "(cached) " >&6
23603else
23604  case $CODESIGN in
23605  [\\/]* | ?:[\\/]*)
23606  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23607  ;;
23608  *)
23609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23610for as_dir in $PATH
23611do
23612  IFS=$as_save_IFS
23613  test -z "$as_dir" && as_dir=.
23614    for ac_exec_ext in '' $ac_executable_extensions; do
23615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23616    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23618    break 2
23619  fi
23620done
23621  done
23622IFS=$as_save_IFS
23623
23624  ;;
23625esac
23626fi
23627CODESIGN=$ac_cv_path_CODESIGN
23628if test -n "$CODESIGN"; then
23629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23630$as_echo "$CODESIGN" >&6; }
23631else
23632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23633$as_echo "no" >&6; }
23634fi
23635
23636
23637  test -n "$CODESIGN" && break
23638done
23639
23640  else
23641    # The variable is set, but is it from the command line or the environment?
23642
23643    # Try to remove the string !CODESIGN! from our list.
23644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23646      # If it failed, the variable was not from the command line. Ignore it,
23647      # but warn the user (except for BASH, which is always set by the calling BASH).
23648      if test "xCODESIGN" != xBASH; then
23649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23650$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23651      fi
23652      # Try to locate tool using the code snippet
23653      for ac_prog in codesign
23654do
23655  # Extract the first word of "$ac_prog", so it can be a program name with args.
23656set dummy $ac_prog; ac_word=$2
23657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23658$as_echo_n "checking for $ac_word... " >&6; }
23659if ${ac_cv_path_CODESIGN+:} false; then :
23660  $as_echo_n "(cached) " >&6
23661else
23662  case $CODESIGN in
23663  [\\/]* | ?:[\\/]*)
23664  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23665  ;;
23666  *)
23667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23668for as_dir in $PATH
23669do
23670  IFS=$as_save_IFS
23671  test -z "$as_dir" && as_dir=.
23672    for ac_exec_ext in '' $ac_executable_extensions; do
23673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23674    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23676    break 2
23677  fi
23678done
23679  done
23680IFS=$as_save_IFS
23681
23682  ;;
23683esac
23684fi
23685CODESIGN=$ac_cv_path_CODESIGN
23686if test -n "$CODESIGN"; then
23687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23688$as_echo "$CODESIGN" >&6; }
23689else
23690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23691$as_echo "no" >&6; }
23692fi
23693
23694
23695  test -n "$CODESIGN" && break
23696done
23697
23698    else
23699      # If it succeeded, then it was overridden by the user. We will use it
23700      # for the tool.
23701
23702      # First remove it from the list of overridden variables, so we can test
23703      # for unknown variables in the end.
23704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23705
23706      # Check if we try to supply an empty value
23707      if test "x$CODESIGN" = x; then
23708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23709$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23711$as_echo_n "checking for CODESIGN... " >&6; }
23712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23713$as_echo "disabled" >&6; }
23714      else
23715        # Check if the provided tool contains a complete path.
23716        tool_specified="$CODESIGN"
23717        tool_basename="${tool_specified##*/}"
23718        if test "x$tool_basename" = "x$tool_specified"; then
23719          # A command without a complete path is provided, search $PATH.
23720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23721$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23722          # Extract the first word of "$tool_basename", so it can be a program name with args.
23723set dummy $tool_basename; ac_word=$2
23724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23725$as_echo_n "checking for $ac_word... " >&6; }
23726if ${ac_cv_path_CODESIGN+:} false; then :
23727  $as_echo_n "(cached) " >&6
23728else
23729  case $CODESIGN in
23730  [\\/]* | ?:[\\/]*)
23731  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23732  ;;
23733  *)
23734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23735for as_dir in $PATH
23736do
23737  IFS=$as_save_IFS
23738  test -z "$as_dir" && as_dir=.
23739    for ac_exec_ext in '' $ac_executable_extensions; do
23740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23741    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23743    break 2
23744  fi
23745done
23746  done
23747IFS=$as_save_IFS
23748
23749  ;;
23750esac
23751fi
23752CODESIGN=$ac_cv_path_CODESIGN
23753if test -n "$CODESIGN"; then
23754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23755$as_echo "$CODESIGN" >&6; }
23756else
23757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23758$as_echo "no" >&6; }
23759fi
23760
23761
23762          if test "x$CODESIGN" = x; then
23763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23764          fi
23765        else
23766          # Otherwise we believe it is a complete path. Use it as it is.
23767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23768$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23770$as_echo_n "checking for CODESIGN... " >&6; }
23771          if test ! -x "$tool_specified"; then
23772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23773$as_echo "not found" >&6; }
23774            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23775          fi
23776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23777$as_echo "$tool_specified" >&6; }
23778        fi
23779      fi
23780    fi
23781
23782  fi
23783
23784
23785    if test "x$CODESIGN" != "x"; then
23786      # Verify that the openjdk_codesign certificate is present
23787      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23788$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23789      $RM codesign-testfile
23790      $TOUCH codesign-testfile
23791      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23792      $RM codesign-testfile
23793      if test "x$CODESIGN" = x; then
23794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23795$as_echo "no" >&6; }
23796      else
23797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23798$as_echo "yes" >&6; }
23799      fi
23800    fi
23801
23802
23803
23804  # Publish this variable in the help.
23805
23806
23807  if [ -z "${SETFILE+x}" ]; then
23808    # The variable is not set by user, try to locate tool using the code snippet
23809    for ac_prog in SetFile
23810do
23811  # Extract the first word of "$ac_prog", so it can be a program name with args.
23812set dummy $ac_prog; ac_word=$2
23813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23814$as_echo_n "checking for $ac_word... " >&6; }
23815if ${ac_cv_path_SETFILE+:} false; then :
23816  $as_echo_n "(cached) " >&6
23817else
23818  case $SETFILE in
23819  [\\/]* | ?:[\\/]*)
23820  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23821  ;;
23822  *)
23823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23824for as_dir in $PATH
23825do
23826  IFS=$as_save_IFS
23827  test -z "$as_dir" && as_dir=.
23828    for ac_exec_ext in '' $ac_executable_extensions; do
23829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23830    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23832    break 2
23833  fi
23834done
23835  done
23836IFS=$as_save_IFS
23837
23838  ;;
23839esac
23840fi
23841SETFILE=$ac_cv_path_SETFILE
23842if test -n "$SETFILE"; then
23843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23844$as_echo "$SETFILE" >&6; }
23845else
23846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23847$as_echo "no" >&6; }
23848fi
23849
23850
23851  test -n "$SETFILE" && break
23852done
23853
23854  else
23855    # The variable is set, but is it from the command line or the environment?
23856
23857    # Try to remove the string !SETFILE! from our list.
23858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23860      # If it failed, the variable was not from the command line. Ignore it,
23861      # but warn the user (except for BASH, which is always set by the calling BASH).
23862      if test "xSETFILE" != xBASH; then
23863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23864$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23865      fi
23866      # Try to locate tool using the code snippet
23867      for ac_prog in SetFile
23868do
23869  # Extract the first word of "$ac_prog", so it can be a program name with args.
23870set dummy $ac_prog; ac_word=$2
23871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23872$as_echo_n "checking for $ac_word... " >&6; }
23873if ${ac_cv_path_SETFILE+:} false; then :
23874  $as_echo_n "(cached) " >&6
23875else
23876  case $SETFILE in
23877  [\\/]* | ?:[\\/]*)
23878  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23879  ;;
23880  *)
23881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23882for as_dir in $PATH
23883do
23884  IFS=$as_save_IFS
23885  test -z "$as_dir" && as_dir=.
23886    for ac_exec_ext in '' $ac_executable_extensions; do
23887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23888    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23890    break 2
23891  fi
23892done
23893  done
23894IFS=$as_save_IFS
23895
23896  ;;
23897esac
23898fi
23899SETFILE=$ac_cv_path_SETFILE
23900if test -n "$SETFILE"; then
23901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23902$as_echo "$SETFILE" >&6; }
23903else
23904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23905$as_echo "no" >&6; }
23906fi
23907
23908
23909  test -n "$SETFILE" && break
23910done
23911
23912    else
23913      # If it succeeded, then it was overridden by the user. We will use it
23914      # for the tool.
23915
23916      # First remove it from the list of overridden variables, so we can test
23917      # for unknown variables in the end.
23918      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23919
23920      # Check if we try to supply an empty value
23921      if test "x$SETFILE" = x; then
23922        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23923$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23925$as_echo_n "checking for SETFILE... " >&6; }
23926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23927$as_echo "disabled" >&6; }
23928      else
23929        # Check if the provided tool contains a complete path.
23930        tool_specified="$SETFILE"
23931        tool_basename="${tool_specified##*/}"
23932        if test "x$tool_basename" = "x$tool_specified"; then
23933          # A command without a complete path is provided, search $PATH.
23934          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23935$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23936          # Extract the first word of "$tool_basename", so it can be a program name with args.
23937set dummy $tool_basename; ac_word=$2
23938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23939$as_echo_n "checking for $ac_word... " >&6; }
23940if ${ac_cv_path_SETFILE+:} false; then :
23941  $as_echo_n "(cached) " >&6
23942else
23943  case $SETFILE in
23944  [\\/]* | ?:[\\/]*)
23945  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23946  ;;
23947  *)
23948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23949for as_dir in $PATH
23950do
23951  IFS=$as_save_IFS
23952  test -z "$as_dir" && as_dir=.
23953    for ac_exec_ext in '' $ac_executable_extensions; do
23954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23955    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23957    break 2
23958  fi
23959done
23960  done
23961IFS=$as_save_IFS
23962
23963  ;;
23964esac
23965fi
23966SETFILE=$ac_cv_path_SETFILE
23967if test -n "$SETFILE"; then
23968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23969$as_echo "$SETFILE" >&6; }
23970else
23971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23972$as_echo "no" >&6; }
23973fi
23974
23975
23976          if test "x$SETFILE" = x; then
23977            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23978          fi
23979        else
23980          # Otherwise we believe it is a complete path. Use it as it is.
23981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23982$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23983          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23984$as_echo_n "checking for SETFILE... " >&6; }
23985          if test ! -x "$tool_specified"; then
23986            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23987$as_echo "not found" >&6; }
23988            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23989          fi
23990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23991$as_echo "$tool_specified" >&6; }
23992        fi
23993      fi
23994    fi
23995
23996  fi
23997
23998
23999
24000  if test "x$SETFILE" = x; then
24001    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24002  fi
24003
24004
24005  fi
24006
24007
24008  # Test if bash supports pipefail.
24009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24010$as_echo_n "checking if bash supports pipefail... " >&6; }
24011  if ${BASH} -c 'set -o pipefail'; then
24012    BASH_ARGS="$BASH_ARGS -o pipefail"
24013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24014$as_echo "yes" >&6; }
24015  else
24016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24017$as_echo "no" >&6; }
24018  fi
24019
24020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24021$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24022  if ${BASH} -e -c 'true'; then
24023    BASH_ARGS="$BASH_ARGS -e"
24024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24025$as_echo "yes" >&6; }
24026  else
24027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24028$as_echo "no" >&6; }
24029  fi
24030
24031
24032
24033
24034# Check if pkg-config is available.
24035
24036
24037if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24038	if test -n "$ac_tool_prefix"; then
24039  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24040set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24042$as_echo_n "checking for $ac_word... " >&6; }
24043if ${ac_cv_path_PKG_CONFIG+:} false; then :
24044  $as_echo_n "(cached) " >&6
24045else
24046  case $PKG_CONFIG in
24047  [\\/]* | ?:[\\/]*)
24048  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24049  ;;
24050  *)
24051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24052for as_dir in $PATH
24053do
24054  IFS=$as_save_IFS
24055  test -z "$as_dir" && as_dir=.
24056    for ac_exec_ext in '' $ac_executable_extensions; do
24057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24058    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24060    break 2
24061  fi
24062done
24063  done
24064IFS=$as_save_IFS
24065
24066  ;;
24067esac
24068fi
24069PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24070if test -n "$PKG_CONFIG"; then
24071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24072$as_echo "$PKG_CONFIG" >&6; }
24073else
24074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24075$as_echo "no" >&6; }
24076fi
24077
24078
24079fi
24080if test -z "$ac_cv_path_PKG_CONFIG"; then
24081  ac_pt_PKG_CONFIG=$PKG_CONFIG
24082  # Extract the first word of "pkg-config", so it can be a program name with args.
24083set dummy pkg-config; ac_word=$2
24084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24085$as_echo_n "checking for $ac_word... " >&6; }
24086if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24087  $as_echo_n "(cached) " >&6
24088else
24089  case $ac_pt_PKG_CONFIG in
24090  [\\/]* | ?:[\\/]*)
24091  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24092  ;;
24093  *)
24094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24095for as_dir in $PATH
24096do
24097  IFS=$as_save_IFS
24098  test -z "$as_dir" && as_dir=.
24099    for ac_exec_ext in '' $ac_executable_extensions; do
24100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24101    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24103    break 2
24104  fi
24105done
24106  done
24107IFS=$as_save_IFS
24108
24109  ;;
24110esac
24111fi
24112ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24113if test -n "$ac_pt_PKG_CONFIG"; then
24114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24115$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24116else
24117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24118$as_echo "no" >&6; }
24119fi
24120
24121  if test "x$ac_pt_PKG_CONFIG" = x; then
24122    PKG_CONFIG=""
24123  else
24124    case $cross_compiling:$ac_tool_warned in
24125yes:)
24126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24128ac_tool_warned=yes ;;
24129esac
24130    PKG_CONFIG=$ac_pt_PKG_CONFIG
24131  fi
24132else
24133  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24134fi
24135
24136fi
24137if test -n "$PKG_CONFIG"; then
24138	_pkg_min_version=0.9.0
24139	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24140$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24141	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24142		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24143$as_echo "yes" >&6; }
24144	else
24145		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24146$as_echo "no" >&6; }
24147		PKG_CONFIG=""
24148	fi
24149
24150fi
24151
24152# After basic tools have been setup, we can check build os specific details.
24153
24154  ###############################################################################
24155
24156  # Note that this is the build platform OS version!
24157
24158  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24159  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24160  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24161  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24162
24163
24164
24165
24166
24167# Misc basic settings
24168
24169
24170# Check whether --with-default-make-target was given.
24171if test "${with_default_make_target+set}" = set; then :
24172  withval=$with_default_make_target;
24173fi
24174
24175  if test "x$with_default_make_target" = "x" \
24176      || test "x$with_default_make_target" = "xyes"; then
24177    DEFAULT_MAKE_TARGET="exploded-image"
24178  elif test "x$with_default_make_target" = "xno"; then
24179    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24180  else
24181    DEFAULT_MAKE_TARGET="$with_default_make_target"
24182  fi
24183
24184
24185
24186
24187###############################################################################
24188#
24189# Determine OpenJDK variants, options and version numbers.
24190#
24191###############################################################################
24192
24193# We need build & target for this.
24194
24195  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
24196  # We always build headless support.
24197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
24198$as_echo_n "checking headful support... " >&6; }
24199  # Check whether --enable-headful was given.
24200if test "${enable_headful+set}" = set; then :
24201  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
24202else
24203  SUPPORT_HEADFUL=yes
24204fi
24205
24206
24207  SUPPORT_HEADLESS=yes
24208  BUILD_HEADLESS="BUILD_HEADLESS:=true"
24209
24210  if test "x$SUPPORT_HEADFUL" = xyes; then
24211    # We are building both headful and headless.
24212    headful_msg="include support for both headful and headless"
24213  fi
24214
24215  if test "x$SUPPORT_HEADFUL" = xno; then
24216    # Thus we are building headless only.
24217    BUILD_HEADLESS="BUILD_HEADLESS:=true"
24218    headful_msg="headless only"
24219  fi
24220
24221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
24222$as_echo "$headful_msg" >&6; }
24223
24224
24225
24226
24227
24228  # Choose cacerts source file
24229
24230# Check whether --with-cacerts-file was given.
24231if test "${with_cacerts_file+set}" = set; then :
24232  withval=$with_cacerts_file;
24233fi
24234
24235  if test "x$with_cacerts_file" != x; then
24236    CACERTS_FILE=$with_cacerts_file
24237  fi
24238
24239
24240  # Enable or disable unlimited crypto
24241  # Check whether --enable-unlimited-crypto was given.
24242if test "${enable_unlimited_crypto+set}" = set; then :
24243  enableval=$enable_unlimited_crypto;
24244else
24245  enable_unlimited_crypto=no
24246fi
24247
24248  if test "x$enable_unlimited_crypto" = "xyes"; then
24249    UNLIMITED_CRYPTO=true
24250  else
24251    UNLIMITED_CRYPTO=false
24252  fi
24253
24254
24255  # Should we build the serviceability agent (SA)?
24256  INCLUDE_SA=true
24257  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24258    INCLUDE_SA=false
24259  fi
24260  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24261    INCLUDE_SA=false
24262  fi
24263
24264
24265  # Compress jars
24266  COMPRESS_JARS=false
24267
24268
24269
24270  # Setup default copyright year. Mostly overridden when building close to a new year.
24271
24272# Check whether --with-copyright-year was given.
24273if test "${with_copyright_year+set}" = set; then :
24274  withval=$with_copyright_year;
24275fi
24276
24277  if test "x$with_copyright_year" = xyes; then
24278    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24279  elif test "x$with_copyright_year" != x; then
24280    COPYRIGHT_YEAR="$with_copyright_year"
24281  else
24282    COPYRIGHT_YEAR=`$DATE +'%Y'`
24283  fi
24284
24285
24286
24287  # Check whether --enable-keep-packaged-modules was given.
24288if test "${enable_keep_packaged_modules+set}" = set; then :
24289  enableval=$enable_keep_packaged_modules;
24290fi
24291
24292
24293  if test "x$enable_keep_packaged_modules" = "xyes"; then
24294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24295$as_echo_n "checking if packaged modules are kept... " >&6; }
24296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24297$as_echo "yes" >&6; }
24298    JLINK_KEEP_PACKAGED_MODULES=true
24299  elif test "x$enable_keep_packaged_modules" = "xno"; then
24300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24301$as_echo_n "checking if packaged modules are kept... " >&6; }
24302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24303$as_echo "no" >&6; }
24304    JLINK_KEEP_PACKAGED_MODULES=false
24305  elif test "x$enable_keep_packaged_modules" = "x"; then
24306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24307$as_echo "yes (default)" >&6; }
24308    JLINK_KEEP_PACKAGED_MODULES=true
24309  else
24310    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24311  fi
24312
24313
24314
24315
24316  # Warn user that old version arguments are deprecated.
24317
24318
24319# Check whether --with-milestone was given.
24320if test "${with_milestone+set}" = set; then :
24321  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24322$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24323fi
24324
24325
24326
24327
24328# Check whether --with-update-version was given.
24329if test "${with_update_version+set}" = set; then :
24330  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24331$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24332fi
24333
24334
24335
24336
24337# Check whether --with-user-release-suffix was given.
24338if test "${with_user_release_suffix+set}" = set; then :
24339  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
24340$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24341fi
24342
24343
24344
24345
24346# Check whether --with-build-number was given.
24347if test "${with_build_number+set}" = set; then :
24348  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24349$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24350fi
24351
24352
24353
24354  # Source the version numbers file
24355  . $AUTOCONF_DIR/version-numbers
24356
24357  # Some non-version number information is set in that file
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367  # Override version from arguments
24368
24369  # If --with-version-string is set, process it first. It is possible to
24370  # override parts with more specific flags, since these are processed later.
24371
24372# Check whether --with-version-string was given.
24373if test "${with_version_string+set}" = set; then :
24374  withval=$with_version_string;
24375fi
24376
24377  if test "x$with_version_string" = xyes; then
24378    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24379  elif test "x$with_version_string" != x; then
24380    # Additional [] needed to keep m4 from mangling shell constructs.
24381    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24382      VERSION_MAJOR=${BASH_REMATCH[1]}
24383      VERSION_MINOR=${BASH_REMATCH[3]}
24384      VERSION_SECURITY=${BASH_REMATCH[5]}
24385      VERSION_PATCH=${BASH_REMATCH[7]}
24386      VERSION_PRE=${BASH_REMATCH[9]}
24387      version_plus_separator=${BASH_REMATCH[11]}
24388      VERSION_BUILD=${BASH_REMATCH[12]}
24389      VERSION_OPT=${BASH_REMATCH[14]}
24390      # Unspecified numerical fields are interpreted as 0.
24391      if test "x$VERSION_MINOR" = x; then
24392        VERSION_MINOR=0
24393      fi
24394      if test "x$VERSION_SECURITY" = x; then
24395        VERSION_SECURITY=0
24396      fi
24397      if test "x$VERSION_PATCH" = x; then
24398        VERSION_PATCH=0
24399      fi
24400      if test "x$version_plus_separator" != x \
24401          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24402        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24403      fi
24404      # Stop the version part process from setting default values.
24405      # We still allow them to explicitely override though.
24406      NO_DEFAULT_VERSION_PARTS=true
24407    else
24408      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24409    fi
24410  fi
24411
24412
24413# Check whether --with-version-pre was given.
24414if test "${with_version_pre+set}" = set; then :
24415  withval=$with_version_pre; with_version_pre_present=true
24416else
24417  with_version_pre_present=false
24418fi
24419
24420
24421  if test "x$with_version_pre_present" = xtrue; then
24422    if test "x$with_version_pre" = xyes; then
24423      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24424    elif test "x$with_version_pre" = xno; then
24425      # Interpret --without-* as empty string instead of the literal "no"
24426      VERSION_PRE=
24427    else
24428      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24429       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24430      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24432$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24433      fi
24434    fi
24435  else
24436    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24437      # Default is to use "internal" as pre
24438      VERSION_PRE="internal"
24439    fi
24440  fi
24441
24442
24443# Check whether --with-version-opt was given.
24444if test "${with_version_opt+set}" = set; then :
24445  withval=$with_version_opt; with_version_opt_present=true
24446else
24447  with_version_opt_present=false
24448fi
24449
24450
24451  if test "x$with_version_opt_present" = xtrue; then
24452    if test "x$with_version_opt" = xyes; then
24453      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24454    elif test "x$with_version_opt" = xno; then
24455      # Interpret --without-* as empty string instead of the literal "no"
24456      VERSION_OPT=
24457    else
24458      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24459       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24460      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24462$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24463      fi
24464    fi
24465  else
24466    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24467      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24468      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24469      # Outer [ ] to quote m4.
24470       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24471      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24472    fi
24473  fi
24474
24475
24476# Check whether --with-version-build was given.
24477if test "${with_version_build+set}" = set; then :
24478  withval=$with_version_build; with_version_build_present=true
24479else
24480  with_version_build_present=false
24481fi
24482
24483
24484  if test "x$with_version_build_present" = xtrue; then
24485    if test "x$with_version_build" = xyes; then
24486      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24487    elif test "x$with_version_build" = xno; then
24488      # Interpret --without-* as empty string instead of the literal "no"
24489      VERSION_BUILD=
24490    elif test "x$with_version_build" = x; then
24491      VERSION_BUILD=
24492    else
24493
24494  # Additional [] needed to keep m4 from mangling shell constructs.
24495  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24496    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24497  fi
24498  # Extract the version number without leading zeros.
24499  cleaned_value=${BASH_REMATCH[1]}
24500  if test "x$cleaned_value" = x; then
24501    # Special case for zero
24502    cleaned_value=${BASH_REMATCH[2]}
24503  fi
24504
24505  if test $cleaned_value -gt 255; then
24506    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24507  fi
24508  if test "x$cleaned_value" != "x$with_version_build"; then
24509    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24510$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24511  fi
24512  VERSION_BUILD=$cleaned_value
24513
24514    fi
24515  else
24516    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24517      # Default is to not have a build number.
24518      VERSION_BUILD=""
24519      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24520      VERSION_BUILD=0
24521    fi
24522  fi
24523
24524
24525# Check whether --with-version-major was given.
24526if test "${with_version_major+set}" = set; then :
24527  withval=$with_version_major; with_version_major_present=true
24528else
24529  with_version_major_present=false
24530fi
24531
24532
24533  if test "x$with_version_major_present" = xtrue; then
24534    if test "x$with_version_major" = xyes; then
24535      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24536    else
24537
24538  # Additional [] needed to keep m4 from mangling shell constructs.
24539  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24540    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24541  fi
24542  # Extract the version number without leading zeros.
24543  cleaned_value=${BASH_REMATCH[1]}
24544  if test "x$cleaned_value" = x; then
24545    # Special case for zero
24546    cleaned_value=${BASH_REMATCH[2]}
24547  fi
24548
24549  if test $cleaned_value -gt 255; then
24550    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24551  fi
24552  if test "x$cleaned_value" != "x$with_version_major"; then
24553    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24554$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24555  fi
24556  VERSION_MAJOR=$cleaned_value
24557
24558    fi
24559  else
24560    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24561      # Default is to get value from version-numbers
24562      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24563    fi
24564  fi
24565
24566
24567# Check whether --with-version-minor was given.
24568if test "${with_version_minor+set}" = set; then :
24569  withval=$with_version_minor; with_version_minor_present=true
24570else
24571  with_version_minor_present=false
24572fi
24573
24574
24575  if test "x$with_version_minor_present" = xtrue; then
24576    if test "x$with_version_minor" = xyes; then
24577      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24578    elif test "x$with_version_minor" = xno; then
24579      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24580      VERSION_MINOR=0
24581    elif test "x$with_version_minor" = x; then
24582      VERSION_MINOR=0
24583    else
24584
24585  # Additional [] needed to keep m4 from mangling shell constructs.
24586  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24587    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24588  fi
24589  # Extract the version number without leading zeros.
24590  cleaned_value=${BASH_REMATCH[1]}
24591  if test "x$cleaned_value" = x; then
24592    # Special case for zero
24593    cleaned_value=${BASH_REMATCH[2]}
24594  fi
24595
24596  if test $cleaned_value -gt 255; then
24597    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24598  fi
24599  if test "x$cleaned_value" != "x$with_version_minor"; then
24600    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24601$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24602  fi
24603  VERSION_MINOR=$cleaned_value
24604
24605    fi
24606  else
24607    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24608      # Default is 0, if unspecified
24609      VERSION_MINOR=0
24610    fi
24611  fi
24612
24613
24614# Check whether --with-version-security was given.
24615if test "${with_version_security+set}" = set; then :
24616  withval=$with_version_security; with_version_security_present=true
24617else
24618  with_version_security_present=false
24619fi
24620
24621
24622  if test "x$with_version_security_present" = xtrue; then
24623    if test "x$with_version_security" = xyes; then
24624      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24625    elif test "x$with_version_security" = xno; then
24626      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24627      VERSION_SECURITY=0
24628    elif test "x$with_version_security" = x; then
24629      VERSION_SECURITY=0
24630    else
24631
24632  # Additional [] needed to keep m4 from mangling shell constructs.
24633  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24634    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24635  fi
24636  # Extract the version number without leading zeros.
24637  cleaned_value=${BASH_REMATCH[1]}
24638  if test "x$cleaned_value" = x; then
24639    # Special case for zero
24640    cleaned_value=${BASH_REMATCH[2]}
24641  fi
24642
24643  if test $cleaned_value -gt 255; then
24644    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24645  fi
24646  if test "x$cleaned_value" != "x$with_version_security"; then
24647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24648$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24649  fi
24650  VERSION_SECURITY=$cleaned_value
24651
24652    fi
24653  else
24654    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24655      # Default is 0, if unspecified
24656      VERSION_SECURITY=0
24657    fi
24658  fi
24659
24660
24661# Check whether --with-version-patch was given.
24662if test "${with_version_patch+set}" = set; then :
24663  withval=$with_version_patch; with_version_patch_present=true
24664else
24665  with_version_patch_present=false
24666fi
24667
24668
24669  if test "x$with_version_patch_present" = xtrue; then
24670    if test "x$with_version_patch" = xyes; then
24671      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24672    elif test "x$with_version_patch" = xno; then
24673      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24674      VERSION_PATCH=0
24675    elif test "x$with_version_patch" = x; then
24676      VERSION_PATCH=0
24677    else
24678
24679  # Additional [] needed to keep m4 from mangling shell constructs.
24680  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24681    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24682  fi
24683  # Extract the version number without leading zeros.
24684  cleaned_value=${BASH_REMATCH[1]}
24685  if test "x$cleaned_value" = x; then
24686    # Special case for zero
24687    cleaned_value=${BASH_REMATCH[2]}
24688  fi
24689
24690  if test $cleaned_value -gt 255; then
24691    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24692  fi
24693  if test "x$cleaned_value" != "x$with_version_patch"; then
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24695$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24696  fi
24697  VERSION_PATCH=$cleaned_value
24698
24699    fi
24700  else
24701    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24702      # Default is 0, if unspecified
24703      VERSION_PATCH=0
24704    fi
24705  fi
24706
24707  # Calculate derived version properties
24708
24709  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24710  if test "x$VERSION_PRE" = x; then
24711    VERSION_IS_GA=true
24712  else
24713    VERSION_IS_GA=false
24714  fi
24715
24716  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24717  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24718
24719  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24720  # Strip trailing zeroes from stripped_version_number
24721  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24722  VERSION_NUMBER=$stripped_version_number
24723
24724  # The complete version string, with additional build information
24725  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24726    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24727  else
24728    # If either build or opt is set, we need a + separator
24729    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24730  fi
24731
24732  # The short version string, just VERSION_NUMBER and PRE, if present.
24733  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24734
24735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24736$as_echo_n "checking for version string... " >&6; }
24737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24738$as_echo "$VERSION_STRING" >&6; }
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754###############################################################################
24755#
24756# Setup BootJDK, used to bootstrap the build.
24757#
24758###############################################################################
24759
24760
24761  BOOT_JDK_FOUND=no
24762
24763# Check whether --with-boot-jdk was given.
24764if test "${with_boot_jdk+set}" = set; then :
24765  withval=$with_boot_jdk;
24766fi
24767
24768
24769  # We look for the Boot JDK through various means, going from more certain to
24770  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24771  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24772  # must check if this is indeed valid; otherwise we'll continue looking.
24773
24774  # Test: Is bootjdk explicitely set by command line arguments?
24775
24776  if test "x$BOOT_JDK_FOUND" = xno; then
24777    # Now execute the test
24778
24779  if test "x$with_boot_jdk" != x; then
24780    BOOT_JDK=$with_boot_jdk
24781    BOOT_JDK_FOUND=maybe
24782    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24783$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24784  fi
24785
24786
24787    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24788    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24789      # Do we have a bin/java?
24790      if test ! -x "$BOOT_JDK/bin/java"; then
24791        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24793        BOOT_JDK_FOUND=no
24794      else
24795        # Do we have a bin/javac?
24796        if test ! -x "$BOOT_JDK/bin/javac"; then
24797          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24799          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24800$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24801          BOOT_JDK_FOUND=no
24802        else
24803          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24804          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24805
24806          # Extra M4 quote needed to protect [] in grep expression.
24807          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24808          if test "x$FOUND_CORRECT_VERSION" = x; then
24809            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24811            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24812$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24813            BOOT_JDK_FOUND=no
24814          else
24815            # We're done! :-)
24816            BOOT_JDK_FOUND=yes
24817
24818  # Only process if variable expands to non-empty
24819
24820  if test "x$BOOT_JDK" != x; then
24821    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24822
24823  # Input might be given as Windows format, start by converting to
24824  # unix format.
24825  path="$BOOT_JDK"
24826  new_path=`$CYGPATH -u "$path"`
24827
24828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24831  # "foo.exe" is OK but "foo" is an error.
24832  #
24833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24834  # It is also a way to make sure we got the proper file name for the real test later on.
24835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24836  if test "x$test_shortpath" = x; then
24837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24839    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24840  fi
24841
24842  # Call helper function which possibly converts this using DOS-style short mode.
24843  # If so, the updated path is stored in $new_path.
24844
24845  input_path="$new_path"
24846  # Check if we need to convert this using DOS-style short mode. If the path
24847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24848  # take no chances and rewrite it.
24849  # Note: m4 eats our [], so we need to use [ and ] instead.
24850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24851  if test "x$has_forbidden_chars" != x; then
24852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24856      # Going to short mode and back again did indeed matter. Since short mode is
24857      # case insensitive, let's make it lowercase to improve readability.
24858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24859      # Now convert it back to Unix-style (cygpath)
24860      input_path=`$CYGPATH -u "$shortmode_path"`
24861      new_path="$input_path"
24862    fi
24863  fi
24864
24865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24866  if test "x$test_cygdrive_prefix" = x; then
24867    # As a simple fix, exclude /usr/bin since it's not a real path.
24868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24870      # a path prefixed by /cygdrive for fixpath to work.
24871      new_path="$CYGWIN_ROOT_PATH$input_path"
24872    fi
24873  fi
24874
24875
24876  if test "x$path" != "x$new_path"; then
24877    BOOT_JDK="$new_path"
24878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24879$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24880  fi
24881
24882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24883
24884  path="$BOOT_JDK"
24885  has_colon=`$ECHO $path | $GREP ^.:`
24886  new_path="$path"
24887  if test "x$has_colon" = x; then
24888    # Not in mixed or Windows style, start by that.
24889    new_path=`cmd //c echo $path`
24890  fi
24891
24892
24893  input_path="$new_path"
24894  # Check if we need to convert this using DOS-style short mode. If the path
24895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24896  # take no chances and rewrite it.
24897  # Note: m4 eats our [], so we need to use [ and ] instead.
24898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24899  if test "x$has_forbidden_chars" != x; then
24900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24902  fi
24903
24904
24905  windows_path="$new_path"
24906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24907    unix_path=`$CYGPATH -u "$windows_path"`
24908    new_path="$unix_path"
24909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24911    new_path="$unix_path"
24912  fi
24913
24914  if test "x$path" != "x$new_path"; then
24915    BOOT_JDK="$new_path"
24916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24918  fi
24919
24920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24922
24923    else
24924      # We're on a unix platform. Hooray! :)
24925      path="$BOOT_JDK"
24926      has_space=`$ECHO "$path" | $GREP " "`
24927      if test "x$has_space" != x; then
24928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24929$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24930        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24931      fi
24932
24933      # Use eval to expand a potential ~
24934      eval path="$path"
24935      if test ! -f "$path" && test ! -d "$path"; then
24936        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24937      fi
24938
24939      if test -d "$path"; then
24940        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24941      else
24942        dir="`$DIRNAME "$path"`"
24943        base="`$BASENAME "$path"`"
24944        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24945      fi
24946    fi
24947  fi
24948
24949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24950$as_echo_n "checking for Boot JDK... " >&6; }
24951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24952$as_echo "$BOOT_JDK" >&6; }
24953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24954$as_echo_n "checking Boot JDK version... " >&6; }
24955            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24957$as_echo "$BOOT_JDK_VERSION" >&6; }
24958          fi # end check jdk version
24959        fi # end check javac
24960      fi # end check java
24961    fi # end check boot jdk found
24962  fi
24963
24964  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24965    # Having specified an argument which is incorrect will produce an instant failure;
24966    # we should not go on looking
24967    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24968  fi
24969
24970  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24971
24972  if test "x$BOOT_JDK_FOUND" = xno; then
24973    # Now execute the test
24974
24975  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24976    # First check at user selected default
24977
24978  if test "x$BOOT_JDK_FOUND" = xno; then
24979    # Now execute the test
24980
24981  if test -x /usr/libexec/java_home; then
24982    BOOT_JDK=`/usr/libexec/java_home `
24983    BOOT_JDK_FOUND=maybe
24984    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24985$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24986  fi
24987
24988
24989    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24990    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24991      # Do we have a bin/java?
24992      if test ! -x "$BOOT_JDK/bin/java"; then
24993        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24995        BOOT_JDK_FOUND=no
24996      else
24997        # Do we have a bin/javac?
24998        if test ! -x "$BOOT_JDK/bin/javac"; then
24999          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25001          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25002$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25003          BOOT_JDK_FOUND=no
25004        else
25005          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25006          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25007
25008          # Extra M4 quote needed to protect [] in grep expression.
25009          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25010          if test "x$FOUND_CORRECT_VERSION" = x; then
25011            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25013            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25014$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25015            BOOT_JDK_FOUND=no
25016          else
25017            # We're done! :-)
25018            BOOT_JDK_FOUND=yes
25019
25020  # Only process if variable expands to non-empty
25021
25022  if test "x$BOOT_JDK" != x; then
25023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25024
25025  # Input might be given as Windows format, start by converting to
25026  # unix format.
25027  path="$BOOT_JDK"
25028  new_path=`$CYGPATH -u "$path"`
25029
25030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25033  # "foo.exe" is OK but "foo" is an error.
25034  #
25035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25036  # It is also a way to make sure we got the proper file name for the real test later on.
25037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25038  if test "x$test_shortpath" = x; then
25039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25040$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25041    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25042  fi
25043
25044  # Call helper function which possibly converts this using DOS-style short mode.
25045  # If so, the updated path is stored in $new_path.
25046
25047  input_path="$new_path"
25048  # Check if we need to convert this using DOS-style short mode. If the path
25049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25050  # take no chances and rewrite it.
25051  # Note: m4 eats our [], so we need to use [ and ] instead.
25052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25053  if test "x$has_forbidden_chars" != x; then
25054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25058      # Going to short mode and back again did indeed matter. Since short mode is
25059      # case insensitive, let's make it lowercase to improve readability.
25060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25061      # Now convert it back to Unix-style (cygpath)
25062      input_path=`$CYGPATH -u "$shortmode_path"`
25063      new_path="$input_path"
25064    fi
25065  fi
25066
25067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25068  if test "x$test_cygdrive_prefix" = x; then
25069    # As a simple fix, exclude /usr/bin since it's not a real path.
25070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25072      # a path prefixed by /cygdrive for fixpath to work.
25073      new_path="$CYGWIN_ROOT_PATH$input_path"
25074    fi
25075  fi
25076
25077
25078  if test "x$path" != "x$new_path"; then
25079    BOOT_JDK="$new_path"
25080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25081$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25082  fi
25083
25084    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25085
25086  path="$BOOT_JDK"
25087  has_colon=`$ECHO $path | $GREP ^.:`
25088  new_path="$path"
25089  if test "x$has_colon" = x; then
25090    # Not in mixed or Windows style, start by that.
25091    new_path=`cmd //c echo $path`
25092  fi
25093
25094
25095  input_path="$new_path"
25096  # Check if we need to convert this using DOS-style short mode. If the path
25097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25098  # take no chances and rewrite it.
25099  # Note: m4 eats our [], so we need to use [ and ] instead.
25100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25101  if test "x$has_forbidden_chars" != x; then
25102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25104  fi
25105
25106
25107  windows_path="$new_path"
25108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25109    unix_path=`$CYGPATH -u "$windows_path"`
25110    new_path="$unix_path"
25111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25113    new_path="$unix_path"
25114  fi
25115
25116  if test "x$path" != "x$new_path"; then
25117    BOOT_JDK="$new_path"
25118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25119$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25120  fi
25121
25122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25124
25125    else
25126      # We're on a unix platform. Hooray! :)
25127      path="$BOOT_JDK"
25128      has_space=`$ECHO "$path" | $GREP " "`
25129      if test "x$has_space" != x; then
25130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25132        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25133      fi
25134
25135      # Use eval to expand a potential ~
25136      eval path="$path"
25137      if test ! -f "$path" && test ! -d "$path"; then
25138        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25139      fi
25140
25141      if test -d "$path"; then
25142        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25143      else
25144        dir="`$DIRNAME "$path"`"
25145        base="`$BASENAME "$path"`"
25146        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25147      fi
25148    fi
25149  fi
25150
25151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25152$as_echo_n "checking for Boot JDK... " >&6; }
25153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25154$as_echo "$BOOT_JDK" >&6; }
25155            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25156$as_echo_n "checking Boot JDK version... " >&6; }
25157            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25159$as_echo "$BOOT_JDK_VERSION" >&6; }
25160          fi # end check jdk version
25161        fi # end check javac
25162      fi # end check java
25163    fi # end check boot jdk found
25164  fi
25165
25166    # If that did not work out (e.g. too old), try explicit versions instead
25167
25168  if test "x$BOOT_JDK_FOUND" = xno; then
25169    # Now execute the test
25170
25171  if test -x /usr/libexec/java_home; then
25172    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25173    BOOT_JDK_FOUND=maybe
25174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25175$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25176  fi
25177
25178
25179    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25180    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25181      # Do we have a bin/java?
25182      if test ! -x "$BOOT_JDK/bin/java"; then
25183        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25185        BOOT_JDK_FOUND=no
25186      else
25187        # Do we have a bin/javac?
25188        if test ! -x "$BOOT_JDK/bin/javac"; then
25189          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25191          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25192$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25193          BOOT_JDK_FOUND=no
25194        else
25195          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25196          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25197
25198          # Extra M4 quote needed to protect [] in grep expression.
25199          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25200          if test "x$FOUND_CORRECT_VERSION" = x; then
25201            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25203            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25204$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25205            BOOT_JDK_FOUND=no
25206          else
25207            # We're done! :-)
25208            BOOT_JDK_FOUND=yes
25209
25210  # Only process if variable expands to non-empty
25211
25212  if test "x$BOOT_JDK" != x; then
25213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25214
25215  # Input might be given as Windows format, start by converting to
25216  # unix format.
25217  path="$BOOT_JDK"
25218  new_path=`$CYGPATH -u "$path"`
25219
25220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25223  # "foo.exe" is OK but "foo" is an error.
25224  #
25225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25226  # It is also a way to make sure we got the proper file name for the real test later on.
25227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25228  if test "x$test_shortpath" = x; then
25229    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25231    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25232  fi
25233
25234  # Call helper function which possibly converts this using DOS-style short mode.
25235  # If so, the updated path is stored in $new_path.
25236
25237  input_path="$new_path"
25238  # Check if we need to convert this using DOS-style short mode. If the path
25239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25240  # take no chances and rewrite it.
25241  # Note: m4 eats our [], so we need to use [ and ] instead.
25242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25243  if test "x$has_forbidden_chars" != x; then
25244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25248      # Going to short mode and back again did indeed matter. Since short mode is
25249      # case insensitive, let's make it lowercase to improve readability.
25250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25251      # Now convert it back to Unix-style (cygpath)
25252      input_path=`$CYGPATH -u "$shortmode_path"`
25253      new_path="$input_path"
25254    fi
25255  fi
25256
25257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25258  if test "x$test_cygdrive_prefix" = x; then
25259    # As a simple fix, exclude /usr/bin since it's not a real path.
25260    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25262      # a path prefixed by /cygdrive for fixpath to work.
25263      new_path="$CYGWIN_ROOT_PATH$input_path"
25264    fi
25265  fi
25266
25267
25268  if test "x$path" != "x$new_path"; then
25269    BOOT_JDK="$new_path"
25270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25272  fi
25273
25274    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25275
25276  path="$BOOT_JDK"
25277  has_colon=`$ECHO $path | $GREP ^.:`
25278  new_path="$path"
25279  if test "x$has_colon" = x; then
25280    # Not in mixed or Windows style, start by that.
25281    new_path=`cmd //c echo $path`
25282  fi
25283
25284
25285  input_path="$new_path"
25286  # Check if we need to convert this using DOS-style short mode. If the path
25287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25288  # take no chances and rewrite it.
25289  # Note: m4 eats our [], so we need to use [ and ] instead.
25290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25291  if test "x$has_forbidden_chars" != x; then
25292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25294  fi
25295
25296
25297  windows_path="$new_path"
25298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25299    unix_path=`$CYGPATH -u "$windows_path"`
25300    new_path="$unix_path"
25301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25303    new_path="$unix_path"
25304  fi
25305
25306  if test "x$path" != "x$new_path"; then
25307    BOOT_JDK="$new_path"
25308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25309$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25310  fi
25311
25312  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25313  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25314
25315    else
25316      # We're on a unix platform. Hooray! :)
25317      path="$BOOT_JDK"
25318      has_space=`$ECHO "$path" | $GREP " "`
25319      if test "x$has_space" != x; then
25320        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25322        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25323      fi
25324
25325      # Use eval to expand a potential ~
25326      eval path="$path"
25327      if test ! -f "$path" && test ! -d "$path"; then
25328        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25329      fi
25330
25331      if test -d "$path"; then
25332        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25333      else
25334        dir="`$DIRNAME "$path"`"
25335        base="`$BASENAME "$path"`"
25336        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25337      fi
25338    fi
25339  fi
25340
25341            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25342$as_echo_n "checking for Boot JDK... " >&6; }
25343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25344$as_echo "$BOOT_JDK" >&6; }
25345            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25346$as_echo_n "checking Boot JDK version... " >&6; }
25347            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25349$as_echo "$BOOT_JDK_VERSION" >&6; }
25350          fi # end check jdk version
25351        fi # end check javac
25352      fi # end check java
25353    fi # end check boot jdk found
25354  fi
25355
25356
25357  if test "x$BOOT_JDK_FOUND" = xno; then
25358    # Now execute the test
25359
25360  if test -x /usr/libexec/java_home; then
25361    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25362    BOOT_JDK_FOUND=maybe
25363    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25364$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25365  fi
25366
25367
25368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25370      # Do we have a bin/java?
25371      if test ! -x "$BOOT_JDK/bin/java"; then
25372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25374        BOOT_JDK_FOUND=no
25375      else
25376        # Do we have a bin/javac?
25377        if test ! -x "$BOOT_JDK/bin/javac"; then
25378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25382          BOOT_JDK_FOUND=no
25383        else
25384          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25385          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25386
25387          # Extra M4 quote needed to protect [] in grep expression.
25388          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25389          if test "x$FOUND_CORRECT_VERSION" = x; then
25390            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25392            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25393$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25394            BOOT_JDK_FOUND=no
25395          else
25396            # We're done! :-)
25397            BOOT_JDK_FOUND=yes
25398
25399  # Only process if variable expands to non-empty
25400
25401  if test "x$BOOT_JDK" != x; then
25402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25403
25404  # Input might be given as Windows format, start by converting to
25405  # unix format.
25406  path="$BOOT_JDK"
25407  new_path=`$CYGPATH -u "$path"`
25408
25409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25412  # "foo.exe" is OK but "foo" is an error.
25413  #
25414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25415  # It is also a way to make sure we got the proper file name for the real test later on.
25416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25417  if test "x$test_shortpath" = x; then
25418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25420    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25421  fi
25422
25423  # Call helper function which possibly converts this using DOS-style short mode.
25424  # If so, the updated path is stored in $new_path.
25425
25426  input_path="$new_path"
25427  # Check if we need to convert this using DOS-style short mode. If the path
25428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25429  # take no chances and rewrite it.
25430  # Note: m4 eats our [], so we need to use [ and ] instead.
25431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25432  if test "x$has_forbidden_chars" != x; then
25433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25437      # Going to short mode and back again did indeed matter. Since short mode is
25438      # case insensitive, let's make it lowercase to improve readability.
25439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25440      # Now convert it back to Unix-style (cygpath)
25441      input_path=`$CYGPATH -u "$shortmode_path"`
25442      new_path="$input_path"
25443    fi
25444  fi
25445
25446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25447  if test "x$test_cygdrive_prefix" = x; then
25448    # As a simple fix, exclude /usr/bin since it's not a real path.
25449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25451      # a path prefixed by /cygdrive for fixpath to work.
25452      new_path="$CYGWIN_ROOT_PATH$input_path"
25453    fi
25454  fi
25455
25456
25457  if test "x$path" != "x$new_path"; then
25458    BOOT_JDK="$new_path"
25459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25461  fi
25462
25463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25464
25465  path="$BOOT_JDK"
25466  has_colon=`$ECHO $path | $GREP ^.:`
25467  new_path="$path"
25468  if test "x$has_colon" = x; then
25469    # Not in mixed or Windows style, start by that.
25470    new_path=`cmd //c echo $path`
25471  fi
25472
25473
25474  input_path="$new_path"
25475  # Check if we need to convert this using DOS-style short mode. If the path
25476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25477  # take no chances and rewrite it.
25478  # Note: m4 eats our [], so we need to use [ and ] instead.
25479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25480  if test "x$has_forbidden_chars" != x; then
25481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25483  fi
25484
25485
25486  windows_path="$new_path"
25487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25488    unix_path=`$CYGPATH -u "$windows_path"`
25489    new_path="$unix_path"
25490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25492    new_path="$unix_path"
25493  fi
25494
25495  if test "x$path" != "x$new_path"; then
25496    BOOT_JDK="$new_path"
25497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25499  fi
25500
25501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25503
25504    else
25505      # We're on a unix platform. Hooray! :)
25506      path="$BOOT_JDK"
25507      has_space=`$ECHO "$path" | $GREP " "`
25508      if test "x$has_space" != x; then
25509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25510$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25512      fi
25513
25514      # Use eval to expand a potential ~
25515      eval path="$path"
25516      if test ! -f "$path" && test ! -d "$path"; then
25517        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25518      fi
25519
25520      if test -d "$path"; then
25521        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25522      else
25523        dir="`$DIRNAME "$path"`"
25524        base="`$BASENAME "$path"`"
25525        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25526      fi
25527    fi
25528  fi
25529
25530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25531$as_echo_n "checking for Boot JDK... " >&6; }
25532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25533$as_echo "$BOOT_JDK" >&6; }
25534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25535$as_echo_n "checking Boot JDK version... " >&6; }
25536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25538$as_echo "$BOOT_JDK_VERSION" >&6; }
25539          fi # end check jdk version
25540        fi # end check javac
25541      fi # end check java
25542    fi # end check boot jdk found
25543  fi
25544
25545
25546  if test "x$BOOT_JDK_FOUND" = xno; then
25547    # Now execute the test
25548
25549  if test -x /usr/libexec/java_home; then
25550    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25551    BOOT_JDK_FOUND=maybe
25552    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25553$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25554  fi
25555
25556
25557    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25558    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25559      # Do we have a bin/java?
25560      if test ! -x "$BOOT_JDK/bin/java"; then
25561        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25563        BOOT_JDK_FOUND=no
25564      else
25565        # Do we have a bin/javac?
25566        if test ! -x "$BOOT_JDK/bin/javac"; then
25567          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25568$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25569          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25570$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25571          BOOT_JDK_FOUND=no
25572        else
25573          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25574          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25575
25576          # Extra M4 quote needed to protect [] in grep expression.
25577          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25578          if test "x$FOUND_CORRECT_VERSION" = x; then
25579            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25581            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25582$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25583            BOOT_JDK_FOUND=no
25584          else
25585            # We're done! :-)
25586            BOOT_JDK_FOUND=yes
25587
25588  # Only process if variable expands to non-empty
25589
25590  if test "x$BOOT_JDK" != x; then
25591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25592
25593  # Input might be given as Windows format, start by converting to
25594  # unix format.
25595  path="$BOOT_JDK"
25596  new_path=`$CYGPATH -u "$path"`
25597
25598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25601  # "foo.exe" is OK but "foo" is an error.
25602  #
25603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25604  # It is also a way to make sure we got the proper file name for the real test later on.
25605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25606  if test "x$test_shortpath" = x; then
25607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25608$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25609    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25610  fi
25611
25612  # Call helper function which possibly converts this using DOS-style short mode.
25613  # If so, the updated path is stored in $new_path.
25614
25615  input_path="$new_path"
25616  # Check if we need to convert this using DOS-style short mode. If the path
25617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25618  # take no chances and rewrite it.
25619  # Note: m4 eats our [], so we need to use [ and ] instead.
25620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25621  if test "x$has_forbidden_chars" != x; then
25622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25626      # Going to short mode and back again did indeed matter. Since short mode is
25627      # case insensitive, let's make it lowercase to improve readability.
25628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25629      # Now convert it back to Unix-style (cygpath)
25630      input_path=`$CYGPATH -u "$shortmode_path"`
25631      new_path="$input_path"
25632    fi
25633  fi
25634
25635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25636  if test "x$test_cygdrive_prefix" = x; then
25637    # As a simple fix, exclude /usr/bin since it's not a real path.
25638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25640      # a path prefixed by /cygdrive for fixpath to work.
25641      new_path="$CYGWIN_ROOT_PATH$input_path"
25642    fi
25643  fi
25644
25645
25646  if test "x$path" != "x$new_path"; then
25647    BOOT_JDK="$new_path"
25648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25649$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25650  fi
25651
25652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25653
25654  path="$BOOT_JDK"
25655  has_colon=`$ECHO $path | $GREP ^.:`
25656  new_path="$path"
25657  if test "x$has_colon" = x; then
25658    # Not in mixed or Windows style, start by that.
25659    new_path=`cmd //c echo $path`
25660  fi
25661
25662
25663  input_path="$new_path"
25664  # Check if we need to convert this using DOS-style short mode. If the path
25665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25666  # take no chances and rewrite it.
25667  # Note: m4 eats our [], so we need to use [ and ] instead.
25668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25669  if test "x$has_forbidden_chars" != x; then
25670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25672  fi
25673
25674
25675  windows_path="$new_path"
25676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25677    unix_path=`$CYGPATH -u "$windows_path"`
25678    new_path="$unix_path"
25679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25681    new_path="$unix_path"
25682  fi
25683
25684  if test "x$path" != "x$new_path"; then
25685    BOOT_JDK="$new_path"
25686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25688  fi
25689
25690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25692
25693    else
25694      # We're on a unix platform. Hooray! :)
25695      path="$BOOT_JDK"
25696      has_space=`$ECHO "$path" | $GREP " "`
25697      if test "x$has_space" != x; then
25698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25700        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25701      fi
25702
25703      # Use eval to expand a potential ~
25704      eval path="$path"
25705      if test ! -f "$path" && test ! -d "$path"; then
25706        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25707      fi
25708
25709      if test -d "$path"; then
25710        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25711      else
25712        dir="`$DIRNAME "$path"`"
25713        base="`$BASENAME "$path"`"
25714        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25715      fi
25716    fi
25717  fi
25718
25719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25720$as_echo_n "checking for Boot JDK... " >&6; }
25721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25722$as_echo "$BOOT_JDK" >&6; }
25723            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25724$as_echo_n "checking Boot JDK version... " >&6; }
25725            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25727$as_echo "$BOOT_JDK_VERSION" >&6; }
25728          fi # end check jdk version
25729        fi # end check javac
25730      fi # end check java
25731    fi # end check boot jdk found
25732  fi
25733
25734  fi
25735
25736
25737    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25738    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25739      # Do we have a bin/java?
25740      if test ! -x "$BOOT_JDK/bin/java"; then
25741        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25743        BOOT_JDK_FOUND=no
25744      else
25745        # Do we have a bin/javac?
25746        if test ! -x "$BOOT_JDK/bin/javac"; then
25747          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25749          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25750$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25751          BOOT_JDK_FOUND=no
25752        else
25753          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25754          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25755
25756          # Extra M4 quote needed to protect [] in grep expression.
25757          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25758          if test "x$FOUND_CORRECT_VERSION" = x; then
25759            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25761            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25762$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25763            BOOT_JDK_FOUND=no
25764          else
25765            # We're done! :-)
25766            BOOT_JDK_FOUND=yes
25767
25768  # Only process if variable expands to non-empty
25769
25770  if test "x$BOOT_JDK" != x; then
25771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25772
25773  # Input might be given as Windows format, start by converting to
25774  # unix format.
25775  path="$BOOT_JDK"
25776  new_path=`$CYGPATH -u "$path"`
25777
25778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25781  # "foo.exe" is OK but "foo" is an error.
25782  #
25783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25784  # It is also a way to make sure we got the proper file name for the real test later on.
25785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25786  if test "x$test_shortpath" = x; then
25787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25788$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25789    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25790  fi
25791
25792  # Call helper function which possibly converts this using DOS-style short mode.
25793  # If so, the updated path is stored in $new_path.
25794
25795  input_path="$new_path"
25796  # Check if we need to convert this using DOS-style short mode. If the path
25797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25798  # take no chances and rewrite it.
25799  # Note: m4 eats our [], so we need to use [ and ] instead.
25800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25801  if test "x$has_forbidden_chars" != x; then
25802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25806      # Going to short mode and back again did indeed matter. Since short mode is
25807      # case insensitive, let's make it lowercase to improve readability.
25808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25809      # Now convert it back to Unix-style (cygpath)
25810      input_path=`$CYGPATH -u "$shortmode_path"`
25811      new_path="$input_path"
25812    fi
25813  fi
25814
25815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25816  if test "x$test_cygdrive_prefix" = x; then
25817    # As a simple fix, exclude /usr/bin since it's not a real path.
25818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25820      # a path prefixed by /cygdrive for fixpath to work.
25821      new_path="$CYGWIN_ROOT_PATH$input_path"
25822    fi
25823  fi
25824
25825
25826  if test "x$path" != "x$new_path"; then
25827    BOOT_JDK="$new_path"
25828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25829$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25830  fi
25831
25832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25833
25834  path="$BOOT_JDK"
25835  has_colon=`$ECHO $path | $GREP ^.:`
25836  new_path="$path"
25837  if test "x$has_colon" = x; then
25838    # Not in mixed or Windows style, start by that.
25839    new_path=`cmd //c echo $path`
25840  fi
25841
25842
25843  input_path="$new_path"
25844  # Check if we need to convert this using DOS-style short mode. If the path
25845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25846  # take no chances and rewrite it.
25847  # Note: m4 eats our [], so we need to use [ and ] instead.
25848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25849  if test "x$has_forbidden_chars" != x; then
25850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25852  fi
25853
25854
25855  windows_path="$new_path"
25856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25857    unix_path=`$CYGPATH -u "$windows_path"`
25858    new_path="$unix_path"
25859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25861    new_path="$unix_path"
25862  fi
25863
25864  if test "x$path" != "x$new_path"; then
25865    BOOT_JDK="$new_path"
25866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25868  fi
25869
25870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25872
25873    else
25874      # We're on a unix platform. Hooray! :)
25875      path="$BOOT_JDK"
25876      has_space=`$ECHO "$path" | $GREP " "`
25877      if test "x$has_space" != x; then
25878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25881      fi
25882
25883      # Use eval to expand a potential ~
25884      eval path="$path"
25885      if test ! -f "$path" && test ! -d "$path"; then
25886        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25887      fi
25888
25889      if test -d "$path"; then
25890        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25891      else
25892        dir="`$DIRNAME "$path"`"
25893        base="`$BASENAME "$path"`"
25894        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25895      fi
25896    fi
25897  fi
25898
25899            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25900$as_echo_n "checking for Boot JDK... " >&6; }
25901            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25902$as_echo "$BOOT_JDK" >&6; }
25903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25904$as_echo_n "checking Boot JDK version... " >&6; }
25905            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25907$as_echo "$BOOT_JDK_VERSION" >&6; }
25908          fi # end check jdk version
25909        fi # end check javac
25910      fi # end check java
25911    fi # end check boot jdk found
25912  fi
25913
25914
25915  # Test: Is $JAVA_HOME set?
25916
25917  if test "x$BOOT_JDK_FOUND" = xno; then
25918    # Now execute the test
25919
25920  if test "x$JAVA_HOME" != x; then
25921    JAVA_HOME_PROCESSED="$JAVA_HOME"
25922
25923  # Only process if variable expands to non-empty
25924
25925  if test "x$JAVA_HOME_PROCESSED" != x; then
25926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25927
25928  # Input might be given as Windows format, start by converting to
25929  # unix format.
25930  path="$JAVA_HOME_PROCESSED"
25931  new_path=`$CYGPATH -u "$path"`
25932
25933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25936  # "foo.exe" is OK but "foo" is an error.
25937  #
25938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25939  # It is also a way to make sure we got the proper file name for the real test later on.
25940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25941  if test "x$test_shortpath" = x; then
25942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25943$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25944    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25945  fi
25946
25947  # Call helper function which possibly converts this using DOS-style short mode.
25948  # If so, the updated path is stored in $new_path.
25949
25950  input_path="$new_path"
25951  # Check if we need to convert this using DOS-style short mode. If the path
25952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25953  # take no chances and rewrite it.
25954  # Note: m4 eats our [], so we need to use [ and ] instead.
25955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25956  if test "x$has_forbidden_chars" != x; then
25957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25961      # Going to short mode and back again did indeed matter. Since short mode is
25962      # case insensitive, let's make it lowercase to improve readability.
25963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25964      # Now convert it back to Unix-style (cygpath)
25965      input_path=`$CYGPATH -u "$shortmode_path"`
25966      new_path="$input_path"
25967    fi
25968  fi
25969
25970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25971  if test "x$test_cygdrive_prefix" = x; then
25972    # As a simple fix, exclude /usr/bin since it's not a real path.
25973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25975      # a path prefixed by /cygdrive for fixpath to work.
25976      new_path="$CYGWIN_ROOT_PATH$input_path"
25977    fi
25978  fi
25979
25980
25981  if test "x$path" != "x$new_path"; then
25982    JAVA_HOME_PROCESSED="$new_path"
25983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25984$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25985  fi
25986
25987    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25988
25989  path="$JAVA_HOME_PROCESSED"
25990  has_colon=`$ECHO $path | $GREP ^.:`
25991  new_path="$path"
25992  if test "x$has_colon" = x; then
25993    # Not in mixed or Windows style, start by that.
25994    new_path=`cmd //c echo $path`
25995  fi
25996
25997
25998  input_path="$new_path"
25999  # Check if we need to convert this using DOS-style short mode. If the path
26000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26001  # take no chances and rewrite it.
26002  # Note: m4 eats our [], so we need to use [ and ] instead.
26003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26004  if test "x$has_forbidden_chars" != x; then
26005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26007  fi
26008
26009
26010  windows_path="$new_path"
26011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26012    unix_path=`$CYGPATH -u "$windows_path"`
26013    new_path="$unix_path"
26014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26016    new_path="$unix_path"
26017  fi
26018
26019  if test "x$path" != "x$new_path"; then
26020    JAVA_HOME_PROCESSED="$new_path"
26021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26022$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26023  fi
26024
26025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26027
26028    else
26029      # We're on a unix platform. Hooray! :)
26030      path="$JAVA_HOME_PROCESSED"
26031      has_space=`$ECHO "$path" | $GREP " "`
26032      if test "x$has_space" != x; then
26033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26034$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26035        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26036      fi
26037
26038      # Use eval to expand a potential ~
26039      eval path="$path"
26040      if test ! -f "$path" && test ! -d "$path"; then
26041        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26042      fi
26043
26044      if test -d "$path"; then
26045        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26046      else
26047        dir="`$DIRNAME "$path"`"
26048        base="`$BASENAME "$path"`"
26049        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26050      fi
26051    fi
26052  fi
26053
26054    if test ! -d "$JAVA_HOME_PROCESSED"; then
26055      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26056$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26057    else
26058      # Aha, the user has set a JAVA_HOME
26059      # let us use that as the Boot JDK.
26060      BOOT_JDK="$JAVA_HOME_PROCESSED"
26061      BOOT_JDK_FOUND=maybe
26062      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26063$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26064    fi
26065  fi
26066
26067
26068    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26069    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26070      # Do we have a bin/java?
26071      if test ! -x "$BOOT_JDK/bin/java"; then
26072        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26074        BOOT_JDK_FOUND=no
26075      else
26076        # Do we have a bin/javac?
26077        if test ! -x "$BOOT_JDK/bin/javac"; then
26078          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26080          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26081$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26082          BOOT_JDK_FOUND=no
26083        else
26084          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26085          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26086
26087          # Extra M4 quote needed to protect [] in grep expression.
26088          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26089          if test "x$FOUND_CORRECT_VERSION" = x; then
26090            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26091$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26092            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26093$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26094            BOOT_JDK_FOUND=no
26095          else
26096            # We're done! :-)
26097            BOOT_JDK_FOUND=yes
26098
26099  # Only process if variable expands to non-empty
26100
26101  if test "x$BOOT_JDK" != x; then
26102    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26103
26104  # Input might be given as Windows format, start by converting to
26105  # unix format.
26106  path="$BOOT_JDK"
26107  new_path=`$CYGPATH -u "$path"`
26108
26109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26112  # "foo.exe" is OK but "foo" is an error.
26113  #
26114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26115  # It is also a way to make sure we got the proper file name for the real test later on.
26116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26117  if test "x$test_shortpath" = x; then
26118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26120    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26121  fi
26122
26123  # Call helper function which possibly converts this using DOS-style short mode.
26124  # If so, the updated path is stored in $new_path.
26125
26126  input_path="$new_path"
26127  # Check if we need to convert this using DOS-style short mode. If the path
26128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26129  # take no chances and rewrite it.
26130  # Note: m4 eats our [], so we need to use [ and ] instead.
26131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26132  if test "x$has_forbidden_chars" != x; then
26133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26137      # Going to short mode and back again did indeed matter. Since short mode is
26138      # case insensitive, let's make it lowercase to improve readability.
26139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26140      # Now convert it back to Unix-style (cygpath)
26141      input_path=`$CYGPATH -u "$shortmode_path"`
26142      new_path="$input_path"
26143    fi
26144  fi
26145
26146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26147  if test "x$test_cygdrive_prefix" = x; then
26148    # As a simple fix, exclude /usr/bin since it's not a real path.
26149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26151      # a path prefixed by /cygdrive for fixpath to work.
26152      new_path="$CYGWIN_ROOT_PATH$input_path"
26153    fi
26154  fi
26155
26156
26157  if test "x$path" != "x$new_path"; then
26158    BOOT_JDK="$new_path"
26159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26161  fi
26162
26163    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26164
26165  path="$BOOT_JDK"
26166  has_colon=`$ECHO $path | $GREP ^.:`
26167  new_path="$path"
26168  if test "x$has_colon" = x; then
26169    # Not in mixed or Windows style, start by that.
26170    new_path=`cmd //c echo $path`
26171  fi
26172
26173
26174  input_path="$new_path"
26175  # Check if we need to convert this using DOS-style short mode. If the path
26176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26177  # take no chances and rewrite it.
26178  # Note: m4 eats our [], so we need to use [ and ] instead.
26179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26180  if test "x$has_forbidden_chars" != x; then
26181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26183  fi
26184
26185
26186  windows_path="$new_path"
26187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26188    unix_path=`$CYGPATH -u "$windows_path"`
26189    new_path="$unix_path"
26190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26192    new_path="$unix_path"
26193  fi
26194
26195  if test "x$path" != "x$new_path"; then
26196    BOOT_JDK="$new_path"
26197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26198$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26199  fi
26200
26201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26203
26204    else
26205      # We're on a unix platform. Hooray! :)
26206      path="$BOOT_JDK"
26207      has_space=`$ECHO "$path" | $GREP " "`
26208      if test "x$has_space" != x; then
26209        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26211        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26212      fi
26213
26214      # Use eval to expand a potential ~
26215      eval path="$path"
26216      if test ! -f "$path" && test ! -d "$path"; then
26217        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26218      fi
26219
26220      if test -d "$path"; then
26221        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26222      else
26223        dir="`$DIRNAME "$path"`"
26224        base="`$BASENAME "$path"`"
26225        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26226      fi
26227    fi
26228  fi
26229
26230            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26231$as_echo_n "checking for Boot JDK... " >&6; }
26232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26233$as_echo "$BOOT_JDK" >&6; }
26234            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26235$as_echo_n "checking Boot JDK version... " >&6; }
26236            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26238$as_echo "$BOOT_JDK_VERSION" >&6; }
26239          fi # end check jdk version
26240        fi # end check javac
26241      fi # end check java
26242    fi # end check boot jdk found
26243  fi
26244
26245
26246  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26247
26248  if test "x$BOOT_JDK_FOUND" = xno; then
26249    # Now execute the test
26250
26251  # Extract the first word of "javac", so it can be a program name with args.
26252set dummy javac; ac_word=$2
26253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26254$as_echo_n "checking for $ac_word... " >&6; }
26255if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26256  $as_echo_n "(cached) " >&6
26257else
26258  case $JAVAC_CHECK in
26259  [\\/]* | ?:[\\/]*)
26260  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26261  ;;
26262  *)
26263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26264for as_dir in $PATH
26265do
26266  IFS=$as_save_IFS
26267  test -z "$as_dir" && as_dir=.
26268    for ac_exec_ext in '' $ac_executable_extensions; do
26269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26270    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26272    break 2
26273  fi
26274done
26275  done
26276IFS=$as_save_IFS
26277
26278  ;;
26279esac
26280fi
26281JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26282if test -n "$JAVAC_CHECK"; then
26283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26284$as_echo "$JAVAC_CHECK" >&6; }
26285else
26286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26287$as_echo "no" >&6; }
26288fi
26289
26290
26291  # Extract the first word of "java", so it can be a program name with args.
26292set dummy java; ac_word=$2
26293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26294$as_echo_n "checking for $ac_word... " >&6; }
26295if ${ac_cv_path_JAVA_CHECK+:} false; then :
26296  $as_echo_n "(cached) " >&6
26297else
26298  case $JAVA_CHECK in
26299  [\\/]* | ?:[\\/]*)
26300  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26301  ;;
26302  *)
26303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26304for as_dir in $PATH
26305do
26306  IFS=$as_save_IFS
26307  test -z "$as_dir" && as_dir=.
26308    for ac_exec_ext in '' $ac_executable_extensions; do
26309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26310    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26312    break 2
26313  fi
26314done
26315  done
26316IFS=$as_save_IFS
26317
26318  ;;
26319esac
26320fi
26321JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26322if test -n "$JAVA_CHECK"; then
26323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26324$as_echo "$JAVA_CHECK" >&6; }
26325else
26326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26327$as_echo "no" >&6; }
26328fi
26329
26330
26331  BINARY="$JAVAC_CHECK"
26332  if test "x$JAVAC_CHECK" = x; then
26333    BINARY="$JAVA_CHECK"
26334  fi
26335  if test "x$BINARY" != x; then
26336    # So there is a java(c) binary, it might be part of a JDK.
26337    # Lets find the JDK/JRE directory by following symbolic links.
26338    # Linux/GNU systems often have links from /usr/bin/java to
26339    # /etc/alternatives/java to the real JDK binary.
26340
26341  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26342    # Follow a chain of symbolic links. Use readlink
26343    # where it exists, else fall back to horribly
26344    # complicated shell code.
26345    if test "x$READLINK_TESTED" != yes; then
26346      # On MacOSX there is a readlink tool with a different
26347      # purpose than the GNU readlink tool. Check the found readlink.
26348      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26349      if test "x$ISGNU" = x; then
26350        # A readlink that we do not know how to use.
26351        # Are there other non-GNU readlinks out there?
26352        READLINK_TESTED=yes
26353        READLINK=
26354      fi
26355    fi
26356
26357    if test "x$READLINK" != x; then
26358      BINARY=`$READLINK -f $BINARY`
26359    else
26360      # Save the current directory for restoring afterwards
26361      STARTDIR=$PWD
26362      COUNTER=0
26363      sym_link_dir=`$DIRNAME $BINARY`
26364      sym_link_file=`$BASENAME $BINARY`
26365      cd $sym_link_dir
26366      # Use -P flag to resolve symlinks in directories.
26367      cd `$THEPWDCMD -P`
26368      sym_link_dir=`$THEPWDCMD -P`
26369      # Resolve file symlinks
26370      while test $COUNTER -lt 20; do
26371        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26372        if test "x$ISLINK" == x; then
26373          # This is not a symbolic link! We are done!
26374          break
26375        fi
26376        # Again resolve directory symlinks since the target of the just found
26377        # link could be in a different directory
26378        cd `$DIRNAME $ISLINK`
26379        sym_link_dir=`$THEPWDCMD -P`
26380        sym_link_file=`$BASENAME $ISLINK`
26381        let COUNTER=COUNTER+1
26382      done
26383      cd $STARTDIR
26384      BINARY=$sym_link_dir/$sym_link_file
26385    fi
26386  fi
26387
26388    BOOT_JDK=`dirname "$BINARY"`
26389    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26390    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26391      # Looks like we found ourselves an JDK
26392      BOOT_JDK_FOUND=maybe
26393      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26394$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26395    fi
26396  fi
26397
26398
26399    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26400    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26401      # Do we have a bin/java?
26402      if test ! -x "$BOOT_JDK/bin/java"; then
26403        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26405        BOOT_JDK_FOUND=no
26406      else
26407        # Do we have a bin/javac?
26408        if test ! -x "$BOOT_JDK/bin/javac"; then
26409          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26411          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26412$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26413          BOOT_JDK_FOUND=no
26414        else
26415          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26416          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26417
26418          # Extra M4 quote needed to protect [] in grep expression.
26419          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26420          if test "x$FOUND_CORRECT_VERSION" = x; then
26421            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26423            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26424$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26425            BOOT_JDK_FOUND=no
26426          else
26427            # We're done! :-)
26428            BOOT_JDK_FOUND=yes
26429
26430  # Only process if variable expands to non-empty
26431
26432  if test "x$BOOT_JDK" != x; then
26433    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26434
26435  # Input might be given as Windows format, start by converting to
26436  # unix format.
26437  path="$BOOT_JDK"
26438  new_path=`$CYGPATH -u "$path"`
26439
26440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26443  # "foo.exe" is OK but "foo" is an error.
26444  #
26445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26446  # It is also a way to make sure we got the proper file name for the real test later on.
26447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26448  if test "x$test_shortpath" = x; then
26449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26451    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26452  fi
26453
26454  # Call helper function which possibly converts this using DOS-style short mode.
26455  # If so, the updated path is stored in $new_path.
26456
26457  input_path="$new_path"
26458  # Check if we need to convert this using DOS-style short mode. If the path
26459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26460  # take no chances and rewrite it.
26461  # Note: m4 eats our [], so we need to use [ and ] instead.
26462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26463  if test "x$has_forbidden_chars" != x; then
26464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26468      # Going to short mode and back again did indeed matter. Since short mode is
26469      # case insensitive, let's make it lowercase to improve readability.
26470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26471      # Now convert it back to Unix-style (cygpath)
26472      input_path=`$CYGPATH -u "$shortmode_path"`
26473      new_path="$input_path"
26474    fi
26475  fi
26476
26477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26478  if test "x$test_cygdrive_prefix" = x; then
26479    # As a simple fix, exclude /usr/bin since it's not a real path.
26480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26482      # a path prefixed by /cygdrive for fixpath to work.
26483      new_path="$CYGWIN_ROOT_PATH$input_path"
26484    fi
26485  fi
26486
26487
26488  if test "x$path" != "x$new_path"; then
26489    BOOT_JDK="$new_path"
26490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26492  fi
26493
26494    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26495
26496  path="$BOOT_JDK"
26497  has_colon=`$ECHO $path | $GREP ^.:`
26498  new_path="$path"
26499  if test "x$has_colon" = x; then
26500    # Not in mixed or Windows style, start by that.
26501    new_path=`cmd //c echo $path`
26502  fi
26503
26504
26505  input_path="$new_path"
26506  # Check if we need to convert this using DOS-style short mode. If the path
26507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26508  # take no chances and rewrite it.
26509  # Note: m4 eats our [], so we need to use [ and ] instead.
26510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26511  if test "x$has_forbidden_chars" != x; then
26512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26514  fi
26515
26516
26517  windows_path="$new_path"
26518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26519    unix_path=`$CYGPATH -u "$windows_path"`
26520    new_path="$unix_path"
26521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26523    new_path="$unix_path"
26524  fi
26525
26526  if test "x$path" != "x$new_path"; then
26527    BOOT_JDK="$new_path"
26528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26530  fi
26531
26532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26534
26535    else
26536      # We're on a unix platform. Hooray! :)
26537      path="$BOOT_JDK"
26538      has_space=`$ECHO "$path" | $GREP " "`
26539      if test "x$has_space" != x; then
26540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26542        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26543      fi
26544
26545      # Use eval to expand a potential ~
26546      eval path="$path"
26547      if test ! -f "$path" && test ! -d "$path"; then
26548        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26549      fi
26550
26551      if test -d "$path"; then
26552        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26553      else
26554        dir="`$DIRNAME "$path"`"
26555        base="`$BASENAME "$path"`"
26556        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26557      fi
26558    fi
26559  fi
26560
26561            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26562$as_echo_n "checking for Boot JDK... " >&6; }
26563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26564$as_echo "$BOOT_JDK" >&6; }
26565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26566$as_echo_n "checking Boot JDK version... " >&6; }
26567            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26569$as_echo "$BOOT_JDK_VERSION" >&6; }
26570          fi # end check jdk version
26571        fi # end check javac
26572      fi # end check java
26573    fi # end check boot jdk found
26574  fi
26575
26576
26577  # Test: Is there a JDK installed in default, well-known locations?
26578
26579  if test "x$BOOT_JDK_FOUND" = xno; then
26580    # Now execute the test
26581
26582  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26583
26584  if test "x$BOOT_JDK_FOUND" = xno; then
26585    # Now execute the test
26586
26587  if test "x$ProgramW6432" != x; then
26588    VIRTUAL_DIR="$ProgramW6432/Java"
26589
26590  windows_path="$VIRTUAL_DIR"
26591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26592    unix_path=`$CYGPATH -u "$windows_path"`
26593    VIRTUAL_DIR="$unix_path"
26594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26596    VIRTUAL_DIR="$unix_path"
26597  fi
26598
26599
26600  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26601  BOOT_JDK_SUFFIX=""
26602  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26603  if test "x$ALL_JDKS_FOUND" != x; then
26604    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26605
26606  if test "x$BOOT_JDK_FOUND" = xno; then
26607    # Now execute the test
26608
26609        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26610        if test -d "$BOOT_JDK"; then
26611          BOOT_JDK_FOUND=maybe
26612          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26613$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26614        fi
26615
26616
26617    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26618    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26619      # Do we have a bin/java?
26620      if test ! -x "$BOOT_JDK/bin/java"; then
26621        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26623        BOOT_JDK_FOUND=no
26624      else
26625        # Do we have a bin/javac?
26626        if test ! -x "$BOOT_JDK/bin/javac"; then
26627          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26629          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26630$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26631          BOOT_JDK_FOUND=no
26632        else
26633          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26634          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26635
26636          # Extra M4 quote needed to protect [] in grep expression.
26637          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26638          if test "x$FOUND_CORRECT_VERSION" = x; then
26639            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26641            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26642$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26643            BOOT_JDK_FOUND=no
26644          else
26645            # We're done! :-)
26646            BOOT_JDK_FOUND=yes
26647
26648  # Only process if variable expands to non-empty
26649
26650  if test "x$BOOT_JDK" != x; then
26651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26652
26653  # Input might be given as Windows format, start by converting to
26654  # unix format.
26655  path="$BOOT_JDK"
26656  new_path=`$CYGPATH -u "$path"`
26657
26658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26661  # "foo.exe" is OK but "foo" is an error.
26662  #
26663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26664  # It is also a way to make sure we got the proper file name for the real test later on.
26665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26666  if test "x$test_shortpath" = x; then
26667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26668$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26669    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26670  fi
26671
26672  # Call helper function which possibly converts this using DOS-style short mode.
26673  # If so, the updated path is stored in $new_path.
26674
26675  input_path="$new_path"
26676  # Check if we need to convert this using DOS-style short mode. If the path
26677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26678  # take no chances and rewrite it.
26679  # Note: m4 eats our [], so we need to use [ and ] instead.
26680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26681  if test "x$has_forbidden_chars" != x; then
26682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26686      # Going to short mode and back again did indeed matter. Since short mode is
26687      # case insensitive, let's make it lowercase to improve readability.
26688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26689      # Now convert it back to Unix-style (cygpath)
26690      input_path=`$CYGPATH -u "$shortmode_path"`
26691      new_path="$input_path"
26692    fi
26693  fi
26694
26695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26696  if test "x$test_cygdrive_prefix" = x; then
26697    # As a simple fix, exclude /usr/bin since it's not a real path.
26698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26700      # a path prefixed by /cygdrive for fixpath to work.
26701      new_path="$CYGWIN_ROOT_PATH$input_path"
26702    fi
26703  fi
26704
26705
26706  if test "x$path" != "x$new_path"; then
26707    BOOT_JDK="$new_path"
26708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26710  fi
26711
26712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26713
26714  path="$BOOT_JDK"
26715  has_colon=`$ECHO $path | $GREP ^.:`
26716  new_path="$path"
26717  if test "x$has_colon" = x; then
26718    # Not in mixed or Windows style, start by that.
26719    new_path=`cmd //c echo $path`
26720  fi
26721
26722
26723  input_path="$new_path"
26724  # Check if we need to convert this using DOS-style short mode. If the path
26725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26726  # take no chances and rewrite it.
26727  # Note: m4 eats our [], so we need to use [ and ] instead.
26728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26729  if test "x$has_forbidden_chars" != x; then
26730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26732  fi
26733
26734
26735  windows_path="$new_path"
26736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26737    unix_path=`$CYGPATH -u "$windows_path"`
26738    new_path="$unix_path"
26739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26741    new_path="$unix_path"
26742  fi
26743
26744  if test "x$path" != "x$new_path"; then
26745    BOOT_JDK="$new_path"
26746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26747$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26748  fi
26749
26750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26752
26753    else
26754      # We're on a unix platform. Hooray! :)
26755      path="$BOOT_JDK"
26756      has_space=`$ECHO "$path" | $GREP " "`
26757      if test "x$has_space" != x; then
26758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26761      fi
26762
26763      # Use eval to expand a potential ~
26764      eval path="$path"
26765      if test ! -f "$path" && test ! -d "$path"; then
26766        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26767      fi
26768
26769      if test -d "$path"; then
26770        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26771      else
26772        dir="`$DIRNAME "$path"`"
26773        base="`$BASENAME "$path"`"
26774        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26775      fi
26776    fi
26777  fi
26778
26779            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26780$as_echo_n "checking for Boot JDK... " >&6; }
26781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26782$as_echo "$BOOT_JDK" >&6; }
26783            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26784$as_echo_n "checking Boot JDK version... " >&6; }
26785            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26787$as_echo "$BOOT_JDK_VERSION" >&6; }
26788          fi # end check jdk version
26789        fi # end check javac
26790      fi # end check java
26791    fi # end check boot jdk found
26792  fi
26793
26794    done
26795  fi
26796
26797  fi
26798
26799
26800    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26801    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26802      # Do we have a bin/java?
26803      if test ! -x "$BOOT_JDK/bin/java"; then
26804        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26806        BOOT_JDK_FOUND=no
26807      else
26808        # Do we have a bin/javac?
26809        if test ! -x "$BOOT_JDK/bin/javac"; then
26810          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26812          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26813$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26814          BOOT_JDK_FOUND=no
26815        else
26816          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26817          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26818
26819          # Extra M4 quote needed to protect [] in grep expression.
26820          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26821          if test "x$FOUND_CORRECT_VERSION" = x; then
26822            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26824            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26825$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26826            BOOT_JDK_FOUND=no
26827          else
26828            # We're done! :-)
26829            BOOT_JDK_FOUND=yes
26830
26831  # Only process if variable expands to non-empty
26832
26833  if test "x$BOOT_JDK" != x; then
26834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26835
26836  # Input might be given as Windows format, start by converting to
26837  # unix format.
26838  path="$BOOT_JDK"
26839  new_path=`$CYGPATH -u "$path"`
26840
26841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26844  # "foo.exe" is OK but "foo" is an error.
26845  #
26846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26847  # It is also a way to make sure we got the proper file name for the real test later on.
26848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26849  if test "x$test_shortpath" = x; then
26850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26852    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26853  fi
26854
26855  # Call helper function which possibly converts this using DOS-style short mode.
26856  # If so, the updated path is stored in $new_path.
26857
26858  input_path="$new_path"
26859  # Check if we need to convert this using DOS-style short mode. If the path
26860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26861  # take no chances and rewrite it.
26862  # Note: m4 eats our [], so we need to use [ and ] instead.
26863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26864  if test "x$has_forbidden_chars" != x; then
26865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26869      # Going to short mode and back again did indeed matter. Since short mode is
26870      # case insensitive, let's make it lowercase to improve readability.
26871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26872      # Now convert it back to Unix-style (cygpath)
26873      input_path=`$CYGPATH -u "$shortmode_path"`
26874      new_path="$input_path"
26875    fi
26876  fi
26877
26878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26879  if test "x$test_cygdrive_prefix" = x; then
26880    # As a simple fix, exclude /usr/bin since it's not a real path.
26881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26883      # a path prefixed by /cygdrive for fixpath to work.
26884      new_path="$CYGWIN_ROOT_PATH$input_path"
26885    fi
26886  fi
26887
26888
26889  if test "x$path" != "x$new_path"; then
26890    BOOT_JDK="$new_path"
26891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26893  fi
26894
26895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26896
26897  path="$BOOT_JDK"
26898  has_colon=`$ECHO $path | $GREP ^.:`
26899  new_path="$path"
26900  if test "x$has_colon" = x; then
26901    # Not in mixed or Windows style, start by that.
26902    new_path=`cmd //c echo $path`
26903  fi
26904
26905
26906  input_path="$new_path"
26907  # Check if we need to convert this using DOS-style short mode. If the path
26908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26909  # take no chances and rewrite it.
26910  # Note: m4 eats our [], so we need to use [ and ] instead.
26911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26912  if test "x$has_forbidden_chars" != x; then
26913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26915  fi
26916
26917
26918  windows_path="$new_path"
26919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26920    unix_path=`$CYGPATH -u "$windows_path"`
26921    new_path="$unix_path"
26922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26924    new_path="$unix_path"
26925  fi
26926
26927  if test "x$path" != "x$new_path"; then
26928    BOOT_JDK="$new_path"
26929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26931  fi
26932
26933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26935
26936    else
26937      # We're on a unix platform. Hooray! :)
26938      path="$BOOT_JDK"
26939      has_space=`$ECHO "$path" | $GREP " "`
26940      if test "x$has_space" != x; then
26941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26944      fi
26945
26946      # Use eval to expand a potential ~
26947      eval path="$path"
26948      if test ! -f "$path" && test ! -d "$path"; then
26949        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26950      fi
26951
26952      if test -d "$path"; then
26953        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26954      else
26955        dir="`$DIRNAME "$path"`"
26956        base="`$BASENAME "$path"`"
26957        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26958      fi
26959    fi
26960  fi
26961
26962            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26963$as_echo_n "checking for Boot JDK... " >&6; }
26964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26965$as_echo "$BOOT_JDK" >&6; }
26966            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26967$as_echo_n "checking Boot JDK version... " >&6; }
26968            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26970$as_echo "$BOOT_JDK_VERSION" >&6; }
26971          fi # end check jdk version
26972        fi # end check javac
26973      fi # end check java
26974    fi # end check boot jdk found
26975  fi
26976
26977
26978  if test "x$BOOT_JDK_FOUND" = xno; then
26979    # Now execute the test
26980
26981  if test "x$PROGRAMW6432" != x; then
26982    VIRTUAL_DIR="$PROGRAMW6432/Java"
26983
26984  windows_path="$VIRTUAL_DIR"
26985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26986    unix_path=`$CYGPATH -u "$windows_path"`
26987    VIRTUAL_DIR="$unix_path"
26988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26990    VIRTUAL_DIR="$unix_path"
26991  fi
26992
26993
26994  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26995  BOOT_JDK_SUFFIX=""
26996  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26997  if test "x$ALL_JDKS_FOUND" != x; then
26998    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26999
27000  if test "x$BOOT_JDK_FOUND" = xno; then
27001    # Now execute the test
27002
27003        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27004        if test -d "$BOOT_JDK"; then
27005          BOOT_JDK_FOUND=maybe
27006          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27007$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27008        fi
27009
27010
27011    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27012    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27013      # Do we have a bin/java?
27014      if test ! -x "$BOOT_JDK/bin/java"; then
27015        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27017        BOOT_JDK_FOUND=no
27018      else
27019        # Do we have a bin/javac?
27020        if test ! -x "$BOOT_JDK/bin/javac"; then
27021          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27023          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27024$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27025          BOOT_JDK_FOUND=no
27026        else
27027          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27028          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27029
27030          # Extra M4 quote needed to protect [] in grep expression.
27031          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27032          if test "x$FOUND_CORRECT_VERSION" = x; then
27033            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27035            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27036$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27037            BOOT_JDK_FOUND=no
27038          else
27039            # We're done! :-)
27040            BOOT_JDK_FOUND=yes
27041
27042  # Only process if variable expands to non-empty
27043
27044  if test "x$BOOT_JDK" != x; then
27045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27046
27047  # Input might be given as Windows format, start by converting to
27048  # unix format.
27049  path="$BOOT_JDK"
27050  new_path=`$CYGPATH -u "$path"`
27051
27052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27055  # "foo.exe" is OK but "foo" is an error.
27056  #
27057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27058  # It is also a way to make sure we got the proper file name for the real test later on.
27059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27060  if test "x$test_shortpath" = x; then
27061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27062$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27063    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27064  fi
27065
27066  # Call helper function which possibly converts this using DOS-style short mode.
27067  # If so, the updated path is stored in $new_path.
27068
27069  input_path="$new_path"
27070  # Check if we need to convert this using DOS-style short mode. If the path
27071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27072  # take no chances and rewrite it.
27073  # Note: m4 eats our [], so we need to use [ and ] instead.
27074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27075  if test "x$has_forbidden_chars" != x; then
27076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27080      # Going to short mode and back again did indeed matter. Since short mode is
27081      # case insensitive, let's make it lowercase to improve readability.
27082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27083      # Now convert it back to Unix-style (cygpath)
27084      input_path=`$CYGPATH -u "$shortmode_path"`
27085      new_path="$input_path"
27086    fi
27087  fi
27088
27089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27090  if test "x$test_cygdrive_prefix" = x; then
27091    # As a simple fix, exclude /usr/bin since it's not a real path.
27092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27094      # a path prefixed by /cygdrive for fixpath to work.
27095      new_path="$CYGWIN_ROOT_PATH$input_path"
27096    fi
27097  fi
27098
27099
27100  if test "x$path" != "x$new_path"; then
27101    BOOT_JDK="$new_path"
27102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27104  fi
27105
27106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27107
27108  path="$BOOT_JDK"
27109  has_colon=`$ECHO $path | $GREP ^.:`
27110  new_path="$path"
27111  if test "x$has_colon" = x; then
27112    # Not in mixed or Windows style, start by that.
27113    new_path=`cmd //c echo $path`
27114  fi
27115
27116
27117  input_path="$new_path"
27118  # Check if we need to convert this using DOS-style short mode. If the path
27119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27120  # take no chances and rewrite it.
27121  # Note: m4 eats our [], so we need to use [ and ] instead.
27122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27123  if test "x$has_forbidden_chars" != x; then
27124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27126  fi
27127
27128
27129  windows_path="$new_path"
27130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27131    unix_path=`$CYGPATH -u "$windows_path"`
27132    new_path="$unix_path"
27133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27135    new_path="$unix_path"
27136  fi
27137
27138  if test "x$path" != "x$new_path"; then
27139    BOOT_JDK="$new_path"
27140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27142  fi
27143
27144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27146
27147    else
27148      # We're on a unix platform. Hooray! :)
27149      path="$BOOT_JDK"
27150      has_space=`$ECHO "$path" | $GREP " "`
27151      if test "x$has_space" != x; then
27152        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27153$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27154        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27155      fi
27156
27157      # Use eval to expand a potential ~
27158      eval path="$path"
27159      if test ! -f "$path" && test ! -d "$path"; then
27160        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27161      fi
27162
27163      if test -d "$path"; then
27164        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27165      else
27166        dir="`$DIRNAME "$path"`"
27167        base="`$BASENAME "$path"`"
27168        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27169      fi
27170    fi
27171  fi
27172
27173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27174$as_echo_n "checking for Boot JDK... " >&6; }
27175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27176$as_echo "$BOOT_JDK" >&6; }
27177            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27178$as_echo_n "checking Boot JDK version... " >&6; }
27179            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27181$as_echo "$BOOT_JDK_VERSION" >&6; }
27182          fi # end check jdk version
27183        fi # end check javac
27184      fi # end check java
27185    fi # end check boot jdk found
27186  fi
27187
27188    done
27189  fi
27190
27191  fi
27192
27193
27194    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27195    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27196      # Do we have a bin/java?
27197      if test ! -x "$BOOT_JDK/bin/java"; then
27198        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27200        BOOT_JDK_FOUND=no
27201      else
27202        # Do we have a bin/javac?
27203        if test ! -x "$BOOT_JDK/bin/javac"; then
27204          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27206          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27207$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27208          BOOT_JDK_FOUND=no
27209        else
27210          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27211          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27212
27213          # Extra M4 quote needed to protect [] in grep expression.
27214          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27215          if test "x$FOUND_CORRECT_VERSION" = x; then
27216            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27218            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27219$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27220            BOOT_JDK_FOUND=no
27221          else
27222            # We're done! :-)
27223            BOOT_JDK_FOUND=yes
27224
27225  # Only process if variable expands to non-empty
27226
27227  if test "x$BOOT_JDK" != x; then
27228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27229
27230  # Input might be given as Windows format, start by converting to
27231  # unix format.
27232  path="$BOOT_JDK"
27233  new_path=`$CYGPATH -u "$path"`
27234
27235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27238  # "foo.exe" is OK but "foo" is an error.
27239  #
27240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27241  # It is also a way to make sure we got the proper file name for the real test later on.
27242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27243  if test "x$test_shortpath" = x; then
27244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27246    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27247  fi
27248
27249  # Call helper function which possibly converts this using DOS-style short mode.
27250  # If so, the updated path is stored in $new_path.
27251
27252  input_path="$new_path"
27253  # Check if we need to convert this using DOS-style short mode. If the path
27254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27255  # take no chances and rewrite it.
27256  # Note: m4 eats our [], so we need to use [ and ] instead.
27257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27258  if test "x$has_forbidden_chars" != x; then
27259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27263      # Going to short mode and back again did indeed matter. Since short mode is
27264      # case insensitive, let's make it lowercase to improve readability.
27265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27266      # Now convert it back to Unix-style (cygpath)
27267      input_path=`$CYGPATH -u "$shortmode_path"`
27268      new_path="$input_path"
27269    fi
27270  fi
27271
27272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27273  if test "x$test_cygdrive_prefix" = x; then
27274    # As a simple fix, exclude /usr/bin since it's not a real path.
27275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27277      # a path prefixed by /cygdrive for fixpath to work.
27278      new_path="$CYGWIN_ROOT_PATH$input_path"
27279    fi
27280  fi
27281
27282
27283  if test "x$path" != "x$new_path"; then
27284    BOOT_JDK="$new_path"
27285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27287  fi
27288
27289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27290
27291  path="$BOOT_JDK"
27292  has_colon=`$ECHO $path | $GREP ^.:`
27293  new_path="$path"
27294  if test "x$has_colon" = x; then
27295    # Not in mixed or Windows style, start by that.
27296    new_path=`cmd //c echo $path`
27297  fi
27298
27299
27300  input_path="$new_path"
27301  # Check if we need to convert this using DOS-style short mode. If the path
27302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27303  # take no chances and rewrite it.
27304  # Note: m4 eats our [], so we need to use [ and ] instead.
27305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27306  if test "x$has_forbidden_chars" != x; then
27307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27309  fi
27310
27311
27312  windows_path="$new_path"
27313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27314    unix_path=`$CYGPATH -u "$windows_path"`
27315    new_path="$unix_path"
27316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27318    new_path="$unix_path"
27319  fi
27320
27321  if test "x$path" != "x$new_path"; then
27322    BOOT_JDK="$new_path"
27323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27325  fi
27326
27327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27329
27330    else
27331      # We're on a unix platform. Hooray! :)
27332      path="$BOOT_JDK"
27333      has_space=`$ECHO "$path" | $GREP " "`
27334      if test "x$has_space" != x; then
27335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27338      fi
27339
27340      # Use eval to expand a potential ~
27341      eval path="$path"
27342      if test ! -f "$path" && test ! -d "$path"; then
27343        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27344      fi
27345
27346      if test -d "$path"; then
27347        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27348      else
27349        dir="`$DIRNAME "$path"`"
27350        base="`$BASENAME "$path"`"
27351        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27352      fi
27353    fi
27354  fi
27355
27356            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27357$as_echo_n "checking for Boot JDK... " >&6; }
27358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27359$as_echo "$BOOT_JDK" >&6; }
27360            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27361$as_echo_n "checking Boot JDK version... " >&6; }
27362            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27364$as_echo "$BOOT_JDK_VERSION" >&6; }
27365          fi # end check jdk version
27366        fi # end check javac
27367      fi # end check java
27368    fi # end check boot jdk found
27369  fi
27370
27371
27372  if test "x$BOOT_JDK_FOUND" = xno; then
27373    # Now execute the test
27374
27375  if test "x$PROGRAMFILES" != x; then
27376    VIRTUAL_DIR="$PROGRAMFILES/Java"
27377
27378  windows_path="$VIRTUAL_DIR"
27379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27380    unix_path=`$CYGPATH -u "$windows_path"`
27381    VIRTUAL_DIR="$unix_path"
27382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27384    VIRTUAL_DIR="$unix_path"
27385  fi
27386
27387
27388  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27389  BOOT_JDK_SUFFIX=""
27390  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27391  if test "x$ALL_JDKS_FOUND" != x; then
27392    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27393
27394  if test "x$BOOT_JDK_FOUND" = xno; then
27395    # Now execute the test
27396
27397        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27398        if test -d "$BOOT_JDK"; then
27399          BOOT_JDK_FOUND=maybe
27400          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27401$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27402        fi
27403
27404
27405    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27406    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27407      # Do we have a bin/java?
27408      if test ! -x "$BOOT_JDK/bin/java"; then
27409        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27411        BOOT_JDK_FOUND=no
27412      else
27413        # Do we have a bin/javac?
27414        if test ! -x "$BOOT_JDK/bin/javac"; then
27415          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27417          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27418$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27419          BOOT_JDK_FOUND=no
27420        else
27421          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27422          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27423
27424          # Extra M4 quote needed to protect [] in grep expression.
27425          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27426          if test "x$FOUND_CORRECT_VERSION" = x; then
27427            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27429            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27430$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27431            BOOT_JDK_FOUND=no
27432          else
27433            # We're done! :-)
27434            BOOT_JDK_FOUND=yes
27435
27436  # Only process if variable expands to non-empty
27437
27438  if test "x$BOOT_JDK" != x; then
27439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27440
27441  # Input might be given as Windows format, start by converting to
27442  # unix format.
27443  path="$BOOT_JDK"
27444  new_path=`$CYGPATH -u "$path"`
27445
27446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27449  # "foo.exe" is OK but "foo" is an error.
27450  #
27451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27452  # It is also a way to make sure we got the proper file name for the real test later on.
27453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27454  if test "x$test_shortpath" = x; then
27455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27457    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27458  fi
27459
27460  # Call helper function which possibly converts this using DOS-style short mode.
27461  # If so, the updated path is stored in $new_path.
27462
27463  input_path="$new_path"
27464  # Check if we need to convert this using DOS-style short mode. If the path
27465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27466  # take no chances and rewrite it.
27467  # Note: m4 eats our [], so we need to use [ and ] instead.
27468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27469  if test "x$has_forbidden_chars" != x; then
27470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27474      # Going to short mode and back again did indeed matter. Since short mode is
27475      # case insensitive, let's make it lowercase to improve readability.
27476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27477      # Now convert it back to Unix-style (cygpath)
27478      input_path=`$CYGPATH -u "$shortmode_path"`
27479      new_path="$input_path"
27480    fi
27481  fi
27482
27483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27484  if test "x$test_cygdrive_prefix" = x; then
27485    # As a simple fix, exclude /usr/bin since it's not a real path.
27486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27488      # a path prefixed by /cygdrive for fixpath to work.
27489      new_path="$CYGWIN_ROOT_PATH$input_path"
27490    fi
27491  fi
27492
27493
27494  if test "x$path" != "x$new_path"; then
27495    BOOT_JDK="$new_path"
27496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27498  fi
27499
27500    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27501
27502  path="$BOOT_JDK"
27503  has_colon=`$ECHO $path | $GREP ^.:`
27504  new_path="$path"
27505  if test "x$has_colon" = x; then
27506    # Not in mixed or Windows style, start by that.
27507    new_path=`cmd //c echo $path`
27508  fi
27509
27510
27511  input_path="$new_path"
27512  # Check if we need to convert this using DOS-style short mode. If the path
27513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27514  # take no chances and rewrite it.
27515  # Note: m4 eats our [], so we need to use [ and ] instead.
27516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27517  if test "x$has_forbidden_chars" != x; then
27518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27520  fi
27521
27522
27523  windows_path="$new_path"
27524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27525    unix_path=`$CYGPATH -u "$windows_path"`
27526    new_path="$unix_path"
27527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27529    new_path="$unix_path"
27530  fi
27531
27532  if test "x$path" != "x$new_path"; then
27533    BOOT_JDK="$new_path"
27534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27535$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27536  fi
27537
27538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27540
27541    else
27542      # We're on a unix platform. Hooray! :)
27543      path="$BOOT_JDK"
27544      has_space=`$ECHO "$path" | $GREP " "`
27545      if test "x$has_space" != x; then
27546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27548        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27549      fi
27550
27551      # Use eval to expand a potential ~
27552      eval path="$path"
27553      if test ! -f "$path" && test ! -d "$path"; then
27554        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27555      fi
27556
27557      if test -d "$path"; then
27558        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27559      else
27560        dir="`$DIRNAME "$path"`"
27561        base="`$BASENAME "$path"`"
27562        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27563      fi
27564    fi
27565  fi
27566
27567            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27568$as_echo_n "checking for Boot JDK... " >&6; }
27569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27570$as_echo "$BOOT_JDK" >&6; }
27571            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27572$as_echo_n "checking Boot JDK version... " >&6; }
27573            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27575$as_echo "$BOOT_JDK_VERSION" >&6; }
27576          fi # end check jdk version
27577        fi # end check javac
27578      fi # end check java
27579    fi # end check boot jdk found
27580  fi
27581
27582    done
27583  fi
27584
27585  fi
27586
27587
27588    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27589    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27590      # Do we have a bin/java?
27591      if test ! -x "$BOOT_JDK/bin/java"; then
27592        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27594        BOOT_JDK_FOUND=no
27595      else
27596        # Do we have a bin/javac?
27597        if test ! -x "$BOOT_JDK/bin/javac"; then
27598          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27600          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27601$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27602          BOOT_JDK_FOUND=no
27603        else
27604          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27605          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27606
27607          # Extra M4 quote needed to protect [] in grep expression.
27608          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27609          if test "x$FOUND_CORRECT_VERSION" = x; then
27610            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27612            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27613$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27614            BOOT_JDK_FOUND=no
27615          else
27616            # We're done! :-)
27617            BOOT_JDK_FOUND=yes
27618
27619  # Only process if variable expands to non-empty
27620
27621  if test "x$BOOT_JDK" != x; then
27622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27623
27624  # Input might be given as Windows format, start by converting to
27625  # unix format.
27626  path="$BOOT_JDK"
27627  new_path=`$CYGPATH -u "$path"`
27628
27629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27632  # "foo.exe" is OK but "foo" is an error.
27633  #
27634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27635  # It is also a way to make sure we got the proper file name for the real test later on.
27636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27637  if test "x$test_shortpath" = x; then
27638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27639$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27640    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27641  fi
27642
27643  # Call helper function which possibly converts this using DOS-style short mode.
27644  # If so, the updated path is stored in $new_path.
27645
27646  input_path="$new_path"
27647  # Check if we need to convert this using DOS-style short mode. If the path
27648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27649  # take no chances and rewrite it.
27650  # Note: m4 eats our [], so we need to use [ and ] instead.
27651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27652  if test "x$has_forbidden_chars" != x; then
27653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27657      # Going to short mode and back again did indeed matter. Since short mode is
27658      # case insensitive, let's make it lowercase to improve readability.
27659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27660      # Now convert it back to Unix-style (cygpath)
27661      input_path=`$CYGPATH -u "$shortmode_path"`
27662      new_path="$input_path"
27663    fi
27664  fi
27665
27666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27667  if test "x$test_cygdrive_prefix" = x; then
27668    # As a simple fix, exclude /usr/bin since it's not a real path.
27669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27671      # a path prefixed by /cygdrive for fixpath to work.
27672      new_path="$CYGWIN_ROOT_PATH$input_path"
27673    fi
27674  fi
27675
27676
27677  if test "x$path" != "x$new_path"; then
27678    BOOT_JDK="$new_path"
27679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27681  fi
27682
27683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27684
27685  path="$BOOT_JDK"
27686  has_colon=`$ECHO $path | $GREP ^.:`
27687  new_path="$path"
27688  if test "x$has_colon" = x; then
27689    # Not in mixed or Windows style, start by that.
27690    new_path=`cmd //c echo $path`
27691  fi
27692
27693
27694  input_path="$new_path"
27695  # Check if we need to convert this using DOS-style short mode. If the path
27696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27697  # take no chances and rewrite it.
27698  # Note: m4 eats our [], so we need to use [ and ] instead.
27699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27700  if test "x$has_forbidden_chars" != x; then
27701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27703  fi
27704
27705
27706  windows_path="$new_path"
27707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27708    unix_path=`$CYGPATH -u "$windows_path"`
27709    new_path="$unix_path"
27710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27712    new_path="$unix_path"
27713  fi
27714
27715  if test "x$path" != "x$new_path"; then
27716    BOOT_JDK="$new_path"
27717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27719  fi
27720
27721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27723
27724    else
27725      # We're on a unix platform. Hooray! :)
27726      path="$BOOT_JDK"
27727      has_space=`$ECHO "$path" | $GREP " "`
27728      if test "x$has_space" != x; then
27729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27731        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27732      fi
27733
27734      # Use eval to expand a potential ~
27735      eval path="$path"
27736      if test ! -f "$path" && test ! -d "$path"; then
27737        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27738      fi
27739
27740      if test -d "$path"; then
27741        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27742      else
27743        dir="`$DIRNAME "$path"`"
27744        base="`$BASENAME "$path"`"
27745        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27746      fi
27747    fi
27748  fi
27749
27750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27751$as_echo_n "checking for Boot JDK... " >&6; }
27752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27753$as_echo "$BOOT_JDK" >&6; }
27754            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27755$as_echo_n "checking Boot JDK version... " >&6; }
27756            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27758$as_echo "$BOOT_JDK_VERSION" >&6; }
27759          fi # end check jdk version
27760        fi # end check javac
27761      fi # end check java
27762    fi # end check boot jdk found
27763  fi
27764
27765
27766  if test "x$BOOT_JDK_FOUND" = xno; then
27767    # Now execute the test
27768
27769  if test "x$ProgramFiles" != x; then
27770    VIRTUAL_DIR="$ProgramFiles/Java"
27771
27772  windows_path="$VIRTUAL_DIR"
27773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27774    unix_path=`$CYGPATH -u "$windows_path"`
27775    VIRTUAL_DIR="$unix_path"
27776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27778    VIRTUAL_DIR="$unix_path"
27779  fi
27780
27781
27782  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27783  BOOT_JDK_SUFFIX=""
27784  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27785  if test "x$ALL_JDKS_FOUND" != x; then
27786    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27787
27788  if test "x$BOOT_JDK_FOUND" = xno; then
27789    # Now execute the test
27790
27791        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27792        if test -d "$BOOT_JDK"; then
27793          BOOT_JDK_FOUND=maybe
27794          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27795$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27796        fi
27797
27798
27799    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27800    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27801      # Do we have a bin/java?
27802      if test ! -x "$BOOT_JDK/bin/java"; then
27803        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27805        BOOT_JDK_FOUND=no
27806      else
27807        # Do we have a bin/javac?
27808        if test ! -x "$BOOT_JDK/bin/javac"; then
27809          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27811          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27812$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27813          BOOT_JDK_FOUND=no
27814        else
27815          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27816          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27817
27818          # Extra M4 quote needed to protect [] in grep expression.
27819          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27820          if test "x$FOUND_CORRECT_VERSION" = x; then
27821            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27823            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27824$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27825            BOOT_JDK_FOUND=no
27826          else
27827            # We're done! :-)
27828            BOOT_JDK_FOUND=yes
27829
27830  # Only process if variable expands to non-empty
27831
27832  if test "x$BOOT_JDK" != x; then
27833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27834
27835  # Input might be given as Windows format, start by converting to
27836  # unix format.
27837  path="$BOOT_JDK"
27838  new_path=`$CYGPATH -u "$path"`
27839
27840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27843  # "foo.exe" is OK but "foo" is an error.
27844  #
27845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27846  # It is also a way to make sure we got the proper file name for the real test later on.
27847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27848  if test "x$test_shortpath" = x; then
27849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27850$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27851    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27852  fi
27853
27854  # Call helper function which possibly converts this using DOS-style short mode.
27855  # If so, the updated path is stored in $new_path.
27856
27857  input_path="$new_path"
27858  # Check if we need to convert this using DOS-style short mode. If the path
27859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27860  # take no chances and rewrite it.
27861  # Note: m4 eats our [], so we need to use [ and ] instead.
27862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27863  if test "x$has_forbidden_chars" != x; then
27864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27868      # Going to short mode and back again did indeed matter. Since short mode is
27869      # case insensitive, let's make it lowercase to improve readability.
27870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27871      # Now convert it back to Unix-style (cygpath)
27872      input_path=`$CYGPATH -u "$shortmode_path"`
27873      new_path="$input_path"
27874    fi
27875  fi
27876
27877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27878  if test "x$test_cygdrive_prefix" = x; then
27879    # As a simple fix, exclude /usr/bin since it's not a real path.
27880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27882      # a path prefixed by /cygdrive for fixpath to work.
27883      new_path="$CYGWIN_ROOT_PATH$input_path"
27884    fi
27885  fi
27886
27887
27888  if test "x$path" != "x$new_path"; then
27889    BOOT_JDK="$new_path"
27890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27892  fi
27893
27894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27895
27896  path="$BOOT_JDK"
27897  has_colon=`$ECHO $path | $GREP ^.:`
27898  new_path="$path"
27899  if test "x$has_colon" = x; then
27900    # Not in mixed or Windows style, start by that.
27901    new_path=`cmd //c echo $path`
27902  fi
27903
27904
27905  input_path="$new_path"
27906  # Check if we need to convert this using DOS-style short mode. If the path
27907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27908  # take no chances and rewrite it.
27909  # Note: m4 eats our [], so we need to use [ and ] instead.
27910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27911  if test "x$has_forbidden_chars" != x; then
27912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27914  fi
27915
27916
27917  windows_path="$new_path"
27918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27919    unix_path=`$CYGPATH -u "$windows_path"`
27920    new_path="$unix_path"
27921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27923    new_path="$unix_path"
27924  fi
27925
27926  if test "x$path" != "x$new_path"; then
27927    BOOT_JDK="$new_path"
27928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27930  fi
27931
27932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27934
27935    else
27936      # We're on a unix platform. Hooray! :)
27937      path="$BOOT_JDK"
27938      has_space=`$ECHO "$path" | $GREP " "`
27939      if test "x$has_space" != x; then
27940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27941$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27942        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27943      fi
27944
27945      # Use eval to expand a potential ~
27946      eval path="$path"
27947      if test ! -f "$path" && test ! -d "$path"; then
27948        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27949      fi
27950
27951      if test -d "$path"; then
27952        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27953      else
27954        dir="`$DIRNAME "$path"`"
27955        base="`$BASENAME "$path"`"
27956        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27957      fi
27958    fi
27959  fi
27960
27961            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27962$as_echo_n "checking for Boot JDK... " >&6; }
27963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27964$as_echo "$BOOT_JDK" >&6; }
27965            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27966$as_echo_n "checking Boot JDK version... " >&6; }
27967            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27969$as_echo "$BOOT_JDK_VERSION" >&6; }
27970          fi # end check jdk version
27971        fi # end check javac
27972      fi # end check java
27973    fi # end check boot jdk found
27974  fi
27975
27976    done
27977  fi
27978
27979  fi
27980
27981
27982    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27983    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27984      # Do we have a bin/java?
27985      if test ! -x "$BOOT_JDK/bin/java"; then
27986        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27988        BOOT_JDK_FOUND=no
27989      else
27990        # Do we have a bin/javac?
27991        if test ! -x "$BOOT_JDK/bin/javac"; then
27992          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27994          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27995$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27996          BOOT_JDK_FOUND=no
27997        else
27998          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27999          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28000
28001          # Extra M4 quote needed to protect [] in grep expression.
28002          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28003          if test "x$FOUND_CORRECT_VERSION" = x; then
28004            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28006            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28007$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28008            BOOT_JDK_FOUND=no
28009          else
28010            # We're done! :-)
28011            BOOT_JDK_FOUND=yes
28012
28013  # Only process if variable expands to non-empty
28014
28015  if test "x$BOOT_JDK" != x; then
28016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28017
28018  # Input might be given as Windows format, start by converting to
28019  # unix format.
28020  path="$BOOT_JDK"
28021  new_path=`$CYGPATH -u "$path"`
28022
28023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28026  # "foo.exe" is OK but "foo" is an error.
28027  #
28028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28029  # It is also a way to make sure we got the proper file name for the real test later on.
28030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28031  if test "x$test_shortpath" = x; then
28032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28034    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28035  fi
28036
28037  # Call helper function which possibly converts this using DOS-style short mode.
28038  # If so, the updated path is stored in $new_path.
28039
28040  input_path="$new_path"
28041  # Check if we need to convert this using DOS-style short mode. If the path
28042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28043  # take no chances and rewrite it.
28044  # Note: m4 eats our [], so we need to use [ and ] instead.
28045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28046  if test "x$has_forbidden_chars" != x; then
28047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28051      # Going to short mode and back again did indeed matter. Since short mode is
28052      # case insensitive, let's make it lowercase to improve readability.
28053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28054      # Now convert it back to Unix-style (cygpath)
28055      input_path=`$CYGPATH -u "$shortmode_path"`
28056      new_path="$input_path"
28057    fi
28058  fi
28059
28060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28061  if test "x$test_cygdrive_prefix" = x; then
28062    # As a simple fix, exclude /usr/bin since it's not a real path.
28063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28065      # a path prefixed by /cygdrive for fixpath to work.
28066      new_path="$CYGWIN_ROOT_PATH$input_path"
28067    fi
28068  fi
28069
28070
28071  if test "x$path" != "x$new_path"; then
28072    BOOT_JDK="$new_path"
28073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28075  fi
28076
28077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28078
28079  path="$BOOT_JDK"
28080  has_colon=`$ECHO $path | $GREP ^.:`
28081  new_path="$path"
28082  if test "x$has_colon" = x; then
28083    # Not in mixed or Windows style, start by that.
28084    new_path=`cmd //c echo $path`
28085  fi
28086
28087
28088  input_path="$new_path"
28089  # Check if we need to convert this using DOS-style short mode. If the path
28090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28091  # take no chances and rewrite it.
28092  # Note: m4 eats our [], so we need to use [ and ] instead.
28093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28094  if test "x$has_forbidden_chars" != x; then
28095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28097  fi
28098
28099
28100  windows_path="$new_path"
28101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28102    unix_path=`$CYGPATH -u "$windows_path"`
28103    new_path="$unix_path"
28104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28106    new_path="$unix_path"
28107  fi
28108
28109  if test "x$path" != "x$new_path"; then
28110    BOOT_JDK="$new_path"
28111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28113  fi
28114
28115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28117
28118    else
28119      # We're on a unix platform. Hooray! :)
28120      path="$BOOT_JDK"
28121      has_space=`$ECHO "$path" | $GREP " "`
28122      if test "x$has_space" != x; then
28123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28125        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28126      fi
28127
28128      # Use eval to expand a potential ~
28129      eval path="$path"
28130      if test ! -f "$path" && test ! -d "$path"; then
28131        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28132      fi
28133
28134      if test -d "$path"; then
28135        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28136      else
28137        dir="`$DIRNAME "$path"`"
28138        base="`$BASENAME "$path"`"
28139        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28140      fi
28141    fi
28142  fi
28143
28144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28145$as_echo_n "checking for Boot JDK... " >&6; }
28146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28147$as_echo "$BOOT_JDK" >&6; }
28148            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28149$as_echo_n "checking Boot JDK version... " >&6; }
28150            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28152$as_echo "$BOOT_JDK_VERSION" >&6; }
28153          fi # end check jdk version
28154        fi # end check javac
28155      fi # end check java
28156    fi # end check boot jdk found
28157  fi
28158
28159
28160  if test "x$BOOT_JDK_FOUND" = xno; then
28161    # Now execute the test
28162
28163  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28164  BOOT_JDK_SUFFIX=""
28165  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28166  if test "x$ALL_JDKS_FOUND" != x; then
28167    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28168
28169  if test "x$BOOT_JDK_FOUND" = xno; then
28170    # Now execute the test
28171
28172        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28173        if test -d "$BOOT_JDK"; then
28174          BOOT_JDK_FOUND=maybe
28175          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28176$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28177        fi
28178
28179
28180    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28181    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28182      # Do we have a bin/java?
28183      if test ! -x "$BOOT_JDK/bin/java"; then
28184        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28186        BOOT_JDK_FOUND=no
28187      else
28188        # Do we have a bin/javac?
28189        if test ! -x "$BOOT_JDK/bin/javac"; then
28190          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28192          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28193$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28194          BOOT_JDK_FOUND=no
28195        else
28196          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28197          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28198
28199          # Extra M4 quote needed to protect [] in grep expression.
28200          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28201          if test "x$FOUND_CORRECT_VERSION" = x; then
28202            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28204            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28205$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28206            BOOT_JDK_FOUND=no
28207          else
28208            # We're done! :-)
28209            BOOT_JDK_FOUND=yes
28210
28211  # Only process if variable expands to non-empty
28212
28213  if test "x$BOOT_JDK" != x; then
28214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28215
28216  # Input might be given as Windows format, start by converting to
28217  # unix format.
28218  path="$BOOT_JDK"
28219  new_path=`$CYGPATH -u "$path"`
28220
28221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28224  # "foo.exe" is OK but "foo" is an error.
28225  #
28226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28227  # It is also a way to make sure we got the proper file name for the real test later on.
28228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28229  if test "x$test_shortpath" = x; then
28230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28232    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28233  fi
28234
28235  # Call helper function which possibly converts this using DOS-style short mode.
28236  # If so, the updated path is stored in $new_path.
28237
28238  input_path="$new_path"
28239  # Check if we need to convert this using DOS-style short mode. If the path
28240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28241  # take no chances and rewrite it.
28242  # Note: m4 eats our [], so we need to use [ and ] instead.
28243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28244  if test "x$has_forbidden_chars" != x; then
28245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28249      # Going to short mode and back again did indeed matter. Since short mode is
28250      # case insensitive, let's make it lowercase to improve readability.
28251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28252      # Now convert it back to Unix-style (cygpath)
28253      input_path=`$CYGPATH -u "$shortmode_path"`
28254      new_path="$input_path"
28255    fi
28256  fi
28257
28258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28259  if test "x$test_cygdrive_prefix" = x; then
28260    # As a simple fix, exclude /usr/bin since it's not a real path.
28261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28263      # a path prefixed by /cygdrive for fixpath to work.
28264      new_path="$CYGWIN_ROOT_PATH$input_path"
28265    fi
28266  fi
28267
28268
28269  if test "x$path" != "x$new_path"; then
28270    BOOT_JDK="$new_path"
28271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28273  fi
28274
28275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28276
28277  path="$BOOT_JDK"
28278  has_colon=`$ECHO $path | $GREP ^.:`
28279  new_path="$path"
28280  if test "x$has_colon" = x; then
28281    # Not in mixed or Windows style, start by that.
28282    new_path=`cmd //c echo $path`
28283  fi
28284
28285
28286  input_path="$new_path"
28287  # Check if we need to convert this using DOS-style short mode. If the path
28288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28289  # take no chances and rewrite it.
28290  # Note: m4 eats our [], so we need to use [ and ] instead.
28291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28292  if test "x$has_forbidden_chars" != x; then
28293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28295  fi
28296
28297
28298  windows_path="$new_path"
28299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28300    unix_path=`$CYGPATH -u "$windows_path"`
28301    new_path="$unix_path"
28302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28304    new_path="$unix_path"
28305  fi
28306
28307  if test "x$path" != "x$new_path"; then
28308    BOOT_JDK="$new_path"
28309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28311  fi
28312
28313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28315
28316    else
28317      # We're on a unix platform. Hooray! :)
28318      path="$BOOT_JDK"
28319      has_space=`$ECHO "$path" | $GREP " "`
28320      if test "x$has_space" != x; then
28321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28324      fi
28325
28326      # Use eval to expand a potential ~
28327      eval path="$path"
28328      if test ! -f "$path" && test ! -d "$path"; then
28329        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28330      fi
28331
28332      if test -d "$path"; then
28333        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28334      else
28335        dir="`$DIRNAME "$path"`"
28336        base="`$BASENAME "$path"`"
28337        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28338      fi
28339    fi
28340  fi
28341
28342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28343$as_echo_n "checking for Boot JDK... " >&6; }
28344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28345$as_echo "$BOOT_JDK" >&6; }
28346            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28347$as_echo_n "checking Boot JDK version... " >&6; }
28348            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28350$as_echo "$BOOT_JDK_VERSION" >&6; }
28351          fi # end check jdk version
28352        fi # end check javac
28353      fi # end check java
28354    fi # end check boot jdk found
28355  fi
28356
28357    done
28358  fi
28359
28360
28361    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28362    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28363      # Do we have a bin/java?
28364      if test ! -x "$BOOT_JDK/bin/java"; then
28365        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28367        BOOT_JDK_FOUND=no
28368      else
28369        # Do we have a bin/javac?
28370        if test ! -x "$BOOT_JDK/bin/javac"; then
28371          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28373          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28374$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28375          BOOT_JDK_FOUND=no
28376        else
28377          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28378          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28379
28380          # Extra M4 quote needed to protect [] in grep expression.
28381          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28382          if test "x$FOUND_CORRECT_VERSION" = x; then
28383            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28385            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28386$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28387            BOOT_JDK_FOUND=no
28388          else
28389            # We're done! :-)
28390            BOOT_JDK_FOUND=yes
28391
28392  # Only process if variable expands to non-empty
28393
28394  if test "x$BOOT_JDK" != x; then
28395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28396
28397  # Input might be given as Windows format, start by converting to
28398  # unix format.
28399  path="$BOOT_JDK"
28400  new_path=`$CYGPATH -u "$path"`
28401
28402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28405  # "foo.exe" is OK but "foo" is an error.
28406  #
28407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28408  # It is also a way to make sure we got the proper file name for the real test later on.
28409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28410  if test "x$test_shortpath" = x; then
28411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28413    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28414  fi
28415
28416  # Call helper function which possibly converts this using DOS-style short mode.
28417  # If so, the updated path is stored in $new_path.
28418
28419  input_path="$new_path"
28420  # Check if we need to convert this using DOS-style short mode. If the path
28421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28422  # take no chances and rewrite it.
28423  # Note: m4 eats our [], so we need to use [ and ] instead.
28424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28425  if test "x$has_forbidden_chars" != x; then
28426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28430      # Going to short mode and back again did indeed matter. Since short mode is
28431      # case insensitive, let's make it lowercase to improve readability.
28432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28433      # Now convert it back to Unix-style (cygpath)
28434      input_path=`$CYGPATH -u "$shortmode_path"`
28435      new_path="$input_path"
28436    fi
28437  fi
28438
28439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28440  if test "x$test_cygdrive_prefix" = x; then
28441    # As a simple fix, exclude /usr/bin since it's not a real path.
28442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28444      # a path prefixed by /cygdrive for fixpath to work.
28445      new_path="$CYGWIN_ROOT_PATH$input_path"
28446    fi
28447  fi
28448
28449
28450  if test "x$path" != "x$new_path"; then
28451    BOOT_JDK="$new_path"
28452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28454  fi
28455
28456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28457
28458  path="$BOOT_JDK"
28459  has_colon=`$ECHO $path | $GREP ^.:`
28460  new_path="$path"
28461  if test "x$has_colon" = x; then
28462    # Not in mixed or Windows style, start by that.
28463    new_path=`cmd //c echo $path`
28464  fi
28465
28466
28467  input_path="$new_path"
28468  # Check if we need to convert this using DOS-style short mode. If the path
28469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28470  # take no chances and rewrite it.
28471  # Note: m4 eats our [], so we need to use [ and ] instead.
28472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28473  if test "x$has_forbidden_chars" != x; then
28474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28476  fi
28477
28478
28479  windows_path="$new_path"
28480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28481    unix_path=`$CYGPATH -u "$windows_path"`
28482    new_path="$unix_path"
28483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28485    new_path="$unix_path"
28486  fi
28487
28488  if test "x$path" != "x$new_path"; then
28489    BOOT_JDK="$new_path"
28490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28492  fi
28493
28494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28496
28497    else
28498      # We're on a unix platform. Hooray! :)
28499      path="$BOOT_JDK"
28500      has_space=`$ECHO "$path" | $GREP " "`
28501      if test "x$has_space" != x; then
28502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28505      fi
28506
28507      # Use eval to expand a potential ~
28508      eval path="$path"
28509      if test ! -f "$path" && test ! -d "$path"; then
28510        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28511      fi
28512
28513      if test -d "$path"; then
28514        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28515      else
28516        dir="`$DIRNAME "$path"`"
28517        base="`$BASENAME "$path"`"
28518        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28519      fi
28520    fi
28521  fi
28522
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28524$as_echo_n "checking for Boot JDK... " >&6; }
28525            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28526$as_echo "$BOOT_JDK" >&6; }
28527            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28528$as_echo_n "checking Boot JDK version... " >&6; }
28529            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28531$as_echo "$BOOT_JDK_VERSION" >&6; }
28532          fi # end check jdk version
28533        fi # end check javac
28534      fi # end check java
28535    fi # end check boot jdk found
28536  fi
28537
28538  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28539
28540  if test "x$BOOT_JDK_FOUND" = xno; then
28541    # Now execute the test
28542
28543  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28544  BOOT_JDK_SUFFIX="/Contents/Home"
28545  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28546  if test "x$ALL_JDKS_FOUND" != x; then
28547    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28548
28549  if test "x$BOOT_JDK_FOUND" = xno; then
28550    # Now execute the test
28551
28552        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28553        if test -d "$BOOT_JDK"; then
28554          BOOT_JDK_FOUND=maybe
28555          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28556$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28557        fi
28558
28559
28560    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28561    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28562      # Do we have a bin/java?
28563      if test ! -x "$BOOT_JDK/bin/java"; then
28564        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28565$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28566        BOOT_JDK_FOUND=no
28567      else
28568        # Do we have a bin/javac?
28569        if test ! -x "$BOOT_JDK/bin/javac"; then
28570          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28572          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28573$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28574          BOOT_JDK_FOUND=no
28575        else
28576          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28577          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28578
28579          # Extra M4 quote needed to protect [] in grep expression.
28580          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28581          if test "x$FOUND_CORRECT_VERSION" = x; then
28582            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28584            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28585$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28586            BOOT_JDK_FOUND=no
28587          else
28588            # We're done! :-)
28589            BOOT_JDK_FOUND=yes
28590
28591  # Only process if variable expands to non-empty
28592
28593  if test "x$BOOT_JDK" != x; then
28594    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28595
28596  # Input might be given as Windows format, start by converting to
28597  # unix format.
28598  path="$BOOT_JDK"
28599  new_path=`$CYGPATH -u "$path"`
28600
28601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28604  # "foo.exe" is OK but "foo" is an error.
28605  #
28606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28607  # It is also a way to make sure we got the proper file name for the real test later on.
28608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28609  if test "x$test_shortpath" = x; then
28610    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28611$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28612    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28613  fi
28614
28615  # Call helper function which possibly converts this using DOS-style short mode.
28616  # If so, the updated path is stored in $new_path.
28617
28618  input_path="$new_path"
28619  # Check if we need to convert this using DOS-style short mode. If the path
28620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28621  # take no chances and rewrite it.
28622  # Note: m4 eats our [], so we need to use [ and ] instead.
28623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28624  if test "x$has_forbidden_chars" != x; then
28625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28629      # Going to short mode and back again did indeed matter. Since short mode is
28630      # case insensitive, let's make it lowercase to improve readability.
28631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28632      # Now convert it back to Unix-style (cygpath)
28633      input_path=`$CYGPATH -u "$shortmode_path"`
28634      new_path="$input_path"
28635    fi
28636  fi
28637
28638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28639  if test "x$test_cygdrive_prefix" = x; then
28640    # As a simple fix, exclude /usr/bin since it's not a real path.
28641    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28643      # a path prefixed by /cygdrive for fixpath to work.
28644      new_path="$CYGWIN_ROOT_PATH$input_path"
28645    fi
28646  fi
28647
28648
28649  if test "x$path" != "x$new_path"; then
28650    BOOT_JDK="$new_path"
28651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28652$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28653  fi
28654
28655    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28656
28657  path="$BOOT_JDK"
28658  has_colon=`$ECHO $path | $GREP ^.:`
28659  new_path="$path"
28660  if test "x$has_colon" = x; then
28661    # Not in mixed or Windows style, start by that.
28662    new_path=`cmd //c echo $path`
28663  fi
28664
28665
28666  input_path="$new_path"
28667  # Check if we need to convert this using DOS-style short mode. If the path
28668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28669  # take no chances and rewrite it.
28670  # Note: m4 eats our [], so we need to use [ and ] instead.
28671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28672  if test "x$has_forbidden_chars" != x; then
28673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28675  fi
28676
28677
28678  windows_path="$new_path"
28679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28680    unix_path=`$CYGPATH -u "$windows_path"`
28681    new_path="$unix_path"
28682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28684    new_path="$unix_path"
28685  fi
28686
28687  if test "x$path" != "x$new_path"; then
28688    BOOT_JDK="$new_path"
28689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28690$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28691  fi
28692
28693  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28694  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28695
28696    else
28697      # We're on a unix platform. Hooray! :)
28698      path="$BOOT_JDK"
28699      has_space=`$ECHO "$path" | $GREP " "`
28700      if test "x$has_space" != x; then
28701        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28702$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28703        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28704      fi
28705
28706      # Use eval to expand a potential ~
28707      eval path="$path"
28708      if test ! -f "$path" && test ! -d "$path"; then
28709        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28710      fi
28711
28712      if test -d "$path"; then
28713        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28714      else
28715        dir="`$DIRNAME "$path"`"
28716        base="`$BASENAME "$path"`"
28717        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28718      fi
28719    fi
28720  fi
28721
28722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28723$as_echo_n "checking for Boot JDK... " >&6; }
28724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28725$as_echo "$BOOT_JDK" >&6; }
28726            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28727$as_echo_n "checking Boot JDK version... " >&6; }
28728            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28730$as_echo "$BOOT_JDK_VERSION" >&6; }
28731          fi # end check jdk version
28732        fi # end check javac
28733      fi # end check java
28734    fi # end check boot jdk found
28735  fi
28736
28737    done
28738  fi
28739
28740
28741    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28742    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28743      # Do we have a bin/java?
28744      if test ! -x "$BOOT_JDK/bin/java"; then
28745        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28747        BOOT_JDK_FOUND=no
28748      else
28749        # Do we have a bin/javac?
28750        if test ! -x "$BOOT_JDK/bin/javac"; then
28751          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28753          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28754$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28755          BOOT_JDK_FOUND=no
28756        else
28757          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28758          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28759
28760          # Extra M4 quote needed to protect [] in grep expression.
28761          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28762          if test "x$FOUND_CORRECT_VERSION" = x; then
28763            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28765            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28766$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28767            BOOT_JDK_FOUND=no
28768          else
28769            # We're done! :-)
28770            BOOT_JDK_FOUND=yes
28771
28772  # Only process if variable expands to non-empty
28773
28774  if test "x$BOOT_JDK" != x; then
28775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28776
28777  # Input might be given as Windows format, start by converting to
28778  # unix format.
28779  path="$BOOT_JDK"
28780  new_path=`$CYGPATH -u "$path"`
28781
28782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28785  # "foo.exe" is OK but "foo" is an error.
28786  #
28787  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28788  # It is also a way to make sure we got the proper file name for the real test later on.
28789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28790  if test "x$test_shortpath" = x; then
28791    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28792$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28793    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28794  fi
28795
28796  # Call helper function which possibly converts this using DOS-style short mode.
28797  # If so, the updated path is stored in $new_path.
28798
28799  input_path="$new_path"
28800  # Check if we need to convert this using DOS-style short mode. If the path
28801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28802  # take no chances and rewrite it.
28803  # Note: m4 eats our [], so we need to use [ and ] instead.
28804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28805  if test "x$has_forbidden_chars" != x; then
28806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28810      # Going to short mode and back again did indeed matter. Since short mode is
28811      # case insensitive, let's make it lowercase to improve readability.
28812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28813      # Now convert it back to Unix-style (cygpath)
28814      input_path=`$CYGPATH -u "$shortmode_path"`
28815      new_path="$input_path"
28816    fi
28817  fi
28818
28819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28820  if test "x$test_cygdrive_prefix" = x; then
28821    # As a simple fix, exclude /usr/bin since it's not a real path.
28822    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28824      # a path prefixed by /cygdrive for fixpath to work.
28825      new_path="$CYGWIN_ROOT_PATH$input_path"
28826    fi
28827  fi
28828
28829
28830  if test "x$path" != "x$new_path"; then
28831    BOOT_JDK="$new_path"
28832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28833$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28834  fi
28835
28836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28837
28838  path="$BOOT_JDK"
28839  has_colon=`$ECHO $path | $GREP ^.:`
28840  new_path="$path"
28841  if test "x$has_colon" = x; then
28842    # Not in mixed or Windows style, start by that.
28843    new_path=`cmd //c echo $path`
28844  fi
28845
28846
28847  input_path="$new_path"
28848  # Check if we need to convert this using DOS-style short mode. If the path
28849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28850  # take no chances and rewrite it.
28851  # Note: m4 eats our [], so we need to use [ and ] instead.
28852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28853  if test "x$has_forbidden_chars" != x; then
28854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28856  fi
28857
28858
28859  windows_path="$new_path"
28860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28861    unix_path=`$CYGPATH -u "$windows_path"`
28862    new_path="$unix_path"
28863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28865    new_path="$unix_path"
28866  fi
28867
28868  if test "x$path" != "x$new_path"; then
28869    BOOT_JDK="$new_path"
28870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28872  fi
28873
28874  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28875  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28876
28877    else
28878      # We're on a unix platform. Hooray! :)
28879      path="$BOOT_JDK"
28880      has_space=`$ECHO "$path" | $GREP " "`
28881      if test "x$has_space" != x; then
28882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28883$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28884        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28885      fi
28886
28887      # Use eval to expand a potential ~
28888      eval path="$path"
28889      if test ! -f "$path" && test ! -d "$path"; then
28890        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28891      fi
28892
28893      if test -d "$path"; then
28894        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28895      else
28896        dir="`$DIRNAME "$path"`"
28897        base="`$BASENAME "$path"`"
28898        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28899      fi
28900    fi
28901  fi
28902
28903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28904$as_echo_n "checking for Boot JDK... " >&6; }
28905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28906$as_echo "$BOOT_JDK" >&6; }
28907            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28908$as_echo_n "checking Boot JDK version... " >&6; }
28909            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28910            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28911$as_echo "$BOOT_JDK_VERSION" >&6; }
28912          fi # end check jdk version
28913        fi # end check javac
28914      fi # end check java
28915    fi # end check boot jdk found
28916  fi
28917
28918
28919  if test "x$BOOT_JDK_FOUND" = xno; then
28920    # Now execute the test
28921
28922  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28923  BOOT_JDK_SUFFIX="/Contents/Home"
28924  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28925  if test "x$ALL_JDKS_FOUND" != x; then
28926    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28927
28928  if test "x$BOOT_JDK_FOUND" = xno; then
28929    # Now execute the test
28930
28931        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28932        if test -d "$BOOT_JDK"; then
28933          BOOT_JDK_FOUND=maybe
28934          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28935$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28936        fi
28937
28938
28939    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28940    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28941      # Do we have a bin/java?
28942      if test ! -x "$BOOT_JDK/bin/java"; then
28943        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28945        BOOT_JDK_FOUND=no
28946      else
28947        # Do we have a bin/javac?
28948        if test ! -x "$BOOT_JDK/bin/javac"; then
28949          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28951          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28952$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28953          BOOT_JDK_FOUND=no
28954        else
28955          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28956          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28957
28958          # Extra M4 quote needed to protect [] in grep expression.
28959          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28960          if test "x$FOUND_CORRECT_VERSION" = x; then
28961            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28963            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28964$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28965            BOOT_JDK_FOUND=no
28966          else
28967            # We're done! :-)
28968            BOOT_JDK_FOUND=yes
28969
28970  # Only process if variable expands to non-empty
28971
28972  if test "x$BOOT_JDK" != x; then
28973    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28974
28975  # Input might be given as Windows format, start by converting to
28976  # unix format.
28977  path="$BOOT_JDK"
28978  new_path=`$CYGPATH -u "$path"`
28979
28980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28983  # "foo.exe" is OK but "foo" is an error.
28984  #
28985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28986  # It is also a way to make sure we got the proper file name for the real test later on.
28987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28988  if test "x$test_shortpath" = x; then
28989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28990$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28991    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28992  fi
28993
28994  # Call helper function which possibly converts this using DOS-style short mode.
28995  # If so, the updated path is stored in $new_path.
28996
28997  input_path="$new_path"
28998  # Check if we need to convert this using DOS-style short mode. If the path
28999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29000  # take no chances and rewrite it.
29001  # Note: m4 eats our [], so we need to use [ and ] instead.
29002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29003  if test "x$has_forbidden_chars" != x; then
29004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29008      # Going to short mode and back again did indeed matter. Since short mode is
29009      # case insensitive, let's make it lowercase to improve readability.
29010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29011      # Now convert it back to Unix-style (cygpath)
29012      input_path=`$CYGPATH -u "$shortmode_path"`
29013      new_path="$input_path"
29014    fi
29015  fi
29016
29017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29018  if test "x$test_cygdrive_prefix" = x; then
29019    # As a simple fix, exclude /usr/bin since it's not a real path.
29020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29022      # a path prefixed by /cygdrive for fixpath to work.
29023      new_path="$CYGWIN_ROOT_PATH$input_path"
29024    fi
29025  fi
29026
29027
29028  if test "x$path" != "x$new_path"; then
29029    BOOT_JDK="$new_path"
29030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29032  fi
29033
29034    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29035
29036  path="$BOOT_JDK"
29037  has_colon=`$ECHO $path | $GREP ^.:`
29038  new_path="$path"
29039  if test "x$has_colon" = x; then
29040    # Not in mixed or Windows style, start by that.
29041    new_path=`cmd //c echo $path`
29042  fi
29043
29044
29045  input_path="$new_path"
29046  # Check if we need to convert this using DOS-style short mode. If the path
29047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29048  # take no chances and rewrite it.
29049  # Note: m4 eats our [], so we need to use [ and ] instead.
29050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29051  if test "x$has_forbidden_chars" != x; then
29052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29054  fi
29055
29056
29057  windows_path="$new_path"
29058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29059    unix_path=`$CYGPATH -u "$windows_path"`
29060    new_path="$unix_path"
29061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29063    new_path="$unix_path"
29064  fi
29065
29066  if test "x$path" != "x$new_path"; then
29067    BOOT_JDK="$new_path"
29068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29070  fi
29071
29072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29074
29075    else
29076      # We're on a unix platform. Hooray! :)
29077      path="$BOOT_JDK"
29078      has_space=`$ECHO "$path" | $GREP " "`
29079      if test "x$has_space" != x; then
29080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29082        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29083      fi
29084
29085      # Use eval to expand a potential ~
29086      eval path="$path"
29087      if test ! -f "$path" && test ! -d "$path"; then
29088        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29089      fi
29090
29091      if test -d "$path"; then
29092        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29093      else
29094        dir="`$DIRNAME "$path"`"
29095        base="`$BASENAME "$path"`"
29096        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29097      fi
29098    fi
29099  fi
29100
29101            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29102$as_echo_n "checking for Boot JDK... " >&6; }
29103            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29104$as_echo "$BOOT_JDK" >&6; }
29105            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29106$as_echo_n "checking Boot JDK version... " >&6; }
29107            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29109$as_echo "$BOOT_JDK_VERSION" >&6; }
29110          fi # end check jdk version
29111        fi # end check javac
29112      fi # end check java
29113    fi # end check boot jdk found
29114  fi
29115
29116    done
29117  fi
29118
29119
29120    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29121    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29122      # Do we have a bin/java?
29123      if test ! -x "$BOOT_JDK/bin/java"; then
29124        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29126        BOOT_JDK_FOUND=no
29127      else
29128        # Do we have a bin/javac?
29129        if test ! -x "$BOOT_JDK/bin/javac"; then
29130          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29132          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29133$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29134          BOOT_JDK_FOUND=no
29135        else
29136          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29137          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29138
29139          # Extra M4 quote needed to protect [] in grep expression.
29140          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29141          if test "x$FOUND_CORRECT_VERSION" = x; then
29142            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29144            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29145$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29146            BOOT_JDK_FOUND=no
29147          else
29148            # We're done! :-)
29149            BOOT_JDK_FOUND=yes
29150
29151  # Only process if variable expands to non-empty
29152
29153  if test "x$BOOT_JDK" != x; then
29154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29155
29156  # Input might be given as Windows format, start by converting to
29157  # unix format.
29158  path="$BOOT_JDK"
29159  new_path=`$CYGPATH -u "$path"`
29160
29161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29164  # "foo.exe" is OK but "foo" is an error.
29165  #
29166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29167  # It is also a way to make sure we got the proper file name for the real test later on.
29168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29169  if test "x$test_shortpath" = x; then
29170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29171$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29172    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29173  fi
29174
29175  # Call helper function which possibly converts this using DOS-style short mode.
29176  # If so, the updated path is stored in $new_path.
29177
29178  input_path="$new_path"
29179  # Check if we need to convert this using DOS-style short mode. If the path
29180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29181  # take no chances and rewrite it.
29182  # Note: m4 eats our [], so we need to use [ and ] instead.
29183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29184  if test "x$has_forbidden_chars" != x; then
29185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29189      # Going to short mode and back again did indeed matter. Since short mode is
29190      # case insensitive, let's make it lowercase to improve readability.
29191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29192      # Now convert it back to Unix-style (cygpath)
29193      input_path=`$CYGPATH -u "$shortmode_path"`
29194      new_path="$input_path"
29195    fi
29196  fi
29197
29198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29199  if test "x$test_cygdrive_prefix" = x; then
29200    # As a simple fix, exclude /usr/bin since it's not a real path.
29201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29203      # a path prefixed by /cygdrive for fixpath to work.
29204      new_path="$CYGWIN_ROOT_PATH$input_path"
29205    fi
29206  fi
29207
29208
29209  if test "x$path" != "x$new_path"; then
29210    BOOT_JDK="$new_path"
29211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29212$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29213  fi
29214
29215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29216
29217  path="$BOOT_JDK"
29218  has_colon=`$ECHO $path | $GREP ^.:`
29219  new_path="$path"
29220  if test "x$has_colon" = x; then
29221    # Not in mixed or Windows style, start by that.
29222    new_path=`cmd //c echo $path`
29223  fi
29224
29225
29226  input_path="$new_path"
29227  # Check if we need to convert this using DOS-style short mode. If the path
29228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29229  # take no chances and rewrite it.
29230  # Note: m4 eats our [], so we need to use [ and ] instead.
29231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29232  if test "x$has_forbidden_chars" != x; then
29233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29235  fi
29236
29237
29238  windows_path="$new_path"
29239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29240    unix_path=`$CYGPATH -u "$windows_path"`
29241    new_path="$unix_path"
29242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29244    new_path="$unix_path"
29245  fi
29246
29247  if test "x$path" != "x$new_path"; then
29248    BOOT_JDK="$new_path"
29249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29250$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29251  fi
29252
29253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29255
29256    else
29257      # We're on a unix platform. Hooray! :)
29258      path="$BOOT_JDK"
29259      has_space=`$ECHO "$path" | $GREP " "`
29260      if test "x$has_space" != x; then
29261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29262$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29264      fi
29265
29266      # Use eval to expand a potential ~
29267      eval path="$path"
29268      if test ! -f "$path" && test ! -d "$path"; then
29269        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29270      fi
29271
29272      if test -d "$path"; then
29273        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29274      else
29275        dir="`$DIRNAME "$path"`"
29276        base="`$BASENAME "$path"`"
29277        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29278      fi
29279    fi
29280  fi
29281
29282            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29283$as_echo_n "checking for Boot JDK... " >&6; }
29284            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29285$as_echo "$BOOT_JDK" >&6; }
29286            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29287$as_echo_n "checking Boot JDK version... " >&6; }
29288            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29289            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29290$as_echo "$BOOT_JDK_VERSION" >&6; }
29291          fi # end check jdk version
29292        fi # end check javac
29293      fi # end check java
29294    fi # end check boot jdk found
29295  fi
29296
29297  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29298
29299  if test "x$BOOT_JDK_FOUND" = xno; then
29300    # Now execute the test
29301
29302  BOOT_JDK_PREFIX="/usr/lib/jvm"
29303  BOOT_JDK_SUFFIX=""
29304  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29305  if test "x$ALL_JDKS_FOUND" != x; then
29306    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29307
29308  if test "x$BOOT_JDK_FOUND" = xno; then
29309    # Now execute the test
29310
29311        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29312        if test -d "$BOOT_JDK"; then
29313          BOOT_JDK_FOUND=maybe
29314          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29315$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29316        fi
29317
29318
29319    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29320    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29321      # Do we have a bin/java?
29322      if test ! -x "$BOOT_JDK/bin/java"; then
29323        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29325        BOOT_JDK_FOUND=no
29326      else
29327        # Do we have a bin/javac?
29328        if test ! -x "$BOOT_JDK/bin/javac"; then
29329          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29331          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29332$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29333          BOOT_JDK_FOUND=no
29334        else
29335          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29336          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29337
29338          # Extra M4 quote needed to protect [] in grep expression.
29339          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29340          if test "x$FOUND_CORRECT_VERSION" = x; then
29341            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29343            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29344$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29345            BOOT_JDK_FOUND=no
29346          else
29347            # We're done! :-)
29348            BOOT_JDK_FOUND=yes
29349
29350  # Only process if variable expands to non-empty
29351
29352  if test "x$BOOT_JDK" != x; then
29353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29354
29355  # Input might be given as Windows format, start by converting to
29356  # unix format.
29357  path="$BOOT_JDK"
29358  new_path=`$CYGPATH -u "$path"`
29359
29360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29363  # "foo.exe" is OK but "foo" is an error.
29364  #
29365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29366  # It is also a way to make sure we got the proper file name for the real test later on.
29367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29368  if test "x$test_shortpath" = x; then
29369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29371    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29372  fi
29373
29374  # Call helper function which possibly converts this using DOS-style short mode.
29375  # If so, the updated path is stored in $new_path.
29376
29377  input_path="$new_path"
29378  # Check if we need to convert this using DOS-style short mode. If the path
29379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29380  # take no chances and rewrite it.
29381  # Note: m4 eats our [], so we need to use [ and ] instead.
29382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29383  if test "x$has_forbidden_chars" != x; then
29384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29388      # Going to short mode and back again did indeed matter. Since short mode is
29389      # case insensitive, let's make it lowercase to improve readability.
29390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29391      # Now convert it back to Unix-style (cygpath)
29392      input_path=`$CYGPATH -u "$shortmode_path"`
29393      new_path="$input_path"
29394    fi
29395  fi
29396
29397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29398  if test "x$test_cygdrive_prefix" = x; then
29399    # As a simple fix, exclude /usr/bin since it's not a real path.
29400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29402      # a path prefixed by /cygdrive for fixpath to work.
29403      new_path="$CYGWIN_ROOT_PATH$input_path"
29404    fi
29405  fi
29406
29407
29408  if test "x$path" != "x$new_path"; then
29409    BOOT_JDK="$new_path"
29410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29411$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29412  fi
29413
29414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29415
29416  path="$BOOT_JDK"
29417  has_colon=`$ECHO $path | $GREP ^.:`
29418  new_path="$path"
29419  if test "x$has_colon" = x; then
29420    # Not in mixed or Windows style, start by that.
29421    new_path=`cmd //c echo $path`
29422  fi
29423
29424
29425  input_path="$new_path"
29426  # Check if we need to convert this using DOS-style short mode. If the path
29427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29428  # take no chances and rewrite it.
29429  # Note: m4 eats our [], so we need to use [ and ] instead.
29430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29431  if test "x$has_forbidden_chars" != x; then
29432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29434  fi
29435
29436
29437  windows_path="$new_path"
29438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29439    unix_path=`$CYGPATH -u "$windows_path"`
29440    new_path="$unix_path"
29441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29443    new_path="$unix_path"
29444  fi
29445
29446  if test "x$path" != "x$new_path"; then
29447    BOOT_JDK="$new_path"
29448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29450  fi
29451
29452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29454
29455    else
29456      # We're on a unix platform. Hooray! :)
29457      path="$BOOT_JDK"
29458      has_space=`$ECHO "$path" | $GREP " "`
29459      if test "x$has_space" != x; then
29460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29463      fi
29464
29465      # Use eval to expand a potential ~
29466      eval path="$path"
29467      if test ! -f "$path" && test ! -d "$path"; then
29468        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29469      fi
29470
29471      if test -d "$path"; then
29472        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29473      else
29474        dir="`$DIRNAME "$path"`"
29475        base="`$BASENAME "$path"`"
29476        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29477      fi
29478    fi
29479  fi
29480
29481            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29482$as_echo_n "checking for Boot JDK... " >&6; }
29483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29484$as_echo "$BOOT_JDK" >&6; }
29485            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29486$as_echo_n "checking Boot JDK version... " >&6; }
29487            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29489$as_echo "$BOOT_JDK_VERSION" >&6; }
29490          fi # end check jdk version
29491        fi # end check javac
29492      fi # end check java
29493    fi # end check boot jdk found
29494  fi
29495
29496    done
29497  fi
29498
29499
29500    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29501    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29502      # Do we have a bin/java?
29503      if test ! -x "$BOOT_JDK/bin/java"; then
29504        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29506        BOOT_JDK_FOUND=no
29507      else
29508        # Do we have a bin/javac?
29509        if test ! -x "$BOOT_JDK/bin/javac"; then
29510          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29512          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29513$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29514          BOOT_JDK_FOUND=no
29515        else
29516          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29517          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29518
29519          # Extra M4 quote needed to protect [] in grep expression.
29520          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29521          if test "x$FOUND_CORRECT_VERSION" = x; then
29522            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29524            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29525$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29526            BOOT_JDK_FOUND=no
29527          else
29528            # We're done! :-)
29529            BOOT_JDK_FOUND=yes
29530
29531  # Only process if variable expands to non-empty
29532
29533  if test "x$BOOT_JDK" != x; then
29534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29535
29536  # Input might be given as Windows format, start by converting to
29537  # unix format.
29538  path="$BOOT_JDK"
29539  new_path=`$CYGPATH -u "$path"`
29540
29541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29544  # "foo.exe" is OK but "foo" is an error.
29545  #
29546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29547  # It is also a way to make sure we got the proper file name for the real test later on.
29548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29549  if test "x$test_shortpath" = x; then
29550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29551$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29552    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29553  fi
29554
29555  # Call helper function which possibly converts this using DOS-style short mode.
29556  # If so, the updated path is stored in $new_path.
29557
29558  input_path="$new_path"
29559  # Check if we need to convert this using DOS-style short mode. If the path
29560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29561  # take no chances and rewrite it.
29562  # Note: m4 eats our [], so we need to use [ and ] instead.
29563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29564  if test "x$has_forbidden_chars" != x; then
29565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29569      # Going to short mode and back again did indeed matter. Since short mode is
29570      # case insensitive, let's make it lowercase to improve readability.
29571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29572      # Now convert it back to Unix-style (cygpath)
29573      input_path=`$CYGPATH -u "$shortmode_path"`
29574      new_path="$input_path"
29575    fi
29576  fi
29577
29578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29579  if test "x$test_cygdrive_prefix" = x; then
29580    # As a simple fix, exclude /usr/bin since it's not a real path.
29581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29583      # a path prefixed by /cygdrive for fixpath to work.
29584      new_path="$CYGWIN_ROOT_PATH$input_path"
29585    fi
29586  fi
29587
29588
29589  if test "x$path" != "x$new_path"; then
29590    BOOT_JDK="$new_path"
29591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29592$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29593  fi
29594
29595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29596
29597  path="$BOOT_JDK"
29598  has_colon=`$ECHO $path | $GREP ^.:`
29599  new_path="$path"
29600  if test "x$has_colon" = x; then
29601    # Not in mixed or Windows style, start by that.
29602    new_path=`cmd //c echo $path`
29603  fi
29604
29605
29606  input_path="$new_path"
29607  # Check if we need to convert this using DOS-style short mode. If the path
29608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29609  # take no chances and rewrite it.
29610  # Note: m4 eats our [], so we need to use [ and ] instead.
29611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29612  if test "x$has_forbidden_chars" != x; then
29613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29615  fi
29616
29617
29618  windows_path="$new_path"
29619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29620    unix_path=`$CYGPATH -u "$windows_path"`
29621    new_path="$unix_path"
29622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29624    new_path="$unix_path"
29625  fi
29626
29627  if test "x$path" != "x$new_path"; then
29628    BOOT_JDK="$new_path"
29629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29631  fi
29632
29633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29635
29636    else
29637      # We're on a unix platform. Hooray! :)
29638      path="$BOOT_JDK"
29639      has_space=`$ECHO "$path" | $GREP " "`
29640      if test "x$has_space" != x; then
29641        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29643        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29644      fi
29645
29646      # Use eval to expand a potential ~
29647      eval path="$path"
29648      if test ! -f "$path" && test ! -d "$path"; then
29649        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29650      fi
29651
29652      if test -d "$path"; then
29653        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29654      else
29655        dir="`$DIRNAME "$path"`"
29656        base="`$BASENAME "$path"`"
29657        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29658      fi
29659    fi
29660  fi
29661
29662            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29663$as_echo_n "checking for Boot JDK... " >&6; }
29664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29665$as_echo "$BOOT_JDK" >&6; }
29666            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29667$as_echo_n "checking Boot JDK version... " >&6; }
29668            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29670$as_echo "$BOOT_JDK_VERSION" >&6; }
29671          fi # end check jdk version
29672        fi # end check javac
29673      fi # end check java
29674    fi # end check boot jdk found
29675  fi
29676
29677  fi
29678
29679
29680    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29681    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29682      # Do we have a bin/java?
29683      if test ! -x "$BOOT_JDK/bin/java"; then
29684        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29686        BOOT_JDK_FOUND=no
29687      else
29688        # Do we have a bin/javac?
29689        if test ! -x "$BOOT_JDK/bin/javac"; then
29690          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29692          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29693$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29694          BOOT_JDK_FOUND=no
29695        else
29696          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29697          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29698
29699          # Extra M4 quote needed to protect [] in grep expression.
29700          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29701          if test "x$FOUND_CORRECT_VERSION" = x; then
29702            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29704            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29705$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29706            BOOT_JDK_FOUND=no
29707          else
29708            # We're done! :-)
29709            BOOT_JDK_FOUND=yes
29710
29711  # Only process if variable expands to non-empty
29712
29713  if test "x$BOOT_JDK" != x; then
29714    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29715
29716  # Input might be given as Windows format, start by converting to
29717  # unix format.
29718  path="$BOOT_JDK"
29719  new_path=`$CYGPATH -u "$path"`
29720
29721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29724  # "foo.exe" is OK but "foo" is an error.
29725  #
29726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29727  # It is also a way to make sure we got the proper file name for the real test later on.
29728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29729  if test "x$test_shortpath" = x; then
29730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29732    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29733  fi
29734
29735  # Call helper function which possibly converts this using DOS-style short mode.
29736  # If so, the updated path is stored in $new_path.
29737
29738  input_path="$new_path"
29739  # Check if we need to convert this using DOS-style short mode. If the path
29740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29741  # take no chances and rewrite it.
29742  # Note: m4 eats our [], so we need to use [ and ] instead.
29743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29744  if test "x$has_forbidden_chars" != x; then
29745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29749      # Going to short mode and back again did indeed matter. Since short mode is
29750      # case insensitive, let's make it lowercase to improve readability.
29751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29752      # Now convert it back to Unix-style (cygpath)
29753      input_path=`$CYGPATH -u "$shortmode_path"`
29754      new_path="$input_path"
29755    fi
29756  fi
29757
29758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29759  if test "x$test_cygdrive_prefix" = x; then
29760    # As a simple fix, exclude /usr/bin since it's not a real path.
29761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29763      # a path prefixed by /cygdrive for fixpath to work.
29764      new_path="$CYGWIN_ROOT_PATH$input_path"
29765    fi
29766  fi
29767
29768
29769  if test "x$path" != "x$new_path"; then
29770    BOOT_JDK="$new_path"
29771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29772$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29773  fi
29774
29775    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29776
29777  path="$BOOT_JDK"
29778  has_colon=`$ECHO $path | $GREP ^.:`
29779  new_path="$path"
29780  if test "x$has_colon" = x; then
29781    # Not in mixed or Windows style, start by that.
29782    new_path=`cmd //c echo $path`
29783  fi
29784
29785
29786  input_path="$new_path"
29787  # Check if we need to convert this using DOS-style short mode. If the path
29788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29789  # take no chances and rewrite it.
29790  # Note: m4 eats our [], so we need to use [ and ] instead.
29791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29792  if test "x$has_forbidden_chars" != x; then
29793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29795  fi
29796
29797
29798  windows_path="$new_path"
29799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29800    unix_path=`$CYGPATH -u "$windows_path"`
29801    new_path="$unix_path"
29802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29804    new_path="$unix_path"
29805  fi
29806
29807  if test "x$path" != "x$new_path"; then
29808    BOOT_JDK="$new_path"
29809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29811  fi
29812
29813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29815
29816    else
29817      # We're on a unix platform. Hooray! :)
29818      path="$BOOT_JDK"
29819      has_space=`$ECHO "$path" | $GREP " "`
29820      if test "x$has_space" != x; then
29821        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29823        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29824      fi
29825
29826      # Use eval to expand a potential ~
29827      eval path="$path"
29828      if test ! -f "$path" && test ! -d "$path"; then
29829        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29830      fi
29831
29832      if test -d "$path"; then
29833        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29834      else
29835        dir="`$DIRNAME "$path"`"
29836        base="`$BASENAME "$path"`"
29837        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29838      fi
29839    fi
29840  fi
29841
29842            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29843$as_echo_n "checking for Boot JDK... " >&6; }
29844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29845$as_echo "$BOOT_JDK" >&6; }
29846            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29847$as_echo_n "checking Boot JDK version... " >&6; }
29848            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29850$as_echo "$BOOT_JDK_VERSION" >&6; }
29851          fi # end check jdk version
29852        fi # end check javac
29853      fi # end check java
29854    fi # end check boot jdk found
29855  fi
29856
29857
29858  # If we haven't found anything yet, we've truly lost. Give up.
29859  if test "x$BOOT_JDK_FOUND" = xno; then
29860
29861  # Print a helpful message on how to acquire the necessary build dependency.
29862  # openjdk is the help tag: freetype, cups, alsa etc
29863  MISSING_DEPENDENCY=openjdk
29864
29865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29866    cygwin_help $MISSING_DEPENDENCY
29867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29868    msys_help $MISSING_DEPENDENCY
29869  else
29870    PKGHANDLER_COMMAND=
29871
29872    case $PKGHANDLER in
29873      apt-get)
29874        apt_help     $MISSING_DEPENDENCY ;;
29875      yum)
29876        yum_help     $MISSING_DEPENDENCY ;;
29877      port)
29878        port_help    $MISSING_DEPENDENCY ;;
29879      pkgutil)
29880        pkgutil_help $MISSING_DEPENDENCY ;;
29881      pkgadd)
29882        pkgadd_help  $MISSING_DEPENDENCY ;;
29883    esac
29884
29885    if test "x$PKGHANDLER_COMMAND" != x; then
29886      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29887    fi
29888  fi
29889
29890    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29891$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29892    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29893$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29894    as_fn_error $? "Cannot continue" "$LINENO" 5
29895  fi
29896
29897
29898
29899  # Setup tools from the Boot JDK.
29900
29901  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29902
29903  # Publish this variable in the help.
29904
29905
29906  if [ -z "${JAVA+x}" ]; then
29907    # The variable is not set by user, try to locate tool using the code snippet
29908
29909      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29910$as_echo_n "checking for java in Boot JDK... " >&6; }
29911      JAVA=$BOOT_JDK/bin/java
29912      if test ! -x $JAVA; then
29913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29914$as_echo "not found" >&6; }
29915        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29916$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29917        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29918      fi
29919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29920$as_echo "ok" >&6; }
29921
29922
29923  else
29924    # The variable is set, but is it from the command line or the environment?
29925
29926    # Try to remove the string !JAVA! from our list.
29927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29929      # If it failed, the variable was not from the command line. Ignore it,
29930      # but warn the user (except for BASH, which is always set by the calling BASH).
29931      if test "xJAVA" != xBASH; then
29932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29933$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29934      fi
29935      # Try to locate tool using the code snippet
29936
29937      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29938$as_echo_n "checking for java in Boot JDK... " >&6; }
29939      JAVA=$BOOT_JDK/bin/java
29940      if test ! -x $JAVA; then
29941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29942$as_echo "not found" >&6; }
29943        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29944$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29945        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29946      fi
29947      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29948$as_echo "ok" >&6; }
29949
29950
29951    else
29952      # If it succeeded, then it was overridden by the user. We will use it
29953      # for the tool.
29954
29955      # First remove it from the list of overridden variables, so we can test
29956      # for unknown variables in the end.
29957      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29958
29959      # Check if we try to supply an empty value
29960      if test "x$JAVA" = x; then
29961        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29962$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29964$as_echo_n "checking for JAVA... " >&6; }
29965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29966$as_echo "disabled" >&6; }
29967      else
29968        # Check if the provided tool contains a complete path.
29969        tool_specified="$JAVA"
29970        tool_basename="${tool_specified##*/}"
29971        if test "x$tool_basename" = "x$tool_specified"; then
29972          # A command without a complete path is provided, search $PATH.
29973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29974$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29975          # Extract the first word of "$tool_basename", so it can be a program name with args.
29976set dummy $tool_basename; ac_word=$2
29977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29978$as_echo_n "checking for $ac_word... " >&6; }
29979if ${ac_cv_path_JAVA+:} false; then :
29980  $as_echo_n "(cached) " >&6
29981else
29982  case $JAVA in
29983  [\\/]* | ?:[\\/]*)
29984  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29985  ;;
29986  *)
29987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29988for as_dir in $PATH
29989do
29990  IFS=$as_save_IFS
29991  test -z "$as_dir" && as_dir=.
29992    for ac_exec_ext in '' $ac_executable_extensions; do
29993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29994    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29996    break 2
29997  fi
29998done
29999  done
30000IFS=$as_save_IFS
30001
30002  ;;
30003esac
30004fi
30005JAVA=$ac_cv_path_JAVA
30006if test -n "$JAVA"; then
30007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30008$as_echo "$JAVA" >&6; }
30009else
30010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30011$as_echo "no" >&6; }
30012fi
30013
30014
30015          if test "x$JAVA" = x; then
30016            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30017          fi
30018        else
30019          # Otherwise we believe it is a complete path. Use it as it is.
30020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30021$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30022          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30023$as_echo_n "checking for JAVA... " >&6; }
30024          if test ! -x "$tool_specified"; then
30025            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30026$as_echo "not found" >&6; }
30027            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30028          fi
30029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30030$as_echo "$tool_specified" >&6; }
30031        fi
30032      fi
30033    fi
30034
30035  fi
30036
30037
30038
30039  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30040
30041  # Publish this variable in the help.
30042
30043
30044  if [ -z "${JAVAC+x}" ]; then
30045    # The variable is not set by user, try to locate tool using the code snippet
30046
30047      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30048$as_echo_n "checking for javac in Boot JDK... " >&6; }
30049      JAVAC=$BOOT_JDK/bin/javac
30050      if test ! -x $JAVAC; then
30051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30052$as_echo "not found" >&6; }
30053        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30054$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30055        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30056      fi
30057      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30058$as_echo "ok" >&6; }
30059
30060
30061  else
30062    # The variable is set, but is it from the command line or the environment?
30063
30064    # Try to remove the string !JAVAC! from our list.
30065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30067      # If it failed, the variable was not from the command line. Ignore it,
30068      # but warn the user (except for BASH, which is always set by the calling BASH).
30069      if test "xJAVAC" != xBASH; then
30070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30071$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30072      fi
30073      # Try to locate tool using the code snippet
30074
30075      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30076$as_echo_n "checking for javac in Boot JDK... " >&6; }
30077      JAVAC=$BOOT_JDK/bin/javac
30078      if test ! -x $JAVAC; then
30079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30080$as_echo "not found" >&6; }
30081        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30082$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30083        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30084      fi
30085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30086$as_echo "ok" >&6; }
30087
30088
30089    else
30090      # If it succeeded, then it was overridden by the user. We will use it
30091      # for the tool.
30092
30093      # First remove it from the list of overridden variables, so we can test
30094      # for unknown variables in the end.
30095      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30096
30097      # Check if we try to supply an empty value
30098      if test "x$JAVAC" = x; then
30099        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30100$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30102$as_echo_n "checking for JAVAC... " >&6; }
30103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30104$as_echo "disabled" >&6; }
30105      else
30106        # Check if the provided tool contains a complete path.
30107        tool_specified="$JAVAC"
30108        tool_basename="${tool_specified##*/}"
30109        if test "x$tool_basename" = "x$tool_specified"; then
30110          # A command without a complete path is provided, search $PATH.
30111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30112$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30113          # Extract the first word of "$tool_basename", so it can be a program name with args.
30114set dummy $tool_basename; ac_word=$2
30115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30116$as_echo_n "checking for $ac_word... " >&6; }
30117if ${ac_cv_path_JAVAC+:} false; then :
30118  $as_echo_n "(cached) " >&6
30119else
30120  case $JAVAC in
30121  [\\/]* | ?:[\\/]*)
30122  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30123  ;;
30124  *)
30125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30126for as_dir in $PATH
30127do
30128  IFS=$as_save_IFS
30129  test -z "$as_dir" && as_dir=.
30130    for ac_exec_ext in '' $ac_executable_extensions; do
30131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30132    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30134    break 2
30135  fi
30136done
30137  done
30138IFS=$as_save_IFS
30139
30140  ;;
30141esac
30142fi
30143JAVAC=$ac_cv_path_JAVAC
30144if test -n "$JAVAC"; then
30145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30146$as_echo "$JAVAC" >&6; }
30147else
30148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30149$as_echo "no" >&6; }
30150fi
30151
30152
30153          if test "x$JAVAC" = x; then
30154            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30155          fi
30156        else
30157          # Otherwise we believe it is a complete path. Use it as it is.
30158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30159$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30160          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30161$as_echo_n "checking for JAVAC... " >&6; }
30162          if test ! -x "$tool_specified"; then
30163            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30164$as_echo "not found" >&6; }
30165            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30166          fi
30167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30168$as_echo "$tool_specified" >&6; }
30169        fi
30170      fi
30171    fi
30172
30173  fi
30174
30175
30176
30177  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30178
30179  # Publish this variable in the help.
30180
30181
30182  if [ -z "${JAVAH+x}" ]; then
30183    # The variable is not set by user, try to locate tool using the code snippet
30184
30185      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30186$as_echo_n "checking for javah in Boot JDK... " >&6; }
30187      JAVAH=$BOOT_JDK/bin/javah
30188      if test ! -x $JAVAH; then
30189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30190$as_echo "not found" >&6; }
30191        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30192$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30193        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30194      fi
30195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30196$as_echo "ok" >&6; }
30197
30198
30199  else
30200    # The variable is set, but is it from the command line or the environment?
30201
30202    # Try to remove the string !JAVAH! from our list.
30203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30205      # If it failed, the variable was not from the command line. Ignore it,
30206      # but warn the user (except for BASH, which is always set by the calling BASH).
30207      if test "xJAVAH" != xBASH; then
30208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30209$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30210      fi
30211      # Try to locate tool using the code snippet
30212
30213      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30214$as_echo_n "checking for javah in Boot JDK... " >&6; }
30215      JAVAH=$BOOT_JDK/bin/javah
30216      if test ! -x $JAVAH; then
30217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30218$as_echo "not found" >&6; }
30219        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30220$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30221        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30222      fi
30223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30224$as_echo "ok" >&6; }
30225
30226
30227    else
30228      # If it succeeded, then it was overridden by the user. We will use it
30229      # for the tool.
30230
30231      # First remove it from the list of overridden variables, so we can test
30232      # for unknown variables in the end.
30233      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30234
30235      # Check if we try to supply an empty value
30236      if test "x$JAVAH" = x; then
30237        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30238$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30239        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30240$as_echo_n "checking for JAVAH... " >&6; }
30241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30242$as_echo "disabled" >&6; }
30243      else
30244        # Check if the provided tool contains a complete path.
30245        tool_specified="$JAVAH"
30246        tool_basename="${tool_specified##*/}"
30247        if test "x$tool_basename" = "x$tool_specified"; then
30248          # A command without a complete path is provided, search $PATH.
30249          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30250$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30251          # Extract the first word of "$tool_basename", so it can be a program name with args.
30252set dummy $tool_basename; ac_word=$2
30253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30254$as_echo_n "checking for $ac_word... " >&6; }
30255if ${ac_cv_path_JAVAH+:} false; then :
30256  $as_echo_n "(cached) " >&6
30257else
30258  case $JAVAH in
30259  [\\/]* | ?:[\\/]*)
30260  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30261  ;;
30262  *)
30263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30264for as_dir in $PATH
30265do
30266  IFS=$as_save_IFS
30267  test -z "$as_dir" && as_dir=.
30268    for ac_exec_ext in '' $ac_executable_extensions; do
30269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30270    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30272    break 2
30273  fi
30274done
30275  done
30276IFS=$as_save_IFS
30277
30278  ;;
30279esac
30280fi
30281JAVAH=$ac_cv_path_JAVAH
30282if test -n "$JAVAH"; then
30283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30284$as_echo "$JAVAH" >&6; }
30285else
30286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30287$as_echo "no" >&6; }
30288fi
30289
30290
30291          if test "x$JAVAH" = x; then
30292            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30293          fi
30294        else
30295          # Otherwise we believe it is a complete path. Use it as it is.
30296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30297$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30298          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30299$as_echo_n "checking for JAVAH... " >&6; }
30300          if test ! -x "$tool_specified"; then
30301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30302$as_echo "not found" >&6; }
30303            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30304          fi
30305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30306$as_echo "$tool_specified" >&6; }
30307        fi
30308      fi
30309    fi
30310
30311  fi
30312
30313
30314
30315  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30316
30317  # Publish this variable in the help.
30318
30319
30320  if [ -z "${JAR+x}" ]; then
30321    # The variable is not set by user, try to locate tool using the code snippet
30322
30323      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30324$as_echo_n "checking for jar in Boot JDK... " >&6; }
30325      JAR=$BOOT_JDK/bin/jar
30326      if test ! -x $JAR; then
30327        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30328$as_echo "not found" >&6; }
30329        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30330$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30331        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30332      fi
30333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30334$as_echo "ok" >&6; }
30335
30336
30337  else
30338    # The variable is set, but is it from the command line or the environment?
30339
30340    # Try to remove the string !JAR! from our list.
30341    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30342    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30343      # If it failed, the variable was not from the command line. Ignore it,
30344      # but warn the user (except for BASH, which is always set by the calling BASH).
30345      if test "xJAR" != xBASH; then
30346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30347$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30348      fi
30349      # Try to locate tool using the code snippet
30350
30351      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30352$as_echo_n "checking for jar in Boot JDK... " >&6; }
30353      JAR=$BOOT_JDK/bin/jar
30354      if test ! -x $JAR; then
30355        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30356$as_echo "not found" >&6; }
30357        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30358$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30359        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30360      fi
30361      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30362$as_echo "ok" >&6; }
30363
30364
30365    else
30366      # If it succeeded, then it was overridden by the user. We will use it
30367      # for the tool.
30368
30369      # First remove it from the list of overridden variables, so we can test
30370      # for unknown variables in the end.
30371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30372
30373      # Check if we try to supply an empty value
30374      if test "x$JAR" = x; then
30375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30376$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30378$as_echo_n "checking for JAR... " >&6; }
30379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30380$as_echo "disabled" >&6; }
30381      else
30382        # Check if the provided tool contains a complete path.
30383        tool_specified="$JAR"
30384        tool_basename="${tool_specified##*/}"
30385        if test "x$tool_basename" = "x$tool_specified"; then
30386          # A command without a complete path is provided, search $PATH.
30387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30388$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30389          # Extract the first word of "$tool_basename", so it can be a program name with args.
30390set dummy $tool_basename; ac_word=$2
30391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30392$as_echo_n "checking for $ac_word... " >&6; }
30393if ${ac_cv_path_JAR+:} false; then :
30394  $as_echo_n "(cached) " >&6
30395else
30396  case $JAR in
30397  [\\/]* | ?:[\\/]*)
30398  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30399  ;;
30400  *)
30401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30402for as_dir in $PATH
30403do
30404  IFS=$as_save_IFS
30405  test -z "$as_dir" && as_dir=.
30406    for ac_exec_ext in '' $ac_executable_extensions; do
30407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30408    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30410    break 2
30411  fi
30412done
30413  done
30414IFS=$as_save_IFS
30415
30416  ;;
30417esac
30418fi
30419JAR=$ac_cv_path_JAR
30420if test -n "$JAR"; then
30421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30422$as_echo "$JAR" >&6; }
30423else
30424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30425$as_echo "no" >&6; }
30426fi
30427
30428
30429          if test "x$JAR" = x; then
30430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30431          fi
30432        else
30433          # Otherwise we believe it is a complete path. Use it as it is.
30434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30435$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30437$as_echo_n "checking for JAR... " >&6; }
30438          if test ! -x "$tool_specified"; then
30439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30440$as_echo "not found" >&6; }
30441            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30442          fi
30443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30444$as_echo "$tool_specified" >&6; }
30445        fi
30446      fi
30447    fi
30448
30449  fi
30450
30451
30452
30453  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30454
30455  # Publish this variable in the help.
30456
30457
30458  if [ -z "${JARSIGNER+x}" ]; then
30459    # The variable is not set by user, try to locate tool using the code snippet
30460
30461      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30462$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30463      JARSIGNER=$BOOT_JDK/bin/jarsigner
30464      if test ! -x $JARSIGNER; then
30465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30466$as_echo "not found" >&6; }
30467        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30468$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30469        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30470      fi
30471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30472$as_echo "ok" >&6; }
30473
30474
30475  else
30476    # The variable is set, but is it from the command line or the environment?
30477
30478    # Try to remove the string !JARSIGNER! from our list.
30479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30481      # If it failed, the variable was not from the command line. Ignore it,
30482      # but warn the user (except for BASH, which is always set by the calling BASH).
30483      if test "xJARSIGNER" != xBASH; then
30484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30485$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30486      fi
30487      # Try to locate tool using the code snippet
30488
30489      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30490$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30491      JARSIGNER=$BOOT_JDK/bin/jarsigner
30492      if test ! -x $JARSIGNER; then
30493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30494$as_echo "not found" >&6; }
30495        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30496$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30497        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30498      fi
30499      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30500$as_echo "ok" >&6; }
30501
30502
30503    else
30504      # If it succeeded, then it was overridden by the user. We will use it
30505      # for the tool.
30506
30507      # First remove it from the list of overridden variables, so we can test
30508      # for unknown variables in the end.
30509      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30510
30511      # Check if we try to supply an empty value
30512      if test "x$JARSIGNER" = x; then
30513        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30514$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30516$as_echo_n "checking for JARSIGNER... " >&6; }
30517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30518$as_echo "disabled" >&6; }
30519      else
30520        # Check if the provided tool contains a complete path.
30521        tool_specified="$JARSIGNER"
30522        tool_basename="${tool_specified##*/}"
30523        if test "x$tool_basename" = "x$tool_specified"; then
30524          # A command without a complete path is provided, search $PATH.
30525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30526$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30527          # Extract the first word of "$tool_basename", so it can be a program name with args.
30528set dummy $tool_basename; ac_word=$2
30529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30530$as_echo_n "checking for $ac_word... " >&6; }
30531if ${ac_cv_path_JARSIGNER+:} false; then :
30532  $as_echo_n "(cached) " >&6
30533else
30534  case $JARSIGNER in
30535  [\\/]* | ?:[\\/]*)
30536  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30537  ;;
30538  *)
30539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30540for as_dir in $PATH
30541do
30542  IFS=$as_save_IFS
30543  test -z "$as_dir" && as_dir=.
30544    for ac_exec_ext in '' $ac_executable_extensions; do
30545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30546    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30548    break 2
30549  fi
30550done
30551  done
30552IFS=$as_save_IFS
30553
30554  ;;
30555esac
30556fi
30557JARSIGNER=$ac_cv_path_JARSIGNER
30558if test -n "$JARSIGNER"; then
30559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30560$as_echo "$JARSIGNER" >&6; }
30561else
30562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30563$as_echo "no" >&6; }
30564fi
30565
30566
30567          if test "x$JARSIGNER" = x; then
30568            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30569          fi
30570        else
30571          # Otherwise we believe it is a complete path. Use it as it is.
30572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30573$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30574          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30575$as_echo_n "checking for JARSIGNER... " >&6; }
30576          if test ! -x "$tool_specified"; then
30577            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30578$as_echo "not found" >&6; }
30579            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30580          fi
30581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30582$as_echo "$tool_specified" >&6; }
30583        fi
30584      fi
30585    fi
30586
30587  fi
30588
30589
30590
30591  # Finally, set some other options...
30592
30593  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30594  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30595
30596
30597
30598  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30599  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30600  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30601  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30602  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30603  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30604    dummy="$dummy -Xpatch:foo=bar"
30605    JVM_ARG_OK=true
30606  else
30607    $ECHO "Arg failed:" >&5
30608    $ECHO "$OUTPUT" >&5
30609    JVM_ARG_OK=false
30610  fi
30611
30612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30613$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30614  if test "x$JVM_ARG_OK" = "xtrue"; then
30615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30616$as_echo "yes" >&6; }
30617    BOOT_JDK_MODULAR="true"
30618  else
30619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30620$as_echo "no" >&6; }
30621    BOOT_JDK_MODULAR="false"
30622  fi
30623
30624
30625
30626
30627  # Check if the boot jdk is 32 or 64 bit
30628  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30629    BOOT_JDK_BITS="64"
30630  else
30631    BOOT_JDK_BITS="32"
30632  fi
30633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30634$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30636$as_echo "$BOOT_JDK_BITS" >&6; }
30637
30638
30639
30640
30641# Check whether --with-build-jdk was given.
30642if test "${with_build_jdk+set}" = set; then :
30643  withval=$with_build_jdk;
30644fi
30645
30646
30647  CREATE_BUILDJDK=false
30648  EXTERNAL_BUILDJDK=false
30649  BUILD_JDK_FOUND="no"
30650  if test "x$with_build_jdk" != "x"; then
30651
30652  if test "x$BUILD_JDK_FOUND" = xno; then
30653    # Execute the test
30654
30655       if test "x$with_build_jdk" != x; then
30656         BUILD_JDK=$with_build_jdk
30657         BUILD_JDK_FOUND=maybe
30658         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30659$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30660       fi
30661
30662    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30663    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30664      # Do we have a bin/java?
30665      if test ! -x "$BUILD_JDK/bin/java"; then
30666        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30667$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30668        BUILD_JDK_FOUND=no
30669      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30671$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30672        BUILD_JDK_FOUND=no
30673      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30674        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30675$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30676        BUILD_JDK_FOUND=no
30677      elif test ! -x "$BUILD_JDK/bin/javac"; then
30678        # Do we have a bin/javac?
30679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30680$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30681        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30682$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30683        BUILD_JDK_FOUND=no
30684      else
30685        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30686        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30687
30688        # Extra M4 quote needed to protect [] in grep expression.
30689        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30690        if test "x$FOUND_CORRECT_VERSION" = x; then
30691          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30692$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30693          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30694$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30695          BUILD_JDK_FOUND=no
30696        else
30697          # We're done!
30698          BUILD_JDK_FOUND=yes
30699
30700  # Only process if variable expands to non-empty
30701
30702  if test "x$BUILD_JDK" != x; then
30703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30704
30705  # Input might be given as Windows format, start by converting to
30706  # unix format.
30707  path="$BUILD_JDK"
30708  new_path=`$CYGPATH -u "$path"`
30709
30710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30713  # "foo.exe" is OK but "foo" is an error.
30714  #
30715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30716  # It is also a way to make sure we got the proper file name for the real test later on.
30717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30718  if test "x$test_shortpath" = x; then
30719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30720$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30721    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30722  fi
30723
30724  # Call helper function which possibly converts this using DOS-style short mode.
30725  # If so, the updated path is stored in $new_path.
30726
30727  input_path="$new_path"
30728  # Check if we need to convert this using DOS-style short mode. If the path
30729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30730  # take no chances and rewrite it.
30731  # Note: m4 eats our [], so we need to use [ and ] instead.
30732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30733  if test "x$has_forbidden_chars" != x; then
30734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30738      # Going to short mode and back again did indeed matter. Since short mode is
30739      # case insensitive, let's make it lowercase to improve readability.
30740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30741      # Now convert it back to Unix-style (cygpath)
30742      input_path=`$CYGPATH -u "$shortmode_path"`
30743      new_path="$input_path"
30744    fi
30745  fi
30746
30747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30748  if test "x$test_cygdrive_prefix" = x; then
30749    # As a simple fix, exclude /usr/bin since it's not a real path.
30750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30752      # a path prefixed by /cygdrive for fixpath to work.
30753      new_path="$CYGWIN_ROOT_PATH$input_path"
30754    fi
30755  fi
30756
30757
30758  if test "x$path" != "x$new_path"; then
30759    BUILD_JDK="$new_path"
30760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30761$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30762  fi
30763
30764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30765
30766  path="$BUILD_JDK"
30767  has_colon=`$ECHO $path | $GREP ^.:`
30768  new_path="$path"
30769  if test "x$has_colon" = x; then
30770    # Not in mixed or Windows style, start by that.
30771    new_path=`cmd //c echo $path`
30772  fi
30773
30774
30775  input_path="$new_path"
30776  # Check if we need to convert this using DOS-style short mode. If the path
30777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30778  # take no chances and rewrite it.
30779  # Note: m4 eats our [], so we need to use [ and ] instead.
30780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30781  if test "x$has_forbidden_chars" != x; then
30782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30784  fi
30785
30786
30787  windows_path="$new_path"
30788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30789    unix_path=`$CYGPATH -u "$windows_path"`
30790    new_path="$unix_path"
30791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30793    new_path="$unix_path"
30794  fi
30795
30796  if test "x$path" != "x$new_path"; then
30797    BUILD_JDK="$new_path"
30798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30799$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30800  fi
30801
30802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30804
30805    else
30806      # We're on a unix platform. Hooray! :)
30807      path="$BUILD_JDK"
30808      has_space=`$ECHO "$path" | $GREP " "`
30809      if test "x$has_space" != x; then
30810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30811$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30812        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30813      fi
30814
30815      # Use eval to expand a potential ~
30816      eval path="$path"
30817      if test ! -f "$path" && test ! -d "$path"; then
30818        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30819      fi
30820
30821      if test -d "$path"; then
30822        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30823      else
30824        dir="`$DIRNAME "$path"`"
30825        base="`$BASENAME "$path"`"
30826        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30827      fi
30828    fi
30829  fi
30830
30831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30832$as_echo_n "checking for Build JDK... " >&6; }
30833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30834$as_echo "$BUILD_JDK" >&6; }
30835          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30836$as_echo_n "checking Build JDK version... " >&6; }
30837          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30839$as_echo "$BUILD_JDK_VERSION" >&6; }
30840        fi # end check jdk version
30841      fi # end check java
30842    fi # end check build jdk found
30843  fi
30844
30845    EXTERNAL_BUILDJDK=true
30846  else
30847    if test "x$COMPILE_TYPE" = "xcross"; then
30848      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30849      BUILD_JDK_FOUND=yes
30850      CREATE_BUILDJDK=true
30851      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30852$as_echo_n "checking for Build JDK... " >&6; }
30853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30854$as_echo "yes, will build it for the host platform" >&6; }
30855    else
30856      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30857      BUILD_JDK_FOUND=yes
30858      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30859$as_echo_n "checking for Build JDK... " >&6; }
30860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30861$as_echo "yes, will use output dir" >&6; }
30862    fi
30863  fi
30864
30865  JMOD="$BUILD_JDK/bin/jmod"
30866  JLINK="$BUILD_JDK/bin/jlink"
30867
30868
30869
30870  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30872$as_echo_n "checking for Build JDK... " >&6; }
30873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30874$as_echo "no" >&6; }
30875    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30876  fi
30877
30878
30879
30880
30881
30882
30883###############################################################################
30884#
30885# Configure the sources to use. We can add or override individual directories.
30886#
30887###############################################################################
30888
30889
30890  # Where are the sources.
30891  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30892  CORBA_TOPDIR="$SRC_ROOT/corba"
30893  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30894  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30895  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30896  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30897  JDK_TOPDIR="$SRC_ROOT/jdk"
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907  # This feature is no longer supported.
30908
30909
30910
30911# Check whether --with-add-source-root was given.
30912if test "${with_add_source_root+set}" = set; then :
30913  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
30914$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30915fi
30916
30917
30918
30919
30920# Check whether --with-override-source-root was given.
30921if test "${with_override_source_root+set}" = set; then :
30922  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
30923$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30924fi
30925
30926
30927
30928
30929# Check whether --with-adds-and-overrides was given.
30930if test "${with_adds_and_overrides+set}" = set; then :
30931  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
30932$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30933fi
30934
30935
30936
30937
30938# Check whether --with-override-langtools was given.
30939if test "${with_override_langtools+set}" = set; then :
30940  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30941$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30942fi
30943
30944
30945
30946
30947# Check whether --with-override-corba was given.
30948if test "${with_override_corba+set}" = set; then :
30949  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30950$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30951fi
30952
30953
30954
30955
30956# Check whether --with-override-jaxp was given.
30957if test "${with_override_jaxp+set}" = set; then :
30958  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30959$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30960fi
30961
30962
30963
30964
30965# Check whether --with-override-jaxws was given.
30966if test "${with_override_jaxws+set}" = set; then :
30967  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30968$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30969fi
30970
30971
30972
30973
30974# Check whether --with-override-hotspot was given.
30975if test "${with_override_hotspot+set}" = set; then :
30976  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30977$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30978fi
30979
30980
30981
30982
30983# Check whether --with-override-nashorn was given.
30984if test "${with_override_nashorn+set}" = set; then :
30985  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30986$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30987fi
30988
30989
30990
30991
30992# Check whether --with-override-jdk was given.
30993if test "${with_override_jdk+set}" = set; then :
30994  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30995$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30996fi
30997
30998
30999
31000
31001  BUILD_OUTPUT="$OUTPUT_ROOT"
31002
31003
31004  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31005  BUILD_HOTSPOT=true
31006
31007
31008
31009# Check whether --with-import-hotspot was given.
31010if test "${with_import_hotspot+set}" = set; then :
31011  withval=$with_import_hotspot;
31012fi
31013
31014  if test "x$with_import_hotspot" != x; then
31015    CURDIR="$PWD"
31016    cd "$with_import_hotspot"
31017    HOTSPOT_DIST="`pwd`"
31018    cd "$CURDIR"
31019    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31020      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31021    fi
31022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31023$as_echo_n "checking if hotspot should be imported... " >&6; }
31024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31025$as_echo "yes from $HOTSPOT_DIST" >&6; }
31026    BUILD_HOTSPOT=false
31027  fi
31028
31029  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31030
31031
31032
31033
31034# Check whether --with-import-modules was given.
31035if test "${with_import_modules+set}" = set; then :
31036  withval=$with_import_modules;
31037fi
31038
31039
31040  if test "x$with_import_modules" != x \
31041      && test "x$with_import_modules" != "xno"; then
31042    if test -d "$with_import_modules"; then
31043      IMPORT_MODULES_TOPDIR="$with_import_modules"
31044
31045  # Only process if variable expands to non-empty
31046
31047  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31048    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31049
31050  # Input might be given as Windows format, start by converting to
31051  # unix format.
31052  path="$IMPORT_MODULES_TOPDIR"
31053  new_path=`$CYGPATH -u "$path"`
31054
31055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31058  # "foo.exe" is OK but "foo" is an error.
31059  #
31060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31061  # It is also a way to make sure we got the proper file name for the real test later on.
31062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31063  if test "x$test_shortpath" = x; then
31064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31065$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31066    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31067  fi
31068
31069  # Call helper function which possibly converts this using DOS-style short mode.
31070  # If so, the updated path is stored in $new_path.
31071
31072  input_path="$new_path"
31073  # Check if we need to convert this using DOS-style short mode. If the path
31074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31075  # take no chances and rewrite it.
31076  # Note: m4 eats our [], so we need to use [ and ] instead.
31077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31078  if test "x$has_forbidden_chars" != x; then
31079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31083      # Going to short mode and back again did indeed matter. Since short mode is
31084      # case insensitive, let's make it lowercase to improve readability.
31085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31086      # Now convert it back to Unix-style (cygpath)
31087      input_path=`$CYGPATH -u "$shortmode_path"`
31088      new_path="$input_path"
31089    fi
31090  fi
31091
31092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31093  if test "x$test_cygdrive_prefix" = x; then
31094    # As a simple fix, exclude /usr/bin since it's not a real path.
31095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31097      # a path prefixed by /cygdrive for fixpath to work.
31098      new_path="$CYGWIN_ROOT_PATH$input_path"
31099    fi
31100  fi
31101
31102
31103  if test "x$path" != "x$new_path"; then
31104    IMPORT_MODULES_TOPDIR="$new_path"
31105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31106$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31107  fi
31108
31109    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31110
31111  path="$IMPORT_MODULES_TOPDIR"
31112  has_colon=`$ECHO $path | $GREP ^.:`
31113  new_path="$path"
31114  if test "x$has_colon" = x; then
31115    # Not in mixed or Windows style, start by that.
31116    new_path=`cmd //c echo $path`
31117  fi
31118
31119
31120  input_path="$new_path"
31121  # Check if we need to convert this using DOS-style short mode. If the path
31122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31123  # take no chances and rewrite it.
31124  # Note: m4 eats our [], so we need to use [ and ] instead.
31125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31126  if test "x$has_forbidden_chars" != x; then
31127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31129  fi
31130
31131
31132  windows_path="$new_path"
31133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31134    unix_path=`$CYGPATH -u "$windows_path"`
31135    new_path="$unix_path"
31136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31138    new_path="$unix_path"
31139  fi
31140
31141  if test "x$path" != "x$new_path"; then
31142    IMPORT_MODULES_TOPDIR="$new_path"
31143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31144$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31145  fi
31146
31147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31149
31150    else
31151      # We're on a unix platform. Hooray! :)
31152      path="$IMPORT_MODULES_TOPDIR"
31153      has_space=`$ECHO "$path" | $GREP " "`
31154      if test "x$has_space" != x; then
31155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31156$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31157        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31158      fi
31159
31160      # Use eval to expand a potential ~
31161      eval path="$path"
31162      if test ! -f "$path" && test ! -d "$path"; then
31163        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31164      fi
31165
31166      if test -d "$path"; then
31167        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31168      else
31169        dir="`$DIRNAME "$path"`"
31170        base="`$BASENAME "$path"`"
31171        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31172      fi
31173    fi
31174  fi
31175
31176    elif test -e "$with_import_modules"; then
31177      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31178      $RM -rf "$IMPORT_MODULES_TOPDIR"
31179      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31180      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31181        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31182      fi
31183    else
31184      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31185    fi
31186  fi
31187
31188  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31189    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31190  fi
31191  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31192    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31193  fi
31194  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31195    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31196  fi
31197  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31198    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31199  fi
31200  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31201    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31202  fi
31203  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31204    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31205  fi
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215###############################################################################
31216#
31217# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31218# native code.
31219#
31220###############################################################################
31221
31222# See if we are doing a complete static build or not
31223
31224  # Check whether --enable-static-build was given.
31225if test "${enable_static_build+set}" = set; then :
31226  enableval=$enable_static_build;
31227fi
31228
31229  STATIC_BUILD=false
31230  if test "x$enable_static_build" = "xyes"; then
31231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31232$as_echo_n "checking if static build is enabled... " >&6; }
31233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31234$as_echo "yes" >&6; }
31235    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31236      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31237    fi
31238    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31239    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31240    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31241    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31242    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31243    STATIC_BUILD=true
31244  elif test "x$enable_static_build" = "xno"; then
31245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31246$as_echo_n "checking if static build is enabled... " >&6; }
31247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31248$as_echo "no" >&6; }
31249  elif test "x$enable_static_build" != "x"; then
31250    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31251  fi
31252
31253
31254
31255
31256# First determine the toolchain type (compiler family)
31257
31258
31259# Check whether --with-toolchain-type was given.
31260if test "${with_toolchain_type+set}" = set; then :
31261  withval=$with_toolchain_type;
31262fi
31263
31264
31265  # Use indirect variable referencing
31266  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31267  VALID_TOOLCHAINS=${!toolchain_var_name}
31268
31269  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31270    if test -n "$XCODEBUILD"; then
31271      # On Mac OS X, default toolchain to clang after Xcode 5
31272      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31273      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31274      if test $? -ne 0; then
31275        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31276      fi
31277      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31278          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31279          $CUT -f 1 -d .`
31280      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31281$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31282      if test $XCODE_MAJOR_VERSION -ge 5; then
31283          DEFAULT_TOOLCHAIN="clang"
31284      else
31285          DEFAULT_TOOLCHAIN="gcc"
31286      fi
31287    else
31288      # If Xcode is not installed, but the command line tools are
31289      # then we can't run xcodebuild. On these systems we should
31290      # default to clang
31291      DEFAULT_TOOLCHAIN="clang"
31292    fi
31293  else
31294    # First toolchain type in the list is the default
31295    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31296  fi
31297
31298  if test "x$with_toolchain_type" = xlist; then
31299    # List all toolchains
31300    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31301$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31302    for toolchain in $VALID_TOOLCHAINS; do
31303      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31304      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31305      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31306    done
31307
31308    exit 0
31309  elif test "x$with_toolchain_type" != x; then
31310    # User override; check that it is valid
31311    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31312      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31313$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31314      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31315$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31316      as_fn_error $? "Cannot continue." "$LINENO" 5
31317    fi
31318    TOOLCHAIN_TYPE=$with_toolchain_type
31319  else
31320    # No flag given, use default
31321    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31322  fi
31323
31324
31325  TOOLCHAIN_CC_BINARY_clang="clang"
31326  TOOLCHAIN_CC_BINARY_gcc="gcc"
31327  TOOLCHAIN_CC_BINARY_microsoft="cl"
31328  TOOLCHAIN_CC_BINARY_solstudio="cc"
31329  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31330
31331  TOOLCHAIN_CXX_BINARY_clang="clang++"
31332  TOOLCHAIN_CXX_BINARY_gcc="g++"
31333  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31334  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31335  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31336
31337  # Use indirect variable referencing
31338  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31339  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31340  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31341  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31342  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31343  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31344  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31345  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31346
31347
31348  # Define filename patterns
31349  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31350    LIBRARY_PREFIX=
31351    SHARED_LIBRARY_SUFFIX='.dll'
31352    STATIC_LIBRARY_SUFFIX='.lib'
31353    SHARED_LIBRARY='$1.dll'
31354    STATIC_LIBRARY='$1.lib'
31355    OBJ_SUFFIX='.obj'
31356    EXE_SUFFIX='.exe'
31357  else
31358    LIBRARY_PREFIX=lib
31359    SHARED_LIBRARY_SUFFIX='.so'
31360    STATIC_LIBRARY_SUFFIX='.a'
31361    SHARED_LIBRARY='lib$1.so'
31362    STATIC_LIBRARY='lib$1.a'
31363    OBJ_SUFFIX='.o'
31364    EXE_SUFFIX=''
31365    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31366      # For full static builds, we're overloading the SHARED_LIBRARY
31367      # variables in order to limit the amount of changes required.
31368      # It would be better to remove SHARED and just use LIBRARY and
31369      # LIBRARY_SUFFIX for libraries that can be built either
31370      # shared or static and use STATIC_* for libraries that are
31371      # always built statically.
31372      if test "x$STATIC_BUILD" = xtrue; then
31373        SHARED_LIBRARY='lib$1.a'
31374        SHARED_LIBRARY_SUFFIX='.a'
31375      else
31376        SHARED_LIBRARY='lib$1.dylib'
31377        SHARED_LIBRARY_SUFFIX='.dylib'
31378      fi
31379    fi
31380  fi
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31392    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31393$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31394  else
31395    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31396$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31397  fi
31398
31399
31400# User supplied flags should be used when configure detects compilers
31401
31402  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31403    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31404$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31405  fi
31406
31407  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31408    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31409$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31410  fi
31411
31412  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31414$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31415  fi
31416
31417
31418# Check whether --with-extra-cflags was given.
31419if test "${with_extra_cflags+set}" = set; then :
31420  withval=$with_extra_cflags;
31421fi
31422
31423
31424
31425# Check whether --with-extra-cxxflags was given.
31426if test "${with_extra_cxxflags+set}" = set; then :
31427  withval=$with_extra_cxxflags;
31428fi
31429
31430
31431
31432# Check whether --with-extra-ldflags was given.
31433if test "${with_extra_ldflags+set}" = set; then :
31434  withval=$with_extra_ldflags;
31435fi
31436
31437
31438  EXTRA_CFLAGS="$with_extra_cflags"
31439  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31440  EXTRA_LDFLAGS="$with_extra_ldflags"
31441
31442  # Hotspot needs these set in their legacy form
31443  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31444  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31445  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455  # The global CFLAGS and LDLAGS variables are used by configure tests and
31456  # should include the extra parameters
31457  CFLAGS="$EXTRA_CFLAGS"
31458  CXXFLAGS="$EXTRA_CXXFLAGS"
31459  LDFLAGS="$EXTRA_LDFLAGS"
31460  CPPFLAGS=""
31461
31462# The sysroot cflags are needed for configure to be able to run the compilers
31463
31464  if test "x$SYSROOT" != "x"; then
31465    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31466      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31467        # Solaris Studio does not have a concept of sysroot. Instead we must
31468        # make sure the default include and lib dirs are appended to each
31469        # compile and link command line. Must also add -I-xbuiltin to enable
31470        # inlining of system functions and intrinsics.
31471        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31472        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31473            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
31474            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
31475      fi
31476    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31477      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31478      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31479    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31480      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31481      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31482    fi
31483    # Propagate the sysroot args to hotspot
31484    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31485    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31486    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31487    # The global CFLAGS and LDFLAGS variables need these for configure to function
31488    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31489    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31490    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31491    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31492  fi
31493
31494  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31495    # We also need -iframework<path>/System/Library/Frameworks
31496    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31497    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31498    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31499    # set this here so it doesn't have to be peppered throughout the forest
31500    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31501    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31502  fi
31503
31504
31505
31506
31507
31508# Then detect the actual binaries needed
31509
31510  # FIXME: Is this needed?
31511  ac_ext=cpp
31512ac_cpp='$CXXCPP $CPPFLAGS'
31513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31516
31517
31518  # Store the CFLAGS etc passed to the configure script.
31519  ORG_CFLAGS="$CFLAGS"
31520  ORG_CXXFLAGS="$CXXFLAGS"
31521
31522  # autoconf magic only relies on PATH, so update it if tools dir is specified
31523  OLD_PATH="$PATH"
31524
31525  # On Windows, we need to detect the visual studio installation first.
31526  # This will change the PATH, but we need to keep that new PATH even
31527  # after toolchain detection is done, since the compiler (on x86) uses
31528  # it for DLL resolution in runtime.
31529  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31530      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31531
31532  # Store path to cygwin link.exe to help excluding it when searching for
31533  # VS linker. This must be done before changing the PATH when looking for VS.
31534  # Extract the first word of "link", so it can be a program name with args.
31535set dummy link; ac_word=$2
31536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31537$as_echo_n "checking for $ac_word... " >&6; }
31538if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31539  $as_echo_n "(cached) " >&6
31540else
31541  case $CYGWIN_LINK in
31542  [\\/]* | ?:[\\/]*)
31543  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31544  ;;
31545  *)
31546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31547for as_dir in $PATH
31548do
31549  IFS=$as_save_IFS
31550  test -z "$as_dir" && as_dir=.
31551    for ac_exec_ext in '' $ac_executable_extensions; do
31552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31553    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31555    break 2
31556  fi
31557done
31558  done
31559IFS=$as_save_IFS
31560
31561  ;;
31562esac
31563fi
31564CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31565if test -n "$CYGWIN_LINK"; then
31566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31567$as_echo "$CYGWIN_LINK" >&6; }
31568else
31569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31570$as_echo "no" >&6; }
31571fi
31572
31573
31574  if test "x$CYGWIN_LINK" != x; then
31575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31576$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31577    "$CYGWIN_LINK" --version > /dev/null
31578    if test $? -eq 0 ; then
31579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31580$as_echo "yes" >&6; }
31581    else
31582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31583$as_echo "no" >&6; }
31584      # This might be the VS linker. Don't exclude it later on.
31585      CYGWIN_LINK=""
31586    fi
31587  fi
31588
31589  # First-hand choice is to locate and run the vsvars bat file.
31590
31591
31592# Check whether --with-toolchain-version was given.
31593if test "${with_toolchain_version+set}" = set; then :
31594  withval=$with_toolchain_version;
31595fi
31596
31597
31598  if test "x$with_toolchain_version" = xlist; then
31599    # List all toolchains
31600    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31601$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31602    for version in $VALID_VS_VERSIONS; do
31603      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31604      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31605    done
31606
31607    exit 0
31608  elif test "x$DEVKIT_VS_VERSION" != x; then
31609    VS_VERSION=$DEVKIT_VS_VERSION
31610    TOOLCHAIN_VERSION=$VS_VERSION
31611    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31612    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31613    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31614    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31615    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31616    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31617
31618    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31619    # can still be exported as INCLUDE for compiler invocations without
31620    # SYSROOT_CFLAGS
31621    OLDIFS="$IFS"
31622    IFS=";"
31623    for i in $DEVKIT_VS_INCLUDE; do
31624      ipath=$i
31625
31626  unix_path="$ipath"
31627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31628    windows_path=`$CYGPATH -m "$unix_path"`
31629    ipath="$windows_path"
31630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31631    windows_path=`cmd //c echo $unix_path`
31632    ipath="$windows_path"
31633  fi
31634
31635      VS_INCLUDE="$VS_INCLUDE;$ipath"
31636    done
31637    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31638    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31639    for i in $DEVKIT_VS_LIB; do
31640      libpath=$i
31641
31642  unix_path="$libpath"
31643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31644    windows_path=`$CYGPATH -m "$unix_path"`
31645    libpath="$windows_path"
31646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31647    windows_path=`cmd //c echo $unix_path`
31648    libpath="$windows_path"
31649  fi
31650
31651      VS_LIB="$VS_LIB;$libpath"
31652    done
31653    IFS="$OLDIFS"
31654
31655    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31656$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31657
31658  elif test "x$with_toolchain_version" != x; then
31659    # User override; check that it is valid
31660    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31661      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31662$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31663      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31664$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31665      as_fn_error $? "Cannot continue." "$LINENO" 5
31666    fi
31667    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31668  else
31669    # No flag given, use default
31670    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31671  fi
31672
31673  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31674
31675  VS_VERSION="$VS_VERSION"
31676  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31677  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31678  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31679  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31680
31681  # When using --with-tools-dir, assume it points to the correct and default
31682  # version of Visual Studio or that --with-toolchain-version was also set.
31683  if test "x$with_tools_dir" != x; then
31684
31685  if test "x$VS_ENV_CMD" = x; then
31686    VS_VERSION="${VS_VERSION}"
31687    VS_BASE="$with_tools_dir/../.."
31688    METHOD="--with-tools-dir"
31689
31690    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31691      VCVARSFILE="vc/bin/vcvars32.bat"
31692    else
31693      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31694    fi
31695
31696
31697  windows_path="$VS_BASE"
31698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31699    unix_path=`$CYGPATH -u "$windows_path"`
31700    VS_BASE="$unix_path"
31701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31703    VS_BASE="$unix_path"
31704  fi
31705
31706    if test -d "$VS_BASE"; then
31707      if test -f "$VS_BASE/$VCVARSFILE"; then
31708        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31709$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31710        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31711        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31712        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31713        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31714      else
31715        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31716$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31717        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31718$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31719      fi
31720    fi
31721  fi
31722
31723
31724  if test "x$VS_ENV_CMD" = x; then
31725    VS_VERSION="${VS_VERSION}"
31726    VS_BASE="$with_tools_dir/../../.."
31727    METHOD="--with-tools-dir"
31728
31729    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31730      VCVARSFILE="vc/bin/vcvars32.bat"
31731    else
31732      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31733    fi
31734
31735
31736  windows_path="$VS_BASE"
31737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31738    unix_path=`$CYGPATH -u "$windows_path"`
31739    VS_BASE="$unix_path"
31740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31742    VS_BASE="$unix_path"
31743  fi
31744
31745    if test -d "$VS_BASE"; then
31746      if test -f "$VS_BASE/$VCVARSFILE"; then
31747        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31748$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31749        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31750        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31751        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31752        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31753      else
31754        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31755$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31756        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31757$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31758      fi
31759    fi
31760  fi
31761
31762    if test "x$VS_ENV_CMD" = x; then
31763      # Having specified an argument which is incorrect will produce an instant failure;
31764      # we should not go on looking
31765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31766$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31767      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31768$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31769      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31770$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31771      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31772    fi
31773  fi
31774
31775  VS_ENV_CMD=""
31776  VS_ENV_ARGS=""
31777
31778  if test "x$VS_COMNTOOLS" != x; then
31779
31780  if test "x$VS_ENV_CMD" = x; then
31781    VS_VERSION="${VS_VERSION}"
31782    VS_BASE="$VS_COMNTOOLS/../.."
31783    METHOD="$VS_COMNTOOLS_VAR variable"
31784
31785    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31786      VCVARSFILE="vc/bin/vcvars32.bat"
31787    else
31788      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31789    fi
31790
31791
31792  windows_path="$VS_BASE"
31793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31794    unix_path=`$CYGPATH -u "$windows_path"`
31795    VS_BASE="$unix_path"
31796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31798    VS_BASE="$unix_path"
31799  fi
31800
31801    if test -d "$VS_BASE"; then
31802      if test -f "$VS_BASE/$VCVARSFILE"; then
31803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31804$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31805        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31806        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31807        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31808        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31809      else
31810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31811$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31812        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31813$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31814      fi
31815    fi
31816  fi
31817
31818  fi
31819  if test "x$PROGRAMFILES" != x; then
31820
31821  if test "x$VS_ENV_CMD" = x; then
31822    VS_VERSION="${VS_VERSION}"
31823    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31824    METHOD="well-known name"
31825
31826    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31827      VCVARSFILE="vc/bin/vcvars32.bat"
31828    else
31829      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31830    fi
31831
31832
31833  windows_path="$VS_BASE"
31834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31835    unix_path=`$CYGPATH -u "$windows_path"`
31836    VS_BASE="$unix_path"
31837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31839    VS_BASE="$unix_path"
31840  fi
31841
31842    if test -d "$VS_BASE"; then
31843      if test -f "$VS_BASE/$VCVARSFILE"; then
31844        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31845$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31846        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31847        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31848        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31849        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31850      else
31851        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31852$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31853        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31854$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31855      fi
31856    fi
31857  fi
31858
31859  fi
31860  # Work around the insanely named ProgramFiles(x86) env variable
31861  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31862  if test "x$PROGRAMFILES_X86" != x; then
31863
31864  if test "x$VS_ENV_CMD" = x; then
31865    VS_VERSION="${VS_VERSION}"
31866    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31867    METHOD="well-known name"
31868
31869    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31870      VCVARSFILE="vc/bin/vcvars32.bat"
31871    else
31872      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31873    fi
31874
31875
31876  windows_path="$VS_BASE"
31877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31878    unix_path=`$CYGPATH -u "$windows_path"`
31879    VS_BASE="$unix_path"
31880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31882    VS_BASE="$unix_path"
31883  fi
31884
31885    if test -d "$VS_BASE"; then
31886      if test -f "$VS_BASE/$VCVARSFILE"; then
31887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31888$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31889        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31890        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31891        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31892        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31893      else
31894        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31895$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31896        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31897$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31898      fi
31899    fi
31900  fi
31901
31902  fi
31903
31904  if test "x$VS_ENV_CMD" = x; then
31905    VS_VERSION="${VS_VERSION}"
31906    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31907    METHOD="well-known name"
31908
31909    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31910      VCVARSFILE="vc/bin/vcvars32.bat"
31911    else
31912      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31913    fi
31914
31915
31916  windows_path="$VS_BASE"
31917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31918    unix_path=`$CYGPATH -u "$windows_path"`
31919    VS_BASE="$unix_path"
31920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31922    VS_BASE="$unix_path"
31923  fi
31924
31925    if test -d "$VS_BASE"; then
31926      if test -f "$VS_BASE/$VCVARSFILE"; then
31927        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31928$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31929        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31930        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31931        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31932        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31933      else
31934        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31935$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31936        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31937$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31938      fi
31939    fi
31940  fi
31941
31942
31943  if test "x$VS_ENV_CMD" = x; then
31944    VS_VERSION="${VS_VERSION}"
31945    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31946    METHOD="well-known name"
31947
31948    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31949      VCVARSFILE="vc/bin/vcvars32.bat"
31950    else
31951      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31952    fi
31953
31954
31955  windows_path="$VS_BASE"
31956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31957    unix_path=`$CYGPATH -u "$windows_path"`
31958    VS_BASE="$unix_path"
31959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31961    VS_BASE="$unix_path"
31962  fi
31963
31964    if test -d "$VS_BASE"; then
31965      if test -f "$VS_BASE/$VCVARSFILE"; then
31966        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31967$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31968        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31969        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31970        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31971        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31972      else
31973        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31974$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31975        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31976$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31977      fi
31978    fi
31979  fi
31980
31981
31982  if test "x$SDK_INSTALL_DIR" != x; then
31983    if test "x$ProgramW6432" != x; then
31984
31985  if test "x$VS_ENV_CMD" = x; then
31986    VS_VERSION="${VS_VERSION}"
31987    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31988    METHOD="well-known name"
31989
31990  windows_path="$WIN_SDK_BASE"
31991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31992    unix_path=`$CYGPATH -u "$windows_path"`
31993    WIN_SDK_BASE="$unix_path"
31994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31996    WIN_SDK_BASE="$unix_path"
31997  fi
31998
31999    if test -d "$WIN_SDK_BASE"; then
32000      # There have been cases of partial or broken SDK installations. A missing
32001      # lib dir is not going to work.
32002      if test ! -d "$WIN_SDK_BASE/lib"; then
32003        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32004$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32005        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32006$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32007      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32008        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32009$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32010        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32011        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32012          VS_ENV_ARGS="/x86"
32013        else
32014          VS_ENV_ARGS="/x64"
32015        fi
32016        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32017        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32018        # TODO: improve detection for other versions of SDK
32019        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32020      else
32021        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32022$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32023        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32024$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32025      fi
32026    fi
32027  fi
32028
32029    fi
32030    if test "x$PROGRAMW6432" != x; then
32031
32032  if test "x$VS_ENV_CMD" = x; then
32033    VS_VERSION="${VS_VERSION}"
32034    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32035    METHOD="well-known name"
32036
32037  windows_path="$WIN_SDK_BASE"
32038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32039    unix_path=`$CYGPATH -u "$windows_path"`
32040    WIN_SDK_BASE="$unix_path"
32041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32043    WIN_SDK_BASE="$unix_path"
32044  fi
32045
32046    if test -d "$WIN_SDK_BASE"; then
32047      # There have been cases of partial or broken SDK installations. A missing
32048      # lib dir is not going to work.
32049      if test ! -d "$WIN_SDK_BASE/lib"; then
32050        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32051$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32052        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32053$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32054      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32055        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32056$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32057        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32058        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32059          VS_ENV_ARGS="/x86"
32060        else
32061          VS_ENV_ARGS="/x64"
32062        fi
32063        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32064        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32065        # TODO: improve detection for other versions of SDK
32066        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32067      else
32068        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32069$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32070        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32071$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32072      fi
32073    fi
32074  fi
32075
32076    fi
32077    if test "x$PROGRAMFILES" != x; then
32078
32079  if test "x$VS_ENV_CMD" = x; then
32080    VS_VERSION="${VS_VERSION}"
32081    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32082    METHOD="well-known name"
32083
32084  windows_path="$WIN_SDK_BASE"
32085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32086    unix_path=`$CYGPATH -u "$windows_path"`
32087    WIN_SDK_BASE="$unix_path"
32088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32090    WIN_SDK_BASE="$unix_path"
32091  fi
32092
32093    if test -d "$WIN_SDK_BASE"; then
32094      # There have been cases of partial or broken SDK installations. A missing
32095      # lib dir is not going to work.
32096      if test ! -d "$WIN_SDK_BASE/lib"; then
32097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32099        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32100$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32101      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32102        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32103$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32104        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32105        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32106          VS_ENV_ARGS="/x86"
32107        else
32108          VS_ENV_ARGS="/x64"
32109        fi
32110        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32111        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32112        # TODO: improve detection for other versions of SDK
32113        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32114      else
32115        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32116$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32117        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32118$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32119      fi
32120    fi
32121  fi
32122
32123    fi
32124
32125  if test "x$VS_ENV_CMD" = x; then
32126    VS_VERSION="${VS_VERSION}"
32127    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32128    METHOD="well-known name"
32129
32130  windows_path="$WIN_SDK_BASE"
32131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32132    unix_path=`$CYGPATH -u "$windows_path"`
32133    WIN_SDK_BASE="$unix_path"
32134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32136    WIN_SDK_BASE="$unix_path"
32137  fi
32138
32139    if test -d "$WIN_SDK_BASE"; then
32140      # There have been cases of partial or broken SDK installations. A missing
32141      # lib dir is not going to work.
32142      if test ! -d "$WIN_SDK_BASE/lib"; then
32143        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32144$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32145        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32146$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32147      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32148        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32149$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32150        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32151        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32152          VS_ENV_ARGS="/x86"
32153        else
32154          VS_ENV_ARGS="/x64"
32155        fi
32156        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32157        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32158        # TODO: improve detection for other versions of SDK
32159        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32160      else
32161        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32162$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32163        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32164$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32165      fi
32166    fi
32167  fi
32168
32169
32170  if test "x$VS_ENV_CMD" = x; then
32171    VS_VERSION="${VS_VERSION}"
32172    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32173    METHOD="well-known name"
32174
32175  windows_path="$WIN_SDK_BASE"
32176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32177    unix_path=`$CYGPATH -u "$windows_path"`
32178    WIN_SDK_BASE="$unix_path"
32179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32181    WIN_SDK_BASE="$unix_path"
32182  fi
32183
32184    if test -d "$WIN_SDK_BASE"; then
32185      # There have been cases of partial or broken SDK installations. A missing
32186      # lib dir is not going to work.
32187      if test ! -d "$WIN_SDK_BASE/lib"; then
32188        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32189$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32190        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32191$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32192      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32193        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32194$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32195        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32196        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32197          VS_ENV_ARGS="/x86"
32198        else
32199          VS_ENV_ARGS="/x64"
32200        fi
32201        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32202        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32203        # TODO: improve detection for other versions of SDK
32204        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32205      else
32206        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32207$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32208        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32209$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32210      fi
32211    fi
32212  fi
32213
32214  fi
32215
32216    if test "x$VS_ENV_CMD" != x; then
32217      TOOLCHAIN_VERSION=$VS_VERSION
32218      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32219      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32220      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32221      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32222      # The rest of the variables are already evaled while probing
32223      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32224$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32225      break
32226    fi
32227  done
32228
32229
32230  # If we have a devkit, skip all of the below.
32231  if test "x$DEVKIT_VS_VERSION" = x; then
32232    if test "x$VS_ENV_CMD" != x; then
32233      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32234
32235  # Only process if variable expands to non-empty
32236
32237  if test "x$VS_ENV_CMD" != x; then
32238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32239
32240  # First separate the path from the arguments. This will split at the first
32241  # space.
32242  complete="$VS_ENV_CMD"
32243  path="${complete%% *}"
32244  tmp="$complete EOL"
32245  arguments="${tmp#* }"
32246
32247  # Input might be given as Windows format, start by converting to
32248  # unix format.
32249  new_path=`$CYGPATH -u "$path"`
32250
32251  # Now try to locate executable using which
32252  new_path=`$WHICH "$new_path" 2> /dev/null`
32253  # bat and cmd files are not always considered executable in cygwin causing which
32254  # to not find them
32255  if test "x$new_path" = x \
32256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32258    new_path=`$CYGPATH -u "$path"`
32259  fi
32260  if test "x$new_path" = x; then
32261    # Oops. Which didn't find the executable.
32262    # The splitting of arguments from the executable at a space might have been incorrect,
32263    # since paths with space are more likely in Windows. Give it another try with the whole
32264    # argument.
32265    path="$complete"
32266    arguments="EOL"
32267    new_path=`$CYGPATH -u "$path"`
32268    new_path=`$WHICH "$new_path" 2> /dev/null`
32269    # bat and cmd files are not always considered executable in cygwin causing which
32270    # to not find them
32271    if test "x$new_path" = x \
32272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32274      new_path=`$CYGPATH -u "$path"`
32275    fi
32276    if test "x$new_path" = x; then
32277      # It's still not found. Now this is an unrecoverable error.
32278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32279$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32280      has_space=`$ECHO "$complete" | $GREP " "`
32281      if test "x$has_space" != x; then
32282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32284      fi
32285      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32286    fi
32287  fi
32288
32289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32292  # "foo.exe" is OK but "foo" is an error.
32293  #
32294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32295  # It is also a way to make sure we got the proper file name for the real test later on.
32296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32297  if test "x$test_shortpath" = x; then
32298    # Short path failed, file does not exist as specified.
32299    # Try adding .exe or .cmd
32300    if test -f "${new_path}.exe"; then
32301      input_to_shortpath="${new_path}.exe"
32302    elif test -f "${new_path}.cmd"; then
32303      input_to_shortpath="${new_path}.cmd"
32304    else
32305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32306$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32309      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32310    fi
32311  else
32312    input_to_shortpath="$new_path"
32313  fi
32314
32315  # Call helper function which possibly converts this using DOS-style short mode.
32316  # If so, the updated path is stored in $new_path.
32317  new_path="$input_to_shortpath"
32318
32319  input_path="$input_to_shortpath"
32320  # Check if we need to convert this using DOS-style short mode. If the path
32321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32322  # take no chances and rewrite it.
32323  # Note: m4 eats our [], so we need to use [ and ] instead.
32324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32325  if test "x$has_forbidden_chars" != x; then
32326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32330      # Going to short mode and back again did indeed matter. Since short mode is
32331      # case insensitive, let's make it lowercase to improve readability.
32332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32333      # Now convert it back to Unix-style (cygpath)
32334      input_path=`$CYGPATH -u "$shortmode_path"`
32335      new_path="$input_path"
32336    fi
32337  fi
32338
32339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32340  if test "x$test_cygdrive_prefix" = x; then
32341    # As a simple fix, exclude /usr/bin since it's not a real path.
32342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32344      # a path prefixed by /cygdrive for fixpath to work.
32345      new_path="$CYGWIN_ROOT_PATH$input_path"
32346    fi
32347  fi
32348
32349  # remove trailing .exe if any
32350  new_path="${new_path/%.exe/}"
32351
32352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32353
32354  # First separate the path from the arguments. This will split at the first
32355  # space.
32356  complete="$VS_ENV_CMD"
32357  path="${complete%% *}"
32358  tmp="$complete EOL"
32359  arguments="${tmp#* }"
32360
32361  # Input might be given as Windows format, start by converting to
32362  # unix format.
32363  new_path="$path"
32364
32365  windows_path="$new_path"
32366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32367    unix_path=`$CYGPATH -u "$windows_path"`
32368    new_path="$unix_path"
32369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32371    new_path="$unix_path"
32372  fi
32373
32374
32375  # Now try to locate executable using which
32376  new_path=`$WHICH "$new_path" 2> /dev/null`
32377
32378  if test "x$new_path" = x; then
32379    # Oops. Which didn't find the executable.
32380    # The splitting of arguments from the executable at a space might have been incorrect,
32381    # since paths with space are more likely in Windows. Give it another try with the whole
32382    # argument.
32383    path="$complete"
32384    arguments="EOL"
32385    new_path="$path"
32386
32387  windows_path="$new_path"
32388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32389    unix_path=`$CYGPATH -u "$windows_path"`
32390    new_path="$unix_path"
32391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32393    new_path="$unix_path"
32394  fi
32395
32396
32397    new_path=`$WHICH "$new_path" 2> /dev/null`
32398    # bat and cmd files are not always considered executable in MSYS causing which
32399    # to not find them
32400    if test "x$new_path" = x \
32401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32403      new_path="$path"
32404
32405  windows_path="$new_path"
32406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32407    unix_path=`$CYGPATH -u "$windows_path"`
32408    new_path="$unix_path"
32409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32411    new_path="$unix_path"
32412  fi
32413
32414    fi
32415
32416    if test "x$new_path" = x; then
32417      # It's still not found. Now this is an unrecoverable error.
32418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32419$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32420      has_space=`$ECHO "$complete" | $GREP " "`
32421      if test "x$has_space" != x; then
32422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32424      fi
32425      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32426    fi
32427  fi
32428
32429  # Now new_path has a complete unix path to the binary
32430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32431    # Keep paths in /bin as-is, but remove trailing .exe if any
32432    new_path="${new_path/%.exe/}"
32433    # Do not save /bin paths to all_fixpath_prefixes!
32434  else
32435    # Not in mixed or Windows style, start by that.
32436    new_path=`cmd //c echo $new_path`
32437
32438  input_path="$new_path"
32439  # Check if we need to convert this using DOS-style short mode. If the path
32440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32441  # take no chances and rewrite it.
32442  # Note: m4 eats our [], so we need to use [ and ] instead.
32443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32444  if test "x$has_forbidden_chars" != x; then
32445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32447  fi
32448
32449    # Output is in $new_path
32450
32451  windows_path="$new_path"
32452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32453    unix_path=`$CYGPATH -u "$windows_path"`
32454    new_path="$unix_path"
32455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32457    new_path="$unix_path"
32458  fi
32459
32460    # remove trailing .exe if any
32461    new_path="${new_path/%.exe/}"
32462
32463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32465  fi
32466
32467    else
32468      # We're on a unix platform. Hooray! :)
32469      # First separate the path from the arguments. This will split at the first
32470      # space.
32471      complete="$VS_ENV_CMD"
32472      path="${complete%% *}"
32473      tmp="$complete EOL"
32474      arguments="${tmp#* }"
32475
32476      # Cannot rely on the command "which" here since it doesn't always work.
32477      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32478      if test -z "$is_absolute_path"; then
32479        # Path to executable is not absolute. Find it.
32480        IFS_save="$IFS"
32481        IFS=:
32482        for p in $PATH; do
32483          if test -f "$p/$path" && test -x "$p/$path"; then
32484            new_path="$p/$path"
32485            break
32486          fi
32487        done
32488        IFS="$IFS_save"
32489      else
32490        # This is an absolute path, we can use it without further modifications.
32491        new_path="$path"
32492      fi
32493
32494      if test "x$new_path" = x; then
32495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32496$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32497        has_space=`$ECHO "$complete" | $GREP " "`
32498        if test "x$has_space" != x; then
32499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32501        fi
32502        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32503      fi
32504    fi
32505
32506    # Now join together the path and the arguments once again
32507    if test "x$arguments" != xEOL; then
32508      new_complete="$new_path ${arguments% *}"
32509    else
32510      new_complete="$new_path"
32511    fi
32512
32513    if test "x$complete" != "x$new_complete"; then
32514      VS_ENV_CMD="$new_complete"
32515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32516$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32517    fi
32518  fi
32519
32520
32521      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32522      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32523$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32524
32525      # We need to create a couple of temporary files.
32526      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32527      $MKDIR -p $VS_ENV_TMP_DIR
32528
32529      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32530      # Instead create a shell script which will set the relevant variables when run.
32531      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32532
32533  unix_path="$WINPATH_VS_ENV_CMD"
32534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32535    windows_path=`$CYGPATH -m "$unix_path"`
32536    WINPATH_VS_ENV_CMD="$windows_path"
32537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32538    windows_path=`cmd //c echo $unix_path`
32539    WINPATH_VS_ENV_CMD="$windows_path"
32540  fi
32541
32542      WINPATH_BASH="$BASH"
32543
32544  unix_path="$WINPATH_BASH"
32545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32546    windows_path=`$CYGPATH -m "$unix_path"`
32547    WINPATH_BASH="$windows_path"
32548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32549    windows_path=`cmd //c echo $unix_path`
32550    WINPATH_BASH="$windows_path"
32551  fi
32552
32553
32554      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32555      # script (executable by bash) that will setup the important variables.
32556      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32557      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32558      # This will end up something like:
32559      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32560      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32561      # These will end up something like:
32562      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32563      # The trailing space for everyone except PATH is no typo, but is needed due
32564      # to trailing \ in the Windows paths. These will be stripped later.
32565      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32566          >> $EXTRACT_VC_ENV_BAT_FILE
32567      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32568          >> $EXTRACT_VC_ENV_BAT_FILE
32569      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32570          >> $EXTRACT_VC_ENV_BAT_FILE
32571      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32572          >> $EXTRACT_VC_ENV_BAT_FILE
32573      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32574          >> $EXTRACT_VC_ENV_BAT_FILE
32575      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32576          >> $EXTRACT_VC_ENV_BAT_FILE
32577
32578      # Now execute the newly created bat file.
32579      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32580      # Change directory so we don't need to mess with Windows paths in redirects.
32581      cd $VS_ENV_TMP_DIR
32582      cmd /c extract-vs-env.bat | $CAT
32583      cd $CURDIR
32584
32585      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32586        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32587$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32588        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32589$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32590        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32591$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32592        as_fn_error $? "Cannot continue" "$LINENO" 5
32593      fi
32594
32595      # Now set all paths and other env variables. This will allow the rest of
32596      # the configure script to find and run the compiler in the proper way.
32597      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32598$as_echo "$as_me: Setting extracted environment variables" >&6;}
32599      . $VS_ENV_TMP_DIR/set-vs-env.sh
32600      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32601      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32602    else
32603      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32604      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32605$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32606    fi
32607  fi
32608
32609  # At this point, we should have correct variables in the environment, or we can't continue.
32610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32611$as_echo_n "checking for Visual Studio variables... " >&6; }
32612
32613  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32614      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32615    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32616      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32617$as_echo "present but broken" >&6; }
32618      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32619    else
32620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32621$as_echo "ok" >&6; }
32622      # Remove any trailing "\" ";" and " " from the variables.
32623      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32624      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32625      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32626      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32627      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32628      # Remove any paths containing # (typically F#) as that messes up make. This
32629      # is needed if visual studio was installed with F# support.
32630      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32631
32632
32633
32634
32635
32636      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32637      OLDIFS="$IFS"
32638      IFS=";"
32639      for i in $VS_INCLUDE; do
32640        ipath=$i
32641        # Only process non-empty elements
32642        if test "x$ipath" != x; then
32643          IFS="$OLDIFS"
32644          # Check that directory exists before calling fixup_path
32645          testpath=$ipath
32646
32647  windows_path="$testpath"
32648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32649    unix_path=`$CYGPATH -u "$windows_path"`
32650    testpath="$unix_path"
32651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32653    testpath="$unix_path"
32654  fi
32655
32656          if test -d "$testpath"; then
32657
32658  # Only process if variable expands to non-empty
32659
32660  if test "x$ipath" != x; then
32661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32662
32663  # Input might be given as Windows format, start by converting to
32664  # unix format.
32665  path="$ipath"
32666  new_path=`$CYGPATH -u "$path"`
32667
32668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32671  # "foo.exe" is OK but "foo" is an error.
32672  #
32673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32674  # It is also a way to make sure we got the proper file name for the real test later on.
32675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32676  if test "x$test_shortpath" = x; then
32677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32678$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32679    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32680  fi
32681
32682  # Call helper function which possibly converts this using DOS-style short mode.
32683  # If so, the updated path is stored in $new_path.
32684
32685  input_path="$new_path"
32686  # Check if we need to convert this using DOS-style short mode. If the path
32687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32688  # take no chances and rewrite it.
32689  # Note: m4 eats our [], so we need to use [ and ] instead.
32690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32691  if test "x$has_forbidden_chars" != x; then
32692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32696      # Going to short mode and back again did indeed matter. Since short mode is
32697      # case insensitive, let's make it lowercase to improve readability.
32698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32699      # Now convert it back to Unix-style (cygpath)
32700      input_path=`$CYGPATH -u "$shortmode_path"`
32701      new_path="$input_path"
32702    fi
32703  fi
32704
32705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32706  if test "x$test_cygdrive_prefix" = x; then
32707    # As a simple fix, exclude /usr/bin since it's not a real path.
32708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32710      # a path prefixed by /cygdrive for fixpath to work.
32711      new_path="$CYGWIN_ROOT_PATH$input_path"
32712    fi
32713  fi
32714
32715
32716  if test "x$path" != "x$new_path"; then
32717    ipath="$new_path"
32718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32719$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32720  fi
32721
32722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32723
32724  path="$ipath"
32725  has_colon=`$ECHO $path | $GREP ^.:`
32726  new_path="$path"
32727  if test "x$has_colon" = x; then
32728    # Not in mixed or Windows style, start by that.
32729    new_path=`cmd //c echo $path`
32730  fi
32731
32732
32733  input_path="$new_path"
32734  # Check if we need to convert this using DOS-style short mode. If the path
32735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32736  # take no chances and rewrite it.
32737  # Note: m4 eats our [], so we need to use [ and ] instead.
32738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32739  if test "x$has_forbidden_chars" != x; then
32740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32742  fi
32743
32744
32745  windows_path="$new_path"
32746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32747    unix_path=`$CYGPATH -u "$windows_path"`
32748    new_path="$unix_path"
32749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32751    new_path="$unix_path"
32752  fi
32753
32754  if test "x$path" != "x$new_path"; then
32755    ipath="$new_path"
32756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32757$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32758  fi
32759
32760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32762
32763    else
32764      # We're on a unix platform. Hooray! :)
32765      path="$ipath"
32766      has_space=`$ECHO "$path" | $GREP " "`
32767      if test "x$has_space" != x; then
32768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32769$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32771      fi
32772
32773      # Use eval to expand a potential ~
32774      eval path="$path"
32775      if test ! -f "$path" && test ! -d "$path"; then
32776        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32777      fi
32778
32779      if test -d "$path"; then
32780        ipath="`cd "$path"; $THEPWDCMD -L`"
32781      else
32782        dir="`$DIRNAME "$path"`"
32783        base="`$BASENAME "$path"`"
32784        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32785      fi
32786    fi
32787  fi
32788
32789            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32790          fi
32791          IFS=";"
32792        fi
32793      done
32794      # Convert VS_LIB into SYSROOT_LDFLAGS
32795      for i in $VS_LIB; do
32796        libpath=$i
32797        # Only process non-empty elements
32798        if test "x$libpath" != x; then
32799          IFS="$OLDIFS"
32800          # Check that directory exists before calling fixup_path
32801          testpath=$libpath
32802
32803  windows_path="$testpath"
32804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32805    unix_path=`$CYGPATH -u "$windows_path"`
32806    testpath="$unix_path"
32807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32809    testpath="$unix_path"
32810  fi
32811
32812          if test -d "$testpath"; then
32813
32814  # Only process if variable expands to non-empty
32815
32816  if test "x$libpath" != x; then
32817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32818
32819  # Input might be given as Windows format, start by converting to
32820  # unix format.
32821  path="$libpath"
32822  new_path=`$CYGPATH -u "$path"`
32823
32824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32827  # "foo.exe" is OK but "foo" is an error.
32828  #
32829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32830  # It is also a way to make sure we got the proper file name for the real test later on.
32831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32832  if test "x$test_shortpath" = x; then
32833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32834$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32835    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32836  fi
32837
32838  # Call helper function which possibly converts this using DOS-style short mode.
32839  # If so, the updated path is stored in $new_path.
32840
32841  input_path="$new_path"
32842  # Check if we need to convert this using DOS-style short mode. If the path
32843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32844  # take no chances and rewrite it.
32845  # Note: m4 eats our [], so we need to use [ and ] instead.
32846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32847  if test "x$has_forbidden_chars" != x; then
32848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32852      # Going to short mode and back again did indeed matter. Since short mode is
32853      # case insensitive, let's make it lowercase to improve readability.
32854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32855      # Now convert it back to Unix-style (cygpath)
32856      input_path=`$CYGPATH -u "$shortmode_path"`
32857      new_path="$input_path"
32858    fi
32859  fi
32860
32861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32862  if test "x$test_cygdrive_prefix" = x; then
32863    # As a simple fix, exclude /usr/bin since it's not a real path.
32864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32866      # a path prefixed by /cygdrive for fixpath to work.
32867      new_path="$CYGWIN_ROOT_PATH$input_path"
32868    fi
32869  fi
32870
32871
32872  if test "x$path" != "x$new_path"; then
32873    libpath="$new_path"
32874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32875$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32876  fi
32877
32878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32879
32880  path="$libpath"
32881  has_colon=`$ECHO $path | $GREP ^.:`
32882  new_path="$path"
32883  if test "x$has_colon" = x; then
32884    # Not in mixed or Windows style, start by that.
32885    new_path=`cmd //c echo $path`
32886  fi
32887
32888
32889  input_path="$new_path"
32890  # Check if we need to convert this using DOS-style short mode. If the path
32891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32892  # take no chances and rewrite it.
32893  # Note: m4 eats our [], so we need to use [ and ] instead.
32894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32895  if test "x$has_forbidden_chars" != x; then
32896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32898  fi
32899
32900
32901  windows_path="$new_path"
32902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32903    unix_path=`$CYGPATH -u "$windows_path"`
32904    new_path="$unix_path"
32905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32907    new_path="$unix_path"
32908  fi
32909
32910  if test "x$path" != "x$new_path"; then
32911    libpath="$new_path"
32912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32913$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32914  fi
32915
32916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32918
32919    else
32920      # We're on a unix platform. Hooray! :)
32921      path="$libpath"
32922      has_space=`$ECHO "$path" | $GREP " "`
32923      if test "x$has_space" != x; then
32924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32925$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32927      fi
32928
32929      # Use eval to expand a potential ~
32930      eval path="$path"
32931      if test ! -f "$path" && test ! -d "$path"; then
32932        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32933      fi
32934
32935      if test -d "$path"; then
32936        libpath="`cd "$path"; $THEPWDCMD -L`"
32937      else
32938        dir="`$DIRNAME "$path"`"
32939        base="`$BASENAME "$path"`"
32940        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32941      fi
32942    fi
32943  fi
32944
32945            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32946          fi
32947          IFS=";"
32948        fi
32949      done
32950      IFS="$OLDIFS"
32951    fi
32952  else
32953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32954$as_echo "not found" >&6; }
32955
32956    if test "x$VS_ENV_CMD" = x; then
32957      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32958$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32959      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32960$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32961    else
32962      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32963$as_echo "$as_me: Running the extraction script failed." >&6;}
32964    fi
32965    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32966$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32967    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32968$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32969    as_fn_error $? "Cannot continue" "$LINENO" 5
32970  fi
32971
32972    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32973    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32974    PATH="$VS_PATH"
32975    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32976    export INCLUDE="$VS_INCLUDE"
32977    export LIB="$VS_LIB"
32978  else
32979    if test "x$XCODE_VERSION_OUTPUT" != x; then
32980      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32981      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32982      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32983    else
32984      # Currently we do not define this for other toolchains. This might change as the need arise.
32985      TOOLCHAIN_VERSION=
32986    fi
32987  fi
32988
32989
32990  # For solaris we really need solaris tools, and not the GNU equivalent.
32991  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32992  # so add that to path before starting to probe.
32993  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32994  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32995    PATH="/usr/ccs/bin:$PATH"
32996  fi
32997
32998  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32999  # override all other locations.
33000  if test "x$TOOLCHAIN_PATH" != x; then
33001    PATH=$TOOLCHAIN_PATH:$PATH
33002  fi
33003
33004
33005  #
33006  # Setup the compilers (CC and CXX)
33007  #
33008
33009  COMPILER_NAME=C
33010  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33011
33012  if test "x$CC" != x; then
33013    # User has supplied compiler name already, always let that override.
33014    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33015$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33016    if test "x`basename $CC`" = "x$CC"; then
33017      # A command without a complete path is provided, search $PATH.
33018
33019      for ac_prog in $CC
33020do
33021  # Extract the first word of "$ac_prog", so it can be a program name with args.
33022set dummy $ac_prog; ac_word=$2
33023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33024$as_echo_n "checking for $ac_word... " >&6; }
33025if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33026  $as_echo_n "(cached) " >&6
33027else
33028  case $POTENTIAL_CC in
33029  [\\/]* | ?:[\\/]*)
33030  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33031  ;;
33032  *)
33033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33034for as_dir in $PATH
33035do
33036  IFS=$as_save_IFS
33037  test -z "$as_dir" && as_dir=.
33038    for ac_exec_ext in '' $ac_executable_extensions; do
33039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33040    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33042    break 2
33043  fi
33044done
33045  done
33046IFS=$as_save_IFS
33047
33048  ;;
33049esac
33050fi
33051POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33052if test -n "$POTENTIAL_CC"; then
33053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33054$as_echo "$POTENTIAL_CC" >&6; }
33055else
33056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33057$as_echo "no" >&6; }
33058fi
33059
33060
33061  test -n "$POTENTIAL_CC" && break
33062done
33063
33064      if test "x$POTENTIAL_CC" != x; then
33065        CC=$POTENTIAL_CC
33066      else
33067        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33068      fi
33069    else
33070      # Otherwise it might already be a complete path
33071      if test ! -x "$CC"; then
33072        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33073      fi
33074    fi
33075  else
33076    # No user supplied value. Locate compiler ourselves.
33077
33078    # If we are cross compiling, assume cross compilation tools follows the
33079    # cross compilation standard where they are prefixed with the autoconf
33080    # standard name for the target. For example the binary
33081    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33082    # If we are not cross compiling, then the default compiler name will be
33083    # used.
33084
33085    CC=
33086    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33087    # before checking the rest of the PATH.
33088    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33089    # step, this should not be necessary.
33090    if test -n "$TOOLCHAIN_PATH"; then
33091      PATH_save="$PATH"
33092      PATH="$TOOLCHAIN_PATH"
33093      for ac_prog in $SEARCH_LIST
33094do
33095  # Extract the first word of "$ac_prog", so it can be a program name with args.
33096set dummy $ac_prog; ac_word=$2
33097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33098$as_echo_n "checking for $ac_word... " >&6; }
33099if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33100  $as_echo_n "(cached) " >&6
33101else
33102  case $TOOLCHAIN_PATH_CC in
33103  [\\/]* | ?:[\\/]*)
33104  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33105  ;;
33106  *)
33107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33108for as_dir in $PATH
33109do
33110  IFS=$as_save_IFS
33111  test -z "$as_dir" && as_dir=.
33112    for ac_exec_ext in '' $ac_executable_extensions; do
33113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33114    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33116    break 2
33117  fi
33118done
33119  done
33120IFS=$as_save_IFS
33121
33122  ;;
33123esac
33124fi
33125TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33126if test -n "$TOOLCHAIN_PATH_CC"; then
33127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33128$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33129else
33130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33131$as_echo "no" >&6; }
33132fi
33133
33134
33135  test -n "$TOOLCHAIN_PATH_CC" && break
33136done
33137
33138      CC=$TOOLCHAIN_PATH_CC
33139      PATH="$PATH_save"
33140    fi
33141
33142    # AC_PATH_PROGS can't be run multiple times with the same variable,
33143    # so create a new name for this run.
33144    if test "x$CC" = x; then
33145      for ac_prog in $SEARCH_LIST
33146do
33147  # Extract the first word of "$ac_prog", so it can be a program name with args.
33148set dummy $ac_prog; ac_word=$2
33149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33150$as_echo_n "checking for $ac_word... " >&6; }
33151if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33152  $as_echo_n "(cached) " >&6
33153else
33154  case $POTENTIAL_CC in
33155  [\\/]* | ?:[\\/]*)
33156  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33157  ;;
33158  *)
33159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33160for as_dir in $PATH
33161do
33162  IFS=$as_save_IFS
33163  test -z "$as_dir" && as_dir=.
33164    for ac_exec_ext in '' $ac_executable_extensions; do
33165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33166    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33168    break 2
33169  fi
33170done
33171  done
33172IFS=$as_save_IFS
33173
33174  ;;
33175esac
33176fi
33177POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33178if test -n "$POTENTIAL_CC"; then
33179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33180$as_echo "$POTENTIAL_CC" >&6; }
33181else
33182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33183$as_echo "no" >&6; }
33184fi
33185
33186
33187  test -n "$POTENTIAL_CC" && break
33188done
33189
33190      CC=$POTENTIAL_CC
33191    fi
33192
33193    if test "x$CC" = x; then
33194
33195  # Print a helpful message on how to acquire the necessary build dependency.
33196  # devkit is the help tag: freetype, cups, alsa etc
33197  MISSING_DEPENDENCY=devkit
33198
33199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33200    cygwin_help $MISSING_DEPENDENCY
33201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33202    msys_help $MISSING_DEPENDENCY
33203  else
33204    PKGHANDLER_COMMAND=
33205
33206    case $PKGHANDLER in
33207      apt-get)
33208        apt_help     $MISSING_DEPENDENCY ;;
33209      yum)
33210        yum_help     $MISSING_DEPENDENCY ;;
33211      port)
33212        port_help    $MISSING_DEPENDENCY ;;
33213      pkgutil)
33214        pkgutil_help $MISSING_DEPENDENCY ;;
33215      pkgadd)
33216        pkgadd_help  $MISSING_DEPENDENCY ;;
33217    esac
33218
33219    if test "x$PKGHANDLER_COMMAND" != x; then
33220      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33221    fi
33222  fi
33223
33224      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33225    fi
33226  fi
33227
33228  # Now we have a compiler binary in CC. Make sure it's okay.
33229
33230  # Only process if variable expands to non-empty
33231
33232  if test "x$CC" != x; then
33233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33234
33235  # First separate the path from the arguments. This will split at the first
33236  # space.
33237  complete="$CC"
33238  path="${complete%% *}"
33239  tmp="$complete EOL"
33240  arguments="${tmp#* }"
33241
33242  # Input might be given as Windows format, start by converting to
33243  # unix format.
33244  new_path=`$CYGPATH -u "$path"`
33245
33246  # Now try to locate executable using which
33247  new_path=`$WHICH "$new_path" 2> /dev/null`
33248  # bat and cmd files are not always considered executable in cygwin causing which
33249  # to not find them
33250  if test "x$new_path" = x \
33251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33253    new_path=`$CYGPATH -u "$path"`
33254  fi
33255  if test "x$new_path" = x; then
33256    # Oops. Which didn't find the executable.
33257    # The splitting of arguments from the executable at a space might have been incorrect,
33258    # since paths with space are more likely in Windows. Give it another try with the whole
33259    # argument.
33260    path="$complete"
33261    arguments="EOL"
33262    new_path=`$CYGPATH -u "$path"`
33263    new_path=`$WHICH "$new_path" 2> /dev/null`
33264    # bat and cmd files are not always considered executable in cygwin causing which
33265    # to not find them
33266    if test "x$new_path" = x \
33267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33269      new_path=`$CYGPATH -u "$path"`
33270    fi
33271    if test "x$new_path" = x; then
33272      # It's still not found. Now this is an unrecoverable error.
33273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33274$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33275      has_space=`$ECHO "$complete" | $GREP " "`
33276      if test "x$has_space" != x; then
33277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33279      fi
33280      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33281    fi
33282  fi
33283
33284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33287  # "foo.exe" is OK but "foo" is an error.
33288  #
33289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33290  # It is also a way to make sure we got the proper file name for the real test later on.
33291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33292  if test "x$test_shortpath" = x; then
33293    # Short path failed, file does not exist as specified.
33294    # Try adding .exe or .cmd
33295    if test -f "${new_path}.exe"; then
33296      input_to_shortpath="${new_path}.exe"
33297    elif test -f "${new_path}.cmd"; then
33298      input_to_shortpath="${new_path}.cmd"
33299    else
33300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33301$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33304      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33305    fi
33306  else
33307    input_to_shortpath="$new_path"
33308  fi
33309
33310  # Call helper function which possibly converts this using DOS-style short mode.
33311  # If so, the updated path is stored in $new_path.
33312  new_path="$input_to_shortpath"
33313
33314  input_path="$input_to_shortpath"
33315  # Check if we need to convert this using DOS-style short mode. If the path
33316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33317  # take no chances and rewrite it.
33318  # Note: m4 eats our [], so we need to use [ and ] instead.
33319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33320  if test "x$has_forbidden_chars" != x; then
33321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33325      # Going to short mode and back again did indeed matter. Since short mode is
33326      # case insensitive, let's make it lowercase to improve readability.
33327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33328      # Now convert it back to Unix-style (cygpath)
33329      input_path=`$CYGPATH -u "$shortmode_path"`
33330      new_path="$input_path"
33331    fi
33332  fi
33333
33334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33335  if test "x$test_cygdrive_prefix" = x; then
33336    # As a simple fix, exclude /usr/bin since it's not a real path.
33337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33339      # a path prefixed by /cygdrive for fixpath to work.
33340      new_path="$CYGWIN_ROOT_PATH$input_path"
33341    fi
33342  fi
33343
33344  # remove trailing .exe if any
33345  new_path="${new_path/%.exe/}"
33346
33347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33348
33349  # First separate the path from the arguments. This will split at the first
33350  # space.
33351  complete="$CC"
33352  path="${complete%% *}"
33353  tmp="$complete EOL"
33354  arguments="${tmp#* }"
33355
33356  # Input might be given as Windows format, start by converting to
33357  # unix format.
33358  new_path="$path"
33359
33360  windows_path="$new_path"
33361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33362    unix_path=`$CYGPATH -u "$windows_path"`
33363    new_path="$unix_path"
33364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33366    new_path="$unix_path"
33367  fi
33368
33369
33370  # Now try to locate executable using which
33371  new_path=`$WHICH "$new_path" 2> /dev/null`
33372
33373  if test "x$new_path" = x; then
33374    # Oops. Which didn't find the executable.
33375    # The splitting of arguments from the executable at a space might have been incorrect,
33376    # since paths with space are more likely in Windows. Give it another try with the whole
33377    # argument.
33378    path="$complete"
33379    arguments="EOL"
33380    new_path="$path"
33381
33382  windows_path="$new_path"
33383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33384    unix_path=`$CYGPATH -u "$windows_path"`
33385    new_path="$unix_path"
33386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33388    new_path="$unix_path"
33389  fi
33390
33391
33392    new_path=`$WHICH "$new_path" 2> /dev/null`
33393    # bat and cmd files are not always considered executable in MSYS causing which
33394    # to not find them
33395    if test "x$new_path" = x \
33396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33398      new_path="$path"
33399
33400  windows_path="$new_path"
33401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33402    unix_path=`$CYGPATH -u "$windows_path"`
33403    new_path="$unix_path"
33404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33406    new_path="$unix_path"
33407  fi
33408
33409    fi
33410
33411    if test "x$new_path" = x; then
33412      # It's still not found. Now this is an unrecoverable error.
33413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33414$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33415      has_space=`$ECHO "$complete" | $GREP " "`
33416      if test "x$has_space" != x; then
33417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33419      fi
33420      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33421    fi
33422  fi
33423
33424  # Now new_path has a complete unix path to the binary
33425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33426    # Keep paths in /bin as-is, but remove trailing .exe if any
33427    new_path="${new_path/%.exe/}"
33428    # Do not save /bin paths to all_fixpath_prefixes!
33429  else
33430    # Not in mixed or Windows style, start by that.
33431    new_path=`cmd //c echo $new_path`
33432
33433  input_path="$new_path"
33434  # Check if we need to convert this using DOS-style short mode. If the path
33435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33436  # take no chances and rewrite it.
33437  # Note: m4 eats our [], so we need to use [ and ] instead.
33438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33439  if test "x$has_forbidden_chars" != x; then
33440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33442  fi
33443
33444    # Output is in $new_path
33445
33446  windows_path="$new_path"
33447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33448    unix_path=`$CYGPATH -u "$windows_path"`
33449    new_path="$unix_path"
33450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33452    new_path="$unix_path"
33453  fi
33454
33455    # remove trailing .exe if any
33456    new_path="${new_path/%.exe/}"
33457
33458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33460  fi
33461
33462    else
33463      # We're on a unix platform. Hooray! :)
33464      # First separate the path from the arguments. This will split at the first
33465      # space.
33466      complete="$CC"
33467      path="${complete%% *}"
33468      tmp="$complete EOL"
33469      arguments="${tmp#* }"
33470
33471      # Cannot rely on the command "which" here since it doesn't always work.
33472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33473      if test -z "$is_absolute_path"; then
33474        # Path to executable is not absolute. Find it.
33475        IFS_save="$IFS"
33476        IFS=:
33477        for p in $PATH; do
33478          if test -f "$p/$path" && test -x "$p/$path"; then
33479            new_path="$p/$path"
33480            break
33481          fi
33482        done
33483        IFS="$IFS_save"
33484      else
33485        # This is an absolute path, we can use it without further modifications.
33486        new_path="$path"
33487      fi
33488
33489      if test "x$new_path" = x; then
33490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33491$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33492        has_space=`$ECHO "$complete" | $GREP " "`
33493        if test "x$has_space" != x; then
33494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33496        fi
33497        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33498      fi
33499    fi
33500
33501    # Now join together the path and the arguments once again
33502    if test "x$arguments" != xEOL; then
33503      new_complete="$new_path ${arguments% *}"
33504    else
33505      new_complete="$new_path"
33506    fi
33507
33508    if test "x$complete" != "x$new_complete"; then
33509      CC="$new_complete"
33510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33511$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33512    fi
33513  fi
33514
33515  TEST_COMPILER="$CC"
33516
33517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33518$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33519  SYMLINK_ORIGINAL="$TEST_COMPILER"
33520
33521  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33522    # Follow a chain of symbolic links. Use readlink
33523    # where it exists, else fall back to horribly
33524    # complicated shell code.
33525    if test "x$READLINK_TESTED" != yes; then
33526      # On MacOSX there is a readlink tool with a different
33527      # purpose than the GNU readlink tool. Check the found readlink.
33528      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33529      if test "x$ISGNU" = x; then
33530        # A readlink that we do not know how to use.
33531        # Are there other non-GNU readlinks out there?
33532        READLINK_TESTED=yes
33533        READLINK=
33534      fi
33535    fi
33536
33537    if test "x$READLINK" != x; then
33538      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33539    else
33540      # Save the current directory for restoring afterwards
33541      STARTDIR=$PWD
33542      COUNTER=0
33543      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33544      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33545      cd $sym_link_dir
33546      # Use -P flag to resolve symlinks in directories.
33547      cd `$THEPWDCMD -P`
33548      sym_link_dir=`$THEPWDCMD -P`
33549      # Resolve file symlinks
33550      while test $COUNTER -lt 20; do
33551        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33552        if test "x$ISLINK" == x; then
33553          # This is not a symbolic link! We are done!
33554          break
33555        fi
33556        # Again resolve directory symlinks since the target of the just found
33557        # link could be in a different directory
33558        cd `$DIRNAME $ISLINK`
33559        sym_link_dir=`$THEPWDCMD -P`
33560        sym_link_file=`$BASENAME $ISLINK`
33561        let COUNTER=COUNTER+1
33562      done
33563      cd $STARTDIR
33564      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33565    fi
33566  fi
33567
33568  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33570$as_echo "no symlink" >&6; }
33571  else
33572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33573$as_echo "$SYMLINK_ORIGINAL" >&6; }
33574
33575    # We can't handle ccache by gcc wrappers, since we need to know if we're
33576    # using ccache. Instead ccache usage must be controlled by a configure option.
33577    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33578    if test "x$COMPILER_BASENAME" = "xccache"; then
33579      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33580$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33581      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33582    fi
33583  fi
33584
33585
33586  COMPILER=$CC
33587  COMPILER_NAME=$COMPILER_NAME
33588
33589  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33590    # cc -V output typically looks like
33591    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33592    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33593    # Check that this is likely to be the Solaris Studio cc.
33594    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33595    if test $? -ne 0; then
33596      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33597      { $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
33598$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33599      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33600$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33601      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33602$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33603      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33604    fi
33605    # Remove usage instructions (if present), and
33606    # collapse compiler output into a single line
33607    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33608        $SED -e 's/ *[Uu]sage:.*//'`
33609    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33610        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33611  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33612    # xlc -qversion output typically looks like
33613    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33614    #     Version: 11.01.0000.0015
33615    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33616    # Check that this is likely to be the IBM XL C compiler.
33617    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33618    if test $? -ne 0; then
33619      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33620      { $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
33621$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33622      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33623$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33624      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33625$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33626      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33627    fi
33628    # Collapse compiler output into a single line
33629    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33630    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33631        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33632  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33633    # There is no specific version flag, but all output starts with a version string.
33634    # First line typically looks something like:
33635    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33636    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33637    # Check that this is likely to be Microsoft CL.EXE.
33638    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33639    if test $? -ne 0; then
33640      { $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
33641$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33642      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33643$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33644      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33645    fi
33646    # Collapse compiler output into a single line
33647    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33648    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33649        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33650  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33651    # gcc --version output typically looks like
33652    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33653    #     Copyright (C) 2013 Free Software Foundation, Inc.
33654    #     This is free software; see the source for copying conditions.  There is NO
33655    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33656    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33657    # Check that this is likely to be GCC.
33658    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33659    if test $? -ne 0; then
33660      { $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
33661$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33662      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33663$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33664      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33665    fi
33666    # Remove Copyright and legalese from version string, and
33667    # collapse into a single line
33668    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33669        $SED -e 's/ *Copyright .*//'`
33670    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33671        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33672  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33673    # clang --version output typically looks like
33674    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33675    #    clang version 3.3 (tags/RELEASE_33/final)
33676    # or
33677    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33678    #    Target: x86_64-pc-linux-gnu
33679    #    Thread model: posix
33680    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33681    # Check that this is likely to be clang
33682    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33683    if test $? -ne 0; then
33684      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33685$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33686      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33687$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33688      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33689    fi
33690    # Collapse compiler output into a single line
33691    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33692    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33693        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33694  else
33695      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33696  fi
33697  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33698  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33699  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33700  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33701
33702  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33703$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33704
33705
33706  # Now that we have resolved CC ourself, let autoconf have its go at it
33707  ac_ext=c
33708ac_cpp='$CPP $CPPFLAGS'
33709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33711ac_compiler_gnu=$ac_cv_c_compiler_gnu
33712if test -n "$ac_tool_prefix"; then
33713  for ac_prog in $CC
33714  do
33715    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33716set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33718$as_echo_n "checking for $ac_word... " >&6; }
33719if ${ac_cv_prog_CC+:} false; then :
33720  $as_echo_n "(cached) " >&6
33721else
33722  if test -n "$CC"; then
33723  ac_cv_prog_CC="$CC" # Let the user override the test.
33724else
33725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33726for as_dir in $PATH
33727do
33728  IFS=$as_save_IFS
33729  test -z "$as_dir" && as_dir=.
33730    for ac_exec_ext in '' $ac_executable_extensions; do
33731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33732    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33734    break 2
33735  fi
33736done
33737  done
33738IFS=$as_save_IFS
33739
33740fi
33741fi
33742CC=$ac_cv_prog_CC
33743if test -n "$CC"; then
33744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33745$as_echo "$CC" >&6; }
33746else
33747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33748$as_echo "no" >&6; }
33749fi
33750
33751
33752    test -n "$CC" && break
33753  done
33754fi
33755if test -z "$CC"; then
33756  ac_ct_CC=$CC
33757  for ac_prog in $CC
33758do
33759  # Extract the first word of "$ac_prog", so it can be a program name with args.
33760set dummy $ac_prog; ac_word=$2
33761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33762$as_echo_n "checking for $ac_word... " >&6; }
33763if ${ac_cv_prog_ac_ct_CC+:} false; then :
33764  $as_echo_n "(cached) " >&6
33765else
33766  if test -n "$ac_ct_CC"; then
33767  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33768else
33769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33770for as_dir in $PATH
33771do
33772  IFS=$as_save_IFS
33773  test -z "$as_dir" && as_dir=.
33774    for ac_exec_ext in '' $ac_executable_extensions; do
33775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33776    ac_cv_prog_ac_ct_CC="$ac_prog"
33777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33778    break 2
33779  fi
33780done
33781  done
33782IFS=$as_save_IFS
33783
33784fi
33785fi
33786ac_ct_CC=$ac_cv_prog_ac_ct_CC
33787if test -n "$ac_ct_CC"; then
33788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33789$as_echo "$ac_ct_CC" >&6; }
33790else
33791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33792$as_echo "no" >&6; }
33793fi
33794
33795
33796  test -n "$ac_ct_CC" && break
33797done
33798
33799  if test "x$ac_ct_CC" = x; then
33800    CC=""
33801  else
33802    case $cross_compiling:$ac_tool_warned in
33803yes:)
33804{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33805$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33806ac_tool_warned=yes ;;
33807esac
33808    CC=$ac_ct_CC
33809  fi
33810fi
33811
33812
33813test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33814$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33815as_fn_error $? "no acceptable C compiler found in \$PATH
33816See \`config.log' for more details" "$LINENO" 5; }
33817
33818# Provide some information about the compiler.
33819$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33820set X $ac_compile
33821ac_compiler=$2
33822for ac_option in --version -v -V -qversion; do
33823  { { ac_try="$ac_compiler $ac_option >&5"
33824case "(($ac_try" in
33825  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33826  *) ac_try_echo=$ac_try;;
33827esac
33828eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33829$as_echo "$ac_try_echo"; } >&5
33830  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33831  ac_status=$?
33832  if test -s conftest.err; then
33833    sed '10a\
33834... rest of stderr output deleted ...
33835         10q' conftest.err >conftest.er1
33836    cat conftest.er1 >&5
33837  fi
33838  rm -f conftest.er1 conftest.err
33839  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33840  test $ac_status = 0; }
33841done
33842
33843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33844/* end confdefs.h.  */
33845
33846int
33847main ()
33848{
33849
33850  ;
33851  return 0;
33852}
33853_ACEOF
33854ac_clean_files_save=$ac_clean_files
33855ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33856# Try to create an executable without -o first, disregard a.out.
33857# It will help us diagnose broken compilers, and finding out an intuition
33858# of exeext.
33859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33860$as_echo_n "checking whether the C compiler works... " >&6; }
33861ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33862
33863# The possible output files:
33864ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33865
33866ac_rmfiles=
33867for ac_file in $ac_files
33868do
33869  case $ac_file in
33870    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33871    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33872  esac
33873done
33874rm -f $ac_rmfiles
33875
33876if { { ac_try="$ac_link_default"
33877case "(($ac_try" in
33878  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33879  *) ac_try_echo=$ac_try;;
33880esac
33881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33882$as_echo "$ac_try_echo"; } >&5
33883  (eval "$ac_link_default") 2>&5
33884  ac_status=$?
33885  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33886  test $ac_status = 0; }; then :
33887  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33888# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33889# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33890# so that the user can short-circuit this test for compilers unknown to
33891# Autoconf.
33892for ac_file in $ac_files ''
33893do
33894  test -f "$ac_file" || continue
33895  case $ac_file in
33896    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33897	;;
33898    [ab].out )
33899	# We found the default executable, but exeext='' is most
33900	# certainly right.
33901	break;;
33902    *.* )
33903	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33904	then :; else
33905	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33906	fi
33907	# We set ac_cv_exeext here because the later test for it is not
33908	# safe: cross compilers may not add the suffix if given an `-o'
33909	# argument, so we may need to know it at that point already.
33910	# Even if this section looks crufty: it has the advantage of
33911	# actually working.
33912	break;;
33913    * )
33914	break;;
33915  esac
33916done
33917test "$ac_cv_exeext" = no && ac_cv_exeext=
33918
33919else
33920  ac_file=''
33921fi
33922if test -z "$ac_file"; then :
33923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33924$as_echo "no" >&6; }
33925$as_echo "$as_me: failed program was:" >&5
33926sed 's/^/| /' conftest.$ac_ext >&5
33927
33928{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33930as_fn_error 77 "C compiler cannot create executables
33931See \`config.log' for more details" "$LINENO" 5; }
33932else
33933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33934$as_echo "yes" >&6; }
33935fi
33936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33937$as_echo_n "checking for C compiler default output file name... " >&6; }
33938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33939$as_echo "$ac_file" >&6; }
33940ac_exeext=$ac_cv_exeext
33941
33942rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33943ac_clean_files=$ac_clean_files_save
33944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33945$as_echo_n "checking for suffix of executables... " >&6; }
33946if { { ac_try="$ac_link"
33947case "(($ac_try" in
33948  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33949  *) ac_try_echo=$ac_try;;
33950esac
33951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33952$as_echo "$ac_try_echo"; } >&5
33953  (eval "$ac_link") 2>&5
33954  ac_status=$?
33955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33956  test $ac_status = 0; }; then :
33957  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33958# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33959# work properly (i.e., refer to `conftest.exe'), while it won't with
33960# `rm'.
33961for ac_file in conftest.exe conftest conftest.*; do
33962  test -f "$ac_file" || continue
33963  case $ac_file in
33964    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33965    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33966	  break;;
33967    * ) break;;
33968  esac
33969done
33970else
33971  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33973as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33974See \`config.log' for more details" "$LINENO" 5; }
33975fi
33976rm -f conftest conftest$ac_cv_exeext
33977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33978$as_echo "$ac_cv_exeext" >&6; }
33979
33980rm -f conftest.$ac_ext
33981EXEEXT=$ac_cv_exeext
33982ac_exeext=$EXEEXT
33983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33984/* end confdefs.h.  */
33985#include <stdio.h>
33986int
33987main ()
33988{
33989FILE *f = fopen ("conftest.out", "w");
33990 return ferror (f) || fclose (f) != 0;
33991
33992  ;
33993  return 0;
33994}
33995_ACEOF
33996ac_clean_files="$ac_clean_files conftest.out"
33997# Check that the compiler produces executables we can run.  If not, either
33998# the compiler is broken, or we cross compile.
33999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34000$as_echo_n "checking whether we are cross compiling... " >&6; }
34001if test "$cross_compiling" != yes; then
34002  { { ac_try="$ac_link"
34003case "(($ac_try" in
34004  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34005  *) ac_try_echo=$ac_try;;
34006esac
34007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34008$as_echo "$ac_try_echo"; } >&5
34009  (eval "$ac_link") 2>&5
34010  ac_status=$?
34011  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34012  test $ac_status = 0; }
34013  if { ac_try='./conftest$ac_cv_exeext'
34014  { { case "(($ac_try" in
34015  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34016  *) ac_try_echo=$ac_try;;
34017esac
34018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34019$as_echo "$ac_try_echo"; } >&5
34020  (eval "$ac_try") 2>&5
34021  ac_status=$?
34022  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34023  test $ac_status = 0; }; }; then
34024    cross_compiling=no
34025  else
34026    if test "$cross_compiling" = maybe; then
34027	cross_compiling=yes
34028    else
34029	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34031as_fn_error $? "cannot run C compiled programs.
34032If you meant to cross compile, use \`--host'.
34033See \`config.log' for more details" "$LINENO" 5; }
34034    fi
34035  fi
34036fi
34037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34038$as_echo "$cross_compiling" >&6; }
34039
34040rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34041ac_clean_files=$ac_clean_files_save
34042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34043$as_echo_n "checking for suffix of object files... " >&6; }
34044if ${ac_cv_objext+:} false; then :
34045  $as_echo_n "(cached) " >&6
34046else
34047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34048/* end confdefs.h.  */
34049
34050int
34051main ()
34052{
34053
34054  ;
34055  return 0;
34056}
34057_ACEOF
34058rm -f conftest.o conftest.obj
34059if { { ac_try="$ac_compile"
34060case "(($ac_try" in
34061  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34062  *) ac_try_echo=$ac_try;;
34063esac
34064eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34065$as_echo "$ac_try_echo"; } >&5
34066  (eval "$ac_compile") 2>&5
34067  ac_status=$?
34068  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34069  test $ac_status = 0; }; then :
34070  for ac_file in conftest.o conftest.obj conftest.*; do
34071  test -f "$ac_file" || continue;
34072  case $ac_file in
34073    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34074    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34075       break;;
34076  esac
34077done
34078else
34079  $as_echo "$as_me: failed program was:" >&5
34080sed 's/^/| /' conftest.$ac_ext >&5
34081
34082{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34084as_fn_error $? "cannot compute suffix of object files: cannot compile
34085See \`config.log' for more details" "$LINENO" 5; }
34086fi
34087rm -f conftest.$ac_cv_objext conftest.$ac_ext
34088fi
34089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34090$as_echo "$ac_cv_objext" >&6; }
34091OBJEXT=$ac_cv_objext
34092ac_objext=$OBJEXT
34093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34094$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34095if ${ac_cv_c_compiler_gnu+:} false; then :
34096  $as_echo_n "(cached) " >&6
34097else
34098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34099/* end confdefs.h.  */
34100
34101int
34102main ()
34103{
34104#ifndef __GNUC__
34105       choke me
34106#endif
34107
34108  ;
34109  return 0;
34110}
34111_ACEOF
34112if ac_fn_c_try_compile "$LINENO"; then :
34113  ac_compiler_gnu=yes
34114else
34115  ac_compiler_gnu=no
34116fi
34117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34118ac_cv_c_compiler_gnu=$ac_compiler_gnu
34119
34120fi
34121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34122$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34123if test $ac_compiler_gnu = yes; then
34124  GCC=yes
34125else
34126  GCC=
34127fi
34128ac_test_CFLAGS=${CFLAGS+set}
34129ac_save_CFLAGS=$CFLAGS
34130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34131$as_echo_n "checking whether $CC accepts -g... " >&6; }
34132if ${ac_cv_prog_cc_g+:} false; then :
34133  $as_echo_n "(cached) " >&6
34134else
34135  ac_save_c_werror_flag=$ac_c_werror_flag
34136   ac_c_werror_flag=yes
34137   ac_cv_prog_cc_g=no
34138   CFLAGS="-g"
34139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34140/* end confdefs.h.  */
34141
34142int
34143main ()
34144{
34145
34146  ;
34147  return 0;
34148}
34149_ACEOF
34150if ac_fn_c_try_compile "$LINENO"; then :
34151  ac_cv_prog_cc_g=yes
34152else
34153  CFLAGS=""
34154      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34155/* end confdefs.h.  */
34156
34157int
34158main ()
34159{
34160
34161  ;
34162  return 0;
34163}
34164_ACEOF
34165if ac_fn_c_try_compile "$LINENO"; then :
34166
34167else
34168  ac_c_werror_flag=$ac_save_c_werror_flag
34169	 CFLAGS="-g"
34170	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34171/* end confdefs.h.  */
34172
34173int
34174main ()
34175{
34176
34177  ;
34178  return 0;
34179}
34180_ACEOF
34181if ac_fn_c_try_compile "$LINENO"; then :
34182  ac_cv_prog_cc_g=yes
34183fi
34184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34185fi
34186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34187fi
34188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34189   ac_c_werror_flag=$ac_save_c_werror_flag
34190fi
34191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34192$as_echo "$ac_cv_prog_cc_g" >&6; }
34193if test "$ac_test_CFLAGS" = set; then
34194  CFLAGS=$ac_save_CFLAGS
34195elif test $ac_cv_prog_cc_g = yes; then
34196  if test "$GCC" = yes; then
34197    CFLAGS="-g -O2"
34198  else
34199    CFLAGS="-g"
34200  fi
34201else
34202  if test "$GCC" = yes; then
34203    CFLAGS="-O2"
34204  else
34205    CFLAGS=
34206  fi
34207fi
34208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34209$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34210if ${ac_cv_prog_cc_c89+:} false; then :
34211  $as_echo_n "(cached) " >&6
34212else
34213  ac_cv_prog_cc_c89=no
34214ac_save_CC=$CC
34215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34216/* end confdefs.h.  */
34217#include <stdarg.h>
34218#include <stdio.h>
34219struct stat;
34220/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34221struct buf { int x; };
34222FILE * (*rcsopen) (struct buf *, struct stat *, int);
34223static char *e (p, i)
34224     char **p;
34225     int i;
34226{
34227  return p[i];
34228}
34229static char *f (char * (*g) (char **, int), char **p, ...)
34230{
34231  char *s;
34232  va_list v;
34233  va_start (v,p);
34234  s = g (p, va_arg (v,int));
34235  va_end (v);
34236  return s;
34237}
34238
34239/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34240   function prototypes and stuff, but not '\xHH' hex character constants.
34241   These don't provoke an error unfortunately, instead are silently treated
34242   as 'x'.  The following induces an error, until -std is added to get
34243   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34244   array size at least.  It's necessary to write '\x00'==0 to get something
34245   that's true only with -std.  */
34246int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34247
34248/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34249   inside strings and character constants.  */
34250#define FOO(x) 'x'
34251int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34252
34253int test (int i, double x);
34254struct s1 {int (*f) (int a);};
34255struct s2 {int (*f) (double a);};
34256int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34257int argc;
34258char **argv;
34259int
34260main ()
34261{
34262return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34263  ;
34264  return 0;
34265}
34266_ACEOF
34267for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34268	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34269do
34270  CC="$ac_save_CC $ac_arg"
34271  if ac_fn_c_try_compile "$LINENO"; then :
34272  ac_cv_prog_cc_c89=$ac_arg
34273fi
34274rm -f core conftest.err conftest.$ac_objext
34275  test "x$ac_cv_prog_cc_c89" != "xno" && break
34276done
34277rm -f conftest.$ac_ext
34278CC=$ac_save_CC
34279
34280fi
34281# AC_CACHE_VAL
34282case "x$ac_cv_prog_cc_c89" in
34283  x)
34284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34285$as_echo "none needed" >&6; } ;;
34286  xno)
34287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34288$as_echo "unsupported" >&6; } ;;
34289  *)
34290    CC="$CC $ac_cv_prog_cc_c89"
34291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34292$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34293esac
34294if test "x$ac_cv_prog_cc_c89" != xno; then :
34295
34296fi
34297
34298ac_ext=cpp
34299ac_cpp='$CXXCPP $CPPFLAGS'
34300ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34301ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34302ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34303
34304
34305
34306  COMPILER_NAME=C++
34307  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34308
34309  if test "x$CXX" != x; then
34310    # User has supplied compiler name already, always let that override.
34311    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34312$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34313    if test "x`basename $CXX`" = "x$CXX"; then
34314      # A command without a complete path is provided, search $PATH.
34315
34316      for ac_prog in $CXX
34317do
34318  # Extract the first word of "$ac_prog", so it can be a program name with args.
34319set dummy $ac_prog; ac_word=$2
34320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34321$as_echo_n "checking for $ac_word... " >&6; }
34322if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34323  $as_echo_n "(cached) " >&6
34324else
34325  case $POTENTIAL_CXX in
34326  [\\/]* | ?:[\\/]*)
34327  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34328  ;;
34329  *)
34330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34331for as_dir in $PATH
34332do
34333  IFS=$as_save_IFS
34334  test -z "$as_dir" && as_dir=.
34335    for ac_exec_ext in '' $ac_executable_extensions; do
34336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34337    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34339    break 2
34340  fi
34341done
34342  done
34343IFS=$as_save_IFS
34344
34345  ;;
34346esac
34347fi
34348POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34349if test -n "$POTENTIAL_CXX"; then
34350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34351$as_echo "$POTENTIAL_CXX" >&6; }
34352else
34353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34354$as_echo "no" >&6; }
34355fi
34356
34357
34358  test -n "$POTENTIAL_CXX" && break
34359done
34360
34361      if test "x$POTENTIAL_CXX" != x; then
34362        CXX=$POTENTIAL_CXX
34363      else
34364        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34365      fi
34366    else
34367      # Otherwise it might already be a complete path
34368      if test ! -x "$CXX"; then
34369        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34370      fi
34371    fi
34372  else
34373    # No user supplied value. Locate compiler ourselves.
34374
34375    # If we are cross compiling, assume cross compilation tools follows the
34376    # cross compilation standard where they are prefixed with the autoconf
34377    # standard name for the target. For example the binary
34378    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34379    # If we are not cross compiling, then the default compiler name will be
34380    # used.
34381
34382    CXX=
34383    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34384    # before checking the rest of the PATH.
34385    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34386    # step, this should not be necessary.
34387    if test -n "$TOOLCHAIN_PATH"; then
34388      PATH_save="$PATH"
34389      PATH="$TOOLCHAIN_PATH"
34390      for ac_prog in $SEARCH_LIST
34391do
34392  # Extract the first word of "$ac_prog", so it can be a program name with args.
34393set dummy $ac_prog; ac_word=$2
34394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34395$as_echo_n "checking for $ac_word... " >&6; }
34396if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34397  $as_echo_n "(cached) " >&6
34398else
34399  case $TOOLCHAIN_PATH_CXX in
34400  [\\/]* | ?:[\\/]*)
34401  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34402  ;;
34403  *)
34404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34405for as_dir in $PATH
34406do
34407  IFS=$as_save_IFS
34408  test -z "$as_dir" && as_dir=.
34409    for ac_exec_ext in '' $ac_executable_extensions; do
34410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34411    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34413    break 2
34414  fi
34415done
34416  done
34417IFS=$as_save_IFS
34418
34419  ;;
34420esac
34421fi
34422TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34423if test -n "$TOOLCHAIN_PATH_CXX"; then
34424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34425$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34426else
34427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34428$as_echo "no" >&6; }
34429fi
34430
34431
34432  test -n "$TOOLCHAIN_PATH_CXX" && break
34433done
34434
34435      CXX=$TOOLCHAIN_PATH_CXX
34436      PATH="$PATH_save"
34437    fi
34438
34439    # AC_PATH_PROGS can't be run multiple times with the same variable,
34440    # so create a new name for this run.
34441    if test "x$CXX" = x; then
34442      for ac_prog in $SEARCH_LIST
34443do
34444  # Extract the first word of "$ac_prog", so it can be a program name with args.
34445set dummy $ac_prog; ac_word=$2
34446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34447$as_echo_n "checking for $ac_word... " >&6; }
34448if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34449  $as_echo_n "(cached) " >&6
34450else
34451  case $POTENTIAL_CXX in
34452  [\\/]* | ?:[\\/]*)
34453  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34454  ;;
34455  *)
34456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34457for as_dir in $PATH
34458do
34459  IFS=$as_save_IFS
34460  test -z "$as_dir" && as_dir=.
34461    for ac_exec_ext in '' $ac_executable_extensions; do
34462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34463    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34465    break 2
34466  fi
34467done
34468  done
34469IFS=$as_save_IFS
34470
34471  ;;
34472esac
34473fi
34474POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34475if test -n "$POTENTIAL_CXX"; then
34476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34477$as_echo "$POTENTIAL_CXX" >&6; }
34478else
34479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34480$as_echo "no" >&6; }
34481fi
34482
34483
34484  test -n "$POTENTIAL_CXX" && break
34485done
34486
34487      CXX=$POTENTIAL_CXX
34488    fi
34489
34490    if test "x$CXX" = x; then
34491
34492  # Print a helpful message on how to acquire the necessary build dependency.
34493  # devkit is the help tag: freetype, cups, alsa etc
34494  MISSING_DEPENDENCY=devkit
34495
34496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34497    cygwin_help $MISSING_DEPENDENCY
34498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34499    msys_help $MISSING_DEPENDENCY
34500  else
34501    PKGHANDLER_COMMAND=
34502
34503    case $PKGHANDLER in
34504      apt-get)
34505        apt_help     $MISSING_DEPENDENCY ;;
34506      yum)
34507        yum_help     $MISSING_DEPENDENCY ;;
34508      port)
34509        port_help    $MISSING_DEPENDENCY ;;
34510      pkgutil)
34511        pkgutil_help $MISSING_DEPENDENCY ;;
34512      pkgadd)
34513        pkgadd_help  $MISSING_DEPENDENCY ;;
34514    esac
34515
34516    if test "x$PKGHANDLER_COMMAND" != x; then
34517      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34518    fi
34519  fi
34520
34521      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34522    fi
34523  fi
34524
34525  # Now we have a compiler binary in CXX. Make sure it's okay.
34526
34527  # Only process if variable expands to non-empty
34528
34529  if test "x$CXX" != x; then
34530    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34531
34532  # First separate the path from the arguments. This will split at the first
34533  # space.
34534  complete="$CXX"
34535  path="${complete%% *}"
34536  tmp="$complete EOL"
34537  arguments="${tmp#* }"
34538
34539  # Input might be given as Windows format, start by converting to
34540  # unix format.
34541  new_path=`$CYGPATH -u "$path"`
34542
34543  # Now try to locate executable using which
34544  new_path=`$WHICH "$new_path" 2> /dev/null`
34545  # bat and cmd files are not always considered executable in cygwin causing which
34546  # to not find them
34547  if test "x$new_path" = x \
34548      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34549      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34550    new_path=`$CYGPATH -u "$path"`
34551  fi
34552  if test "x$new_path" = x; then
34553    # Oops. Which didn't find the executable.
34554    # The splitting of arguments from the executable at a space might have been incorrect,
34555    # since paths with space are more likely in Windows. Give it another try with the whole
34556    # argument.
34557    path="$complete"
34558    arguments="EOL"
34559    new_path=`$CYGPATH -u "$path"`
34560    new_path=`$WHICH "$new_path" 2> /dev/null`
34561    # bat and cmd files are not always considered executable in cygwin causing which
34562    # to not find them
34563    if test "x$new_path" = x \
34564        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34565        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34566      new_path=`$CYGPATH -u "$path"`
34567    fi
34568    if test "x$new_path" = x; then
34569      # It's still not found. Now this is an unrecoverable error.
34570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34571$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34572      has_space=`$ECHO "$complete" | $GREP " "`
34573      if test "x$has_space" != x; then
34574        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34575$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34576      fi
34577      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34578    fi
34579  fi
34580
34581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34584  # "foo.exe" is OK but "foo" is an error.
34585  #
34586  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34587  # It is also a way to make sure we got the proper file name for the real test later on.
34588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34589  if test "x$test_shortpath" = x; then
34590    # Short path failed, file does not exist as specified.
34591    # Try adding .exe or .cmd
34592    if test -f "${new_path}.exe"; then
34593      input_to_shortpath="${new_path}.exe"
34594    elif test -f "${new_path}.cmd"; then
34595      input_to_shortpath="${new_path}.cmd"
34596    else
34597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34598$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34599      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34600$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34601      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34602    fi
34603  else
34604    input_to_shortpath="$new_path"
34605  fi
34606
34607  # Call helper function which possibly converts this using DOS-style short mode.
34608  # If so, the updated path is stored in $new_path.
34609  new_path="$input_to_shortpath"
34610
34611  input_path="$input_to_shortpath"
34612  # Check if we need to convert this using DOS-style short mode. If the path
34613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34614  # take no chances and rewrite it.
34615  # Note: m4 eats our [], so we need to use [ and ] instead.
34616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34617  if test "x$has_forbidden_chars" != x; then
34618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34622      # Going to short mode and back again did indeed matter. Since short mode is
34623      # case insensitive, let's make it lowercase to improve readability.
34624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34625      # Now convert it back to Unix-style (cygpath)
34626      input_path=`$CYGPATH -u "$shortmode_path"`
34627      new_path="$input_path"
34628    fi
34629  fi
34630
34631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34632  if test "x$test_cygdrive_prefix" = x; then
34633    # As a simple fix, exclude /usr/bin since it's not a real path.
34634    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34636      # a path prefixed by /cygdrive for fixpath to work.
34637      new_path="$CYGWIN_ROOT_PATH$input_path"
34638    fi
34639  fi
34640
34641  # remove trailing .exe if any
34642  new_path="${new_path/%.exe/}"
34643
34644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34645
34646  # First separate the path from the arguments. This will split at the first
34647  # space.
34648  complete="$CXX"
34649  path="${complete%% *}"
34650  tmp="$complete EOL"
34651  arguments="${tmp#* }"
34652
34653  # Input might be given as Windows format, start by converting to
34654  # unix format.
34655  new_path="$path"
34656
34657  windows_path="$new_path"
34658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34659    unix_path=`$CYGPATH -u "$windows_path"`
34660    new_path="$unix_path"
34661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34663    new_path="$unix_path"
34664  fi
34665
34666
34667  # Now try to locate executable using which
34668  new_path=`$WHICH "$new_path" 2> /dev/null`
34669
34670  if test "x$new_path" = x; then
34671    # Oops. Which didn't find the executable.
34672    # The splitting of arguments from the executable at a space might have been incorrect,
34673    # since paths with space are more likely in Windows. Give it another try with the whole
34674    # argument.
34675    path="$complete"
34676    arguments="EOL"
34677    new_path="$path"
34678
34679  windows_path="$new_path"
34680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34681    unix_path=`$CYGPATH -u "$windows_path"`
34682    new_path="$unix_path"
34683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34685    new_path="$unix_path"
34686  fi
34687
34688
34689    new_path=`$WHICH "$new_path" 2> /dev/null`
34690    # bat and cmd files are not always considered executable in MSYS causing which
34691    # to not find them
34692    if test "x$new_path" = x \
34693        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34694        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34695      new_path="$path"
34696
34697  windows_path="$new_path"
34698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34699    unix_path=`$CYGPATH -u "$windows_path"`
34700    new_path="$unix_path"
34701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34703    new_path="$unix_path"
34704  fi
34705
34706    fi
34707
34708    if test "x$new_path" = x; then
34709      # It's still not found. Now this is an unrecoverable error.
34710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34711$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34712      has_space=`$ECHO "$complete" | $GREP " "`
34713      if test "x$has_space" != x; then
34714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34716      fi
34717      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34718    fi
34719  fi
34720
34721  # Now new_path has a complete unix path to the binary
34722  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34723    # Keep paths in /bin as-is, but remove trailing .exe if any
34724    new_path="${new_path/%.exe/}"
34725    # Do not save /bin paths to all_fixpath_prefixes!
34726  else
34727    # Not in mixed or Windows style, start by that.
34728    new_path=`cmd //c echo $new_path`
34729
34730  input_path="$new_path"
34731  # Check if we need to convert this using DOS-style short mode. If the path
34732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34733  # take no chances and rewrite it.
34734  # Note: m4 eats our [], so we need to use [ and ] instead.
34735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34736  if test "x$has_forbidden_chars" != x; then
34737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34739  fi
34740
34741    # Output is in $new_path
34742
34743  windows_path="$new_path"
34744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34745    unix_path=`$CYGPATH -u "$windows_path"`
34746    new_path="$unix_path"
34747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34749    new_path="$unix_path"
34750  fi
34751
34752    # remove trailing .exe if any
34753    new_path="${new_path/%.exe/}"
34754
34755    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34756    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34757  fi
34758
34759    else
34760      # We're on a unix platform. Hooray! :)
34761      # First separate the path from the arguments. This will split at the first
34762      # space.
34763      complete="$CXX"
34764      path="${complete%% *}"
34765      tmp="$complete EOL"
34766      arguments="${tmp#* }"
34767
34768      # Cannot rely on the command "which" here since it doesn't always work.
34769      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34770      if test -z "$is_absolute_path"; then
34771        # Path to executable is not absolute. Find it.
34772        IFS_save="$IFS"
34773        IFS=:
34774        for p in $PATH; do
34775          if test -f "$p/$path" && test -x "$p/$path"; then
34776            new_path="$p/$path"
34777            break
34778          fi
34779        done
34780        IFS="$IFS_save"
34781      else
34782        # This is an absolute path, we can use it without further modifications.
34783        new_path="$path"
34784      fi
34785
34786      if test "x$new_path" = x; then
34787        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34788$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34789        has_space=`$ECHO "$complete" | $GREP " "`
34790        if test "x$has_space" != x; then
34791          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34792$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34793        fi
34794        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34795      fi
34796    fi
34797
34798    # Now join together the path and the arguments once again
34799    if test "x$arguments" != xEOL; then
34800      new_complete="$new_path ${arguments% *}"
34801    else
34802      new_complete="$new_path"
34803    fi
34804
34805    if test "x$complete" != "x$new_complete"; then
34806      CXX="$new_complete"
34807      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34808$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34809    fi
34810  fi
34811
34812  TEST_COMPILER="$CXX"
34813
34814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34815$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34816  SYMLINK_ORIGINAL="$TEST_COMPILER"
34817
34818  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34819    # Follow a chain of symbolic links. Use readlink
34820    # where it exists, else fall back to horribly
34821    # complicated shell code.
34822    if test "x$READLINK_TESTED" != yes; then
34823      # On MacOSX there is a readlink tool with a different
34824      # purpose than the GNU readlink tool. Check the found readlink.
34825      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34826      if test "x$ISGNU" = x; then
34827        # A readlink that we do not know how to use.
34828        # Are there other non-GNU readlinks out there?
34829        READLINK_TESTED=yes
34830        READLINK=
34831      fi
34832    fi
34833
34834    if test "x$READLINK" != x; then
34835      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34836    else
34837      # Save the current directory for restoring afterwards
34838      STARTDIR=$PWD
34839      COUNTER=0
34840      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34841      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34842      cd $sym_link_dir
34843      # Use -P flag to resolve symlinks in directories.
34844      cd `$THEPWDCMD -P`
34845      sym_link_dir=`$THEPWDCMD -P`
34846      # Resolve file symlinks
34847      while test $COUNTER -lt 20; do
34848        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34849        if test "x$ISLINK" == x; then
34850          # This is not a symbolic link! We are done!
34851          break
34852        fi
34853        # Again resolve directory symlinks since the target of the just found
34854        # link could be in a different directory
34855        cd `$DIRNAME $ISLINK`
34856        sym_link_dir=`$THEPWDCMD -P`
34857        sym_link_file=`$BASENAME $ISLINK`
34858        let COUNTER=COUNTER+1
34859      done
34860      cd $STARTDIR
34861      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34862    fi
34863  fi
34864
34865  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34867$as_echo "no symlink" >&6; }
34868  else
34869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34870$as_echo "$SYMLINK_ORIGINAL" >&6; }
34871
34872    # We can't handle ccache by gcc wrappers, since we need to know if we're
34873    # using ccache. Instead ccache usage must be controlled by a configure option.
34874    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34875    if test "x$COMPILER_BASENAME" = "xccache"; then
34876      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34877$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34878      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34879    fi
34880  fi
34881
34882
34883  COMPILER=$CXX
34884  COMPILER_NAME=$COMPILER_NAME
34885
34886  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34887    # cc -V output typically looks like
34888    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34889    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34890    # Check that this is likely to be the Solaris Studio cc.
34891    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34892    if test $? -ne 0; then
34893      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34894      { $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
34895$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34896      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34897$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34898      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34899$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34900      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34901    fi
34902    # Remove usage instructions (if present), and
34903    # collapse compiler output into a single line
34904    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34905        $SED -e 's/ *[Uu]sage:.*//'`
34906    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34907        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34908  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34909    # xlc -qversion output typically looks like
34910    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34911    #     Version: 11.01.0000.0015
34912    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34913    # Check that this is likely to be the IBM XL C compiler.
34914    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34915    if test $? -ne 0; then
34916      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34917      { $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
34918$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34919      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34920$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34921      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34922$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34923      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34924    fi
34925    # Collapse compiler output into a single line
34926    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34927    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34928        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34929  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34930    # There is no specific version flag, but all output starts with a version string.
34931    # First line typically looks something like:
34932    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34933    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34934    # Check that this is likely to be Microsoft CL.EXE.
34935    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34936    if test $? -ne 0; then
34937      { $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
34938$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34939      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34940$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34941      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34942    fi
34943    # Collapse compiler output into a single line
34944    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34945    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34946        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34947  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34948    # gcc --version output typically looks like
34949    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34950    #     Copyright (C) 2013 Free Software Foundation, Inc.
34951    #     This is free software; see the source for copying conditions.  There is NO
34952    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34953    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34954    # Check that this is likely to be GCC.
34955    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34956    if test $? -ne 0; then
34957      { $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
34958$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34959      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34960$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34961      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34962    fi
34963    # Remove Copyright and legalese from version string, and
34964    # collapse into a single line
34965    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34966        $SED -e 's/ *Copyright .*//'`
34967    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34968        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34969  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34970    # clang --version output typically looks like
34971    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34972    #    clang version 3.3 (tags/RELEASE_33/final)
34973    # or
34974    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34975    #    Target: x86_64-pc-linux-gnu
34976    #    Thread model: posix
34977    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34978    # Check that this is likely to be clang
34979    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34980    if test $? -ne 0; then
34981      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34982$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34983      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34984$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34985      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34986    fi
34987    # Collapse compiler output into a single line
34988    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34989    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34990        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34991  else
34992      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34993  fi
34994  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34995  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34996  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34997  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34998
34999  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35000$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35001
35002
35003  # Now that we have resolved CXX ourself, let autoconf have its go at it
35004  ac_ext=cpp
35005ac_cpp='$CXXCPP $CPPFLAGS'
35006ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35007ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35008ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35009if test -z "$CXX"; then
35010  if test -n "$CCC"; then
35011    CXX=$CCC
35012  else
35013    if test -n "$ac_tool_prefix"; then
35014  for ac_prog in $CXX
35015  do
35016    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35017set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35019$as_echo_n "checking for $ac_word... " >&6; }
35020if ${ac_cv_prog_CXX+:} false; then :
35021  $as_echo_n "(cached) " >&6
35022else
35023  if test -n "$CXX"; then
35024  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35025else
35026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35027for as_dir in $PATH
35028do
35029  IFS=$as_save_IFS
35030  test -z "$as_dir" && as_dir=.
35031    for ac_exec_ext in '' $ac_executable_extensions; do
35032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35033    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35035    break 2
35036  fi
35037done
35038  done
35039IFS=$as_save_IFS
35040
35041fi
35042fi
35043CXX=$ac_cv_prog_CXX
35044if test -n "$CXX"; then
35045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35046$as_echo "$CXX" >&6; }
35047else
35048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35049$as_echo "no" >&6; }
35050fi
35051
35052
35053    test -n "$CXX" && break
35054  done
35055fi
35056if test -z "$CXX"; then
35057  ac_ct_CXX=$CXX
35058  for ac_prog in $CXX
35059do
35060  # Extract the first word of "$ac_prog", so it can be a program name with args.
35061set dummy $ac_prog; ac_word=$2
35062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35063$as_echo_n "checking for $ac_word... " >&6; }
35064if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35065  $as_echo_n "(cached) " >&6
35066else
35067  if test -n "$ac_ct_CXX"; then
35068  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35069else
35070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35071for as_dir in $PATH
35072do
35073  IFS=$as_save_IFS
35074  test -z "$as_dir" && as_dir=.
35075    for ac_exec_ext in '' $ac_executable_extensions; do
35076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35077    ac_cv_prog_ac_ct_CXX="$ac_prog"
35078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35079    break 2
35080  fi
35081done
35082  done
35083IFS=$as_save_IFS
35084
35085fi
35086fi
35087ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35088if test -n "$ac_ct_CXX"; then
35089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35090$as_echo "$ac_ct_CXX" >&6; }
35091else
35092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35093$as_echo "no" >&6; }
35094fi
35095
35096
35097  test -n "$ac_ct_CXX" && break
35098done
35099
35100  if test "x$ac_ct_CXX" = x; then
35101    CXX="g++"
35102  else
35103    case $cross_compiling:$ac_tool_warned in
35104yes:)
35105{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35106$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35107ac_tool_warned=yes ;;
35108esac
35109    CXX=$ac_ct_CXX
35110  fi
35111fi
35112
35113  fi
35114fi
35115# Provide some information about the compiler.
35116$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35117set X $ac_compile
35118ac_compiler=$2
35119for ac_option in --version -v -V -qversion; do
35120  { { ac_try="$ac_compiler $ac_option >&5"
35121case "(($ac_try" in
35122  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35123  *) ac_try_echo=$ac_try;;
35124esac
35125eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35126$as_echo "$ac_try_echo"; } >&5
35127  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35128  ac_status=$?
35129  if test -s conftest.err; then
35130    sed '10a\
35131... rest of stderr output deleted ...
35132         10q' conftest.err >conftest.er1
35133    cat conftest.er1 >&5
35134  fi
35135  rm -f conftest.er1 conftest.err
35136  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35137  test $ac_status = 0; }
35138done
35139
35140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35141$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35142if ${ac_cv_cxx_compiler_gnu+:} false; then :
35143  $as_echo_n "(cached) " >&6
35144else
35145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35146/* end confdefs.h.  */
35147
35148int
35149main ()
35150{
35151#ifndef __GNUC__
35152       choke me
35153#endif
35154
35155  ;
35156  return 0;
35157}
35158_ACEOF
35159if ac_fn_cxx_try_compile "$LINENO"; then :
35160  ac_compiler_gnu=yes
35161else
35162  ac_compiler_gnu=no
35163fi
35164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35165ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35166
35167fi
35168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35169$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35170if test $ac_compiler_gnu = yes; then
35171  GXX=yes
35172else
35173  GXX=
35174fi
35175ac_test_CXXFLAGS=${CXXFLAGS+set}
35176ac_save_CXXFLAGS=$CXXFLAGS
35177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35178$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35179if ${ac_cv_prog_cxx_g+:} false; then :
35180  $as_echo_n "(cached) " >&6
35181else
35182  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35183   ac_cxx_werror_flag=yes
35184   ac_cv_prog_cxx_g=no
35185   CXXFLAGS="-g"
35186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35187/* end confdefs.h.  */
35188
35189int
35190main ()
35191{
35192
35193  ;
35194  return 0;
35195}
35196_ACEOF
35197if ac_fn_cxx_try_compile "$LINENO"; then :
35198  ac_cv_prog_cxx_g=yes
35199else
35200  CXXFLAGS=""
35201      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35202/* end confdefs.h.  */
35203
35204int
35205main ()
35206{
35207
35208  ;
35209  return 0;
35210}
35211_ACEOF
35212if ac_fn_cxx_try_compile "$LINENO"; then :
35213
35214else
35215  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35216	 CXXFLAGS="-g"
35217	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35218/* end confdefs.h.  */
35219
35220int
35221main ()
35222{
35223
35224  ;
35225  return 0;
35226}
35227_ACEOF
35228if ac_fn_cxx_try_compile "$LINENO"; then :
35229  ac_cv_prog_cxx_g=yes
35230fi
35231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35232fi
35233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35234fi
35235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35236   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35237fi
35238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35239$as_echo "$ac_cv_prog_cxx_g" >&6; }
35240if test "$ac_test_CXXFLAGS" = set; then
35241  CXXFLAGS=$ac_save_CXXFLAGS
35242elif test $ac_cv_prog_cxx_g = yes; then
35243  if test "$GXX" = yes; then
35244    CXXFLAGS="-g -O2"
35245  else
35246    CXXFLAGS="-g"
35247  fi
35248else
35249  if test "$GXX" = yes; then
35250    CXXFLAGS="-O2"
35251  else
35252    CXXFLAGS=
35253  fi
35254fi
35255ac_ext=cpp
35256ac_cpp='$CXXCPP $CPPFLAGS'
35257ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35258ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35259ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35260
35261
35262  # This is the compiler version number on the form X.Y[.Z]
35263
35264
35265
35266
35267  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35268    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35269$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35270    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35271$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35272  fi
35273
35274  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35275  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35276    { $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
35277$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;}
35278  fi
35279
35280  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35281    { $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
35282$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35283  fi
35284
35285  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35286
35287
35288  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338    # Execute function body
35339
35340  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35341  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35342
35343  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35344    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35345  fi
35346
35347  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35348    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35349  fi
35350
35351  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35352  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35353
35354  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35355    :
35356
35357  else
35358    :
35359
35360          { $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
35361$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35362
35363
35364  fi
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379  fi
35380
35381  #
35382  # Setup the preprocessor (CPP and CXXCPP)
35383  #
35384  ac_ext=c
35385ac_cpp='$CPP $CPPFLAGS'
35386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35388ac_compiler_gnu=$ac_cv_c_compiler_gnu
35389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35390$as_echo_n "checking how to run the C preprocessor... " >&6; }
35391# On Suns, sometimes $CPP names a directory.
35392if test -n "$CPP" && test -d "$CPP"; then
35393  CPP=
35394fi
35395if test -z "$CPP"; then
35396  if ${ac_cv_prog_CPP+:} false; then :
35397  $as_echo_n "(cached) " >&6
35398else
35399      # Double quotes because CPP needs to be expanded
35400    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35401    do
35402      ac_preproc_ok=false
35403for ac_c_preproc_warn_flag in '' yes
35404do
35405  # Use a header file that comes with gcc, so configuring glibc
35406  # with a fresh cross-compiler works.
35407  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35408  # <limits.h> exists even on freestanding compilers.
35409  # On the NeXT, cc -E runs the code through the compiler's parser,
35410  # not just through cpp. "Syntax error" is here to catch this case.
35411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35412/* end confdefs.h.  */
35413#ifdef __STDC__
35414# include <limits.h>
35415#else
35416# include <assert.h>
35417#endif
35418		     Syntax error
35419_ACEOF
35420if ac_fn_c_try_cpp "$LINENO"; then :
35421
35422else
35423  # Broken: fails on valid input.
35424continue
35425fi
35426rm -f conftest.err conftest.i conftest.$ac_ext
35427
35428  # OK, works on sane cases.  Now check whether nonexistent headers
35429  # can be detected and how.
35430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35431/* end confdefs.h.  */
35432#include <ac_nonexistent.h>
35433_ACEOF
35434if ac_fn_c_try_cpp "$LINENO"; then :
35435  # Broken: success on invalid input.
35436continue
35437else
35438  # Passes both tests.
35439ac_preproc_ok=:
35440break
35441fi
35442rm -f conftest.err conftest.i conftest.$ac_ext
35443
35444done
35445# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35446rm -f conftest.i conftest.err conftest.$ac_ext
35447if $ac_preproc_ok; then :
35448  break
35449fi
35450
35451    done
35452    ac_cv_prog_CPP=$CPP
35453
35454fi
35455  CPP=$ac_cv_prog_CPP
35456else
35457  ac_cv_prog_CPP=$CPP
35458fi
35459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35460$as_echo "$CPP" >&6; }
35461ac_preproc_ok=false
35462for ac_c_preproc_warn_flag in '' yes
35463do
35464  # Use a header file that comes with gcc, so configuring glibc
35465  # with a fresh cross-compiler works.
35466  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35467  # <limits.h> exists even on freestanding compilers.
35468  # On the NeXT, cc -E runs the code through the compiler's parser,
35469  # not just through cpp. "Syntax error" is here to catch this case.
35470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35471/* end confdefs.h.  */
35472#ifdef __STDC__
35473# include <limits.h>
35474#else
35475# include <assert.h>
35476#endif
35477		     Syntax error
35478_ACEOF
35479if ac_fn_c_try_cpp "$LINENO"; then :
35480
35481else
35482  # Broken: fails on valid input.
35483continue
35484fi
35485rm -f conftest.err conftest.i conftest.$ac_ext
35486
35487  # OK, works on sane cases.  Now check whether nonexistent headers
35488  # can be detected and how.
35489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35490/* end confdefs.h.  */
35491#include <ac_nonexistent.h>
35492_ACEOF
35493if ac_fn_c_try_cpp "$LINENO"; then :
35494  # Broken: success on invalid input.
35495continue
35496else
35497  # Passes both tests.
35498ac_preproc_ok=:
35499break
35500fi
35501rm -f conftest.err conftest.i conftest.$ac_ext
35502
35503done
35504# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35505rm -f conftest.i conftest.err conftest.$ac_ext
35506if $ac_preproc_ok; then :
35507
35508else
35509  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35510$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35511as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35512See \`config.log' for more details" "$LINENO" 5; }
35513fi
35514
35515ac_ext=cpp
35516ac_cpp='$CXXCPP $CPPFLAGS'
35517ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35518ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35519ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35520
35521
35522  # Only process if variable expands to non-empty
35523
35524  if test "x$CPP" != x; then
35525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35526
35527  # First separate the path from the arguments. This will split at the first
35528  # space.
35529  complete="$CPP"
35530  path="${complete%% *}"
35531  tmp="$complete EOL"
35532  arguments="${tmp#* }"
35533
35534  # Input might be given as Windows format, start by converting to
35535  # unix format.
35536  new_path=`$CYGPATH -u "$path"`
35537
35538  # Now try to locate executable using which
35539  new_path=`$WHICH "$new_path" 2> /dev/null`
35540  # bat and cmd files are not always considered executable in cygwin causing which
35541  # to not find them
35542  if test "x$new_path" = x \
35543      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35544      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35545    new_path=`$CYGPATH -u "$path"`
35546  fi
35547  if test "x$new_path" = x; then
35548    # Oops. Which didn't find the executable.
35549    # The splitting of arguments from the executable at a space might have been incorrect,
35550    # since paths with space are more likely in Windows. Give it another try with the whole
35551    # argument.
35552    path="$complete"
35553    arguments="EOL"
35554    new_path=`$CYGPATH -u "$path"`
35555    new_path=`$WHICH "$new_path" 2> /dev/null`
35556    # bat and cmd files are not always considered executable in cygwin causing which
35557    # to not find them
35558    if test "x$new_path" = x \
35559        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35560        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35561      new_path=`$CYGPATH -u "$path"`
35562    fi
35563    if test "x$new_path" = x; then
35564      # It's still not found. Now this is an unrecoverable error.
35565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35566$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35567      has_space=`$ECHO "$complete" | $GREP " "`
35568      if test "x$has_space" != x; then
35569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35571      fi
35572      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35573    fi
35574  fi
35575
35576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35579  # "foo.exe" is OK but "foo" is an error.
35580  #
35581  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35582  # It is also a way to make sure we got the proper file name for the real test later on.
35583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35584  if test "x$test_shortpath" = x; then
35585    # Short path failed, file does not exist as specified.
35586    # Try adding .exe or .cmd
35587    if test -f "${new_path}.exe"; then
35588      input_to_shortpath="${new_path}.exe"
35589    elif test -f "${new_path}.cmd"; then
35590      input_to_shortpath="${new_path}.cmd"
35591    else
35592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35593$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35594      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35595$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35596      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35597    fi
35598  else
35599    input_to_shortpath="$new_path"
35600  fi
35601
35602  # Call helper function which possibly converts this using DOS-style short mode.
35603  # If so, the updated path is stored in $new_path.
35604  new_path="$input_to_shortpath"
35605
35606  input_path="$input_to_shortpath"
35607  # Check if we need to convert this using DOS-style short mode. If the path
35608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35609  # take no chances and rewrite it.
35610  # Note: m4 eats our [], so we need to use [ and ] instead.
35611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35612  if test "x$has_forbidden_chars" != x; then
35613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35617      # Going to short mode and back again did indeed matter. Since short mode is
35618      # case insensitive, let's make it lowercase to improve readability.
35619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35620      # Now convert it back to Unix-style (cygpath)
35621      input_path=`$CYGPATH -u "$shortmode_path"`
35622      new_path="$input_path"
35623    fi
35624  fi
35625
35626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35627  if test "x$test_cygdrive_prefix" = x; then
35628    # As a simple fix, exclude /usr/bin since it's not a real path.
35629    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35631      # a path prefixed by /cygdrive for fixpath to work.
35632      new_path="$CYGWIN_ROOT_PATH$input_path"
35633    fi
35634  fi
35635
35636  # remove trailing .exe if any
35637  new_path="${new_path/%.exe/}"
35638
35639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35640
35641  # First separate the path from the arguments. This will split at the first
35642  # space.
35643  complete="$CPP"
35644  path="${complete%% *}"
35645  tmp="$complete EOL"
35646  arguments="${tmp#* }"
35647
35648  # Input might be given as Windows format, start by converting to
35649  # unix format.
35650  new_path="$path"
35651
35652  windows_path="$new_path"
35653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35654    unix_path=`$CYGPATH -u "$windows_path"`
35655    new_path="$unix_path"
35656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35658    new_path="$unix_path"
35659  fi
35660
35661
35662  # Now try to locate executable using which
35663  new_path=`$WHICH "$new_path" 2> /dev/null`
35664
35665  if test "x$new_path" = x; then
35666    # Oops. Which didn't find the executable.
35667    # The splitting of arguments from the executable at a space might have been incorrect,
35668    # since paths with space are more likely in Windows. Give it another try with the whole
35669    # argument.
35670    path="$complete"
35671    arguments="EOL"
35672    new_path="$path"
35673
35674  windows_path="$new_path"
35675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35676    unix_path=`$CYGPATH -u "$windows_path"`
35677    new_path="$unix_path"
35678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35680    new_path="$unix_path"
35681  fi
35682
35683
35684    new_path=`$WHICH "$new_path" 2> /dev/null`
35685    # bat and cmd files are not always considered executable in MSYS causing which
35686    # to not find them
35687    if test "x$new_path" = x \
35688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35690      new_path="$path"
35691
35692  windows_path="$new_path"
35693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35694    unix_path=`$CYGPATH -u "$windows_path"`
35695    new_path="$unix_path"
35696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35698    new_path="$unix_path"
35699  fi
35700
35701    fi
35702
35703    if test "x$new_path" = x; then
35704      # It's still not found. Now this is an unrecoverable error.
35705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35706$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35707      has_space=`$ECHO "$complete" | $GREP " "`
35708      if test "x$has_space" != x; then
35709        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35710$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35711      fi
35712      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35713    fi
35714  fi
35715
35716  # Now new_path has a complete unix path to the binary
35717  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35718    # Keep paths in /bin as-is, but remove trailing .exe if any
35719    new_path="${new_path/%.exe/}"
35720    # Do not save /bin paths to all_fixpath_prefixes!
35721  else
35722    # Not in mixed or Windows style, start by that.
35723    new_path=`cmd //c echo $new_path`
35724
35725  input_path="$new_path"
35726  # Check if we need to convert this using DOS-style short mode. If the path
35727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35728  # take no chances and rewrite it.
35729  # Note: m4 eats our [], so we need to use [ and ] instead.
35730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35731  if test "x$has_forbidden_chars" != x; then
35732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35734  fi
35735
35736    # Output is in $new_path
35737
35738  windows_path="$new_path"
35739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35740    unix_path=`$CYGPATH -u "$windows_path"`
35741    new_path="$unix_path"
35742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35744    new_path="$unix_path"
35745  fi
35746
35747    # remove trailing .exe if any
35748    new_path="${new_path/%.exe/}"
35749
35750    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35751    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35752  fi
35753
35754    else
35755      # We're on a unix platform. Hooray! :)
35756      # First separate the path from the arguments. This will split at the first
35757      # space.
35758      complete="$CPP"
35759      path="${complete%% *}"
35760      tmp="$complete EOL"
35761      arguments="${tmp#* }"
35762
35763      # Cannot rely on the command "which" here since it doesn't always work.
35764      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35765      if test -z "$is_absolute_path"; then
35766        # Path to executable is not absolute. Find it.
35767        IFS_save="$IFS"
35768        IFS=:
35769        for p in $PATH; do
35770          if test -f "$p/$path" && test -x "$p/$path"; then
35771            new_path="$p/$path"
35772            break
35773          fi
35774        done
35775        IFS="$IFS_save"
35776      else
35777        # This is an absolute path, we can use it without further modifications.
35778        new_path="$path"
35779      fi
35780
35781      if test "x$new_path" = x; then
35782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35783$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35784        has_space=`$ECHO "$complete" | $GREP " "`
35785        if test "x$has_space" != x; then
35786          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35787$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35788        fi
35789        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35790      fi
35791    fi
35792
35793    # Now join together the path and the arguments once again
35794    if test "x$arguments" != xEOL; then
35795      new_complete="$new_path ${arguments% *}"
35796    else
35797      new_complete="$new_path"
35798    fi
35799
35800    if test "x$complete" != "x$new_complete"; then
35801      CPP="$new_complete"
35802      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35803$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35804    fi
35805  fi
35806
35807  ac_ext=cpp
35808ac_cpp='$CXXCPP $CPPFLAGS'
35809ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35810ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35811ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35813$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35814if test -z "$CXXCPP"; then
35815  if ${ac_cv_prog_CXXCPP+:} false; then :
35816  $as_echo_n "(cached) " >&6
35817else
35818      # Double quotes because CXXCPP needs to be expanded
35819    for CXXCPP in "$CXX -E" "/lib/cpp"
35820    do
35821      ac_preproc_ok=false
35822for ac_cxx_preproc_warn_flag in '' yes
35823do
35824  # Use a header file that comes with gcc, so configuring glibc
35825  # with a fresh cross-compiler works.
35826  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35827  # <limits.h> exists even on freestanding compilers.
35828  # On the NeXT, cc -E runs the code through the compiler's parser,
35829  # not just through cpp. "Syntax error" is here to catch this case.
35830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35831/* end confdefs.h.  */
35832#ifdef __STDC__
35833# include <limits.h>
35834#else
35835# include <assert.h>
35836#endif
35837		     Syntax error
35838_ACEOF
35839if ac_fn_cxx_try_cpp "$LINENO"; then :
35840
35841else
35842  # Broken: fails on valid input.
35843continue
35844fi
35845rm -f conftest.err conftest.i conftest.$ac_ext
35846
35847  # OK, works on sane cases.  Now check whether nonexistent headers
35848  # can be detected and how.
35849  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35850/* end confdefs.h.  */
35851#include <ac_nonexistent.h>
35852_ACEOF
35853if ac_fn_cxx_try_cpp "$LINENO"; then :
35854  # Broken: success on invalid input.
35855continue
35856else
35857  # Passes both tests.
35858ac_preproc_ok=:
35859break
35860fi
35861rm -f conftest.err conftest.i conftest.$ac_ext
35862
35863done
35864# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35865rm -f conftest.i conftest.err conftest.$ac_ext
35866if $ac_preproc_ok; then :
35867  break
35868fi
35869
35870    done
35871    ac_cv_prog_CXXCPP=$CXXCPP
35872
35873fi
35874  CXXCPP=$ac_cv_prog_CXXCPP
35875else
35876  ac_cv_prog_CXXCPP=$CXXCPP
35877fi
35878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35879$as_echo "$CXXCPP" >&6; }
35880ac_preproc_ok=false
35881for ac_cxx_preproc_warn_flag in '' yes
35882do
35883  # Use a header file that comes with gcc, so configuring glibc
35884  # with a fresh cross-compiler works.
35885  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35886  # <limits.h> exists even on freestanding compilers.
35887  # On the NeXT, cc -E runs the code through the compiler's parser,
35888  # not just through cpp. "Syntax error" is here to catch this case.
35889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35890/* end confdefs.h.  */
35891#ifdef __STDC__
35892# include <limits.h>
35893#else
35894# include <assert.h>
35895#endif
35896		     Syntax error
35897_ACEOF
35898if ac_fn_cxx_try_cpp "$LINENO"; then :
35899
35900else
35901  # Broken: fails on valid input.
35902continue
35903fi
35904rm -f conftest.err conftest.i conftest.$ac_ext
35905
35906  # OK, works on sane cases.  Now check whether nonexistent headers
35907  # can be detected and how.
35908  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35909/* end confdefs.h.  */
35910#include <ac_nonexistent.h>
35911_ACEOF
35912if ac_fn_cxx_try_cpp "$LINENO"; then :
35913  # Broken: success on invalid input.
35914continue
35915else
35916  # Passes both tests.
35917ac_preproc_ok=:
35918break
35919fi
35920rm -f conftest.err conftest.i conftest.$ac_ext
35921
35922done
35923# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35924rm -f conftest.i conftest.err conftest.$ac_ext
35925if $ac_preproc_ok; then :
35926
35927else
35928  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35930as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35931See \`config.log' for more details" "$LINENO" 5; }
35932fi
35933
35934ac_ext=cpp
35935ac_cpp='$CXXCPP $CPPFLAGS'
35936ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35937ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35938ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35939
35940
35941  # Only process if variable expands to non-empty
35942
35943  if test "x$CXXCPP" != x; then
35944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35945
35946  # First separate the path from the arguments. This will split at the first
35947  # space.
35948  complete="$CXXCPP"
35949  path="${complete%% *}"
35950  tmp="$complete EOL"
35951  arguments="${tmp#* }"
35952
35953  # Input might be given as Windows format, start by converting to
35954  # unix format.
35955  new_path=`$CYGPATH -u "$path"`
35956
35957  # Now try to locate executable using which
35958  new_path=`$WHICH "$new_path" 2> /dev/null`
35959  # bat and cmd files are not always considered executable in cygwin causing which
35960  # to not find them
35961  if test "x$new_path" = x \
35962      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35963      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35964    new_path=`$CYGPATH -u "$path"`
35965  fi
35966  if test "x$new_path" = x; then
35967    # Oops. Which didn't find the executable.
35968    # The splitting of arguments from the executable at a space might have been incorrect,
35969    # since paths with space are more likely in Windows. Give it another try with the whole
35970    # argument.
35971    path="$complete"
35972    arguments="EOL"
35973    new_path=`$CYGPATH -u "$path"`
35974    new_path=`$WHICH "$new_path" 2> /dev/null`
35975    # bat and cmd files are not always considered executable in cygwin causing which
35976    # to not find them
35977    if test "x$new_path" = x \
35978        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35979        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35980      new_path=`$CYGPATH -u "$path"`
35981    fi
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 CXXCPP, which resolves as \"$complete\", is not found." >&5
35985$as_echo "$as_me: The path of CXXCPP, 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 CXXCPP" "$LINENO" 5
35992    fi
35993  fi
35994
35995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35998  # "foo.exe" is OK but "foo" is an error.
35999  #
36000  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36001  # It is also a way to make sure we got the proper file name for the real test later on.
36002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36003  if test "x$test_shortpath" = x; then
36004    # Short path failed, file does not exist as specified.
36005    # Try adding .exe or .cmd
36006    if test -f "${new_path}.exe"; then
36007      input_to_shortpath="${new_path}.exe"
36008    elif test -f "${new_path}.cmd"; then
36009      input_to_shortpath="${new_path}.cmd"
36010    else
36011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36012$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36013      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36014$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36015      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36016    fi
36017  else
36018    input_to_shortpath="$new_path"
36019  fi
36020
36021  # Call helper function which possibly converts this using DOS-style short mode.
36022  # If so, the updated path is stored in $new_path.
36023  new_path="$input_to_shortpath"
36024
36025  input_path="$input_to_shortpath"
36026  # Check if we need to convert this using DOS-style short mode. If the path
36027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36028  # take no chances and rewrite it.
36029  # Note: m4 eats our [], so we need to use [ and ] instead.
36030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36031  if test "x$has_forbidden_chars" != x; then
36032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36036      # Going to short mode and back again did indeed matter. Since short mode is
36037      # case insensitive, let's make it lowercase to improve readability.
36038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36039      # Now convert it back to Unix-style (cygpath)
36040      input_path=`$CYGPATH -u "$shortmode_path"`
36041      new_path="$input_path"
36042    fi
36043  fi
36044
36045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36046  if test "x$test_cygdrive_prefix" = x; then
36047    # As a simple fix, exclude /usr/bin since it's not a real path.
36048    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36050      # a path prefixed by /cygdrive for fixpath to work.
36051      new_path="$CYGWIN_ROOT_PATH$input_path"
36052    fi
36053  fi
36054
36055  # remove trailing .exe if any
36056  new_path="${new_path/%.exe/}"
36057
36058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36059
36060  # First separate the path from the arguments. This will split at the first
36061  # space.
36062  complete="$CXXCPP"
36063  path="${complete%% *}"
36064  tmp="$complete EOL"
36065  arguments="${tmp#* }"
36066
36067  # Input might be given as Windows format, start by converting to
36068  # unix format.
36069  new_path="$path"
36070
36071  windows_path="$new_path"
36072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36073    unix_path=`$CYGPATH -u "$windows_path"`
36074    new_path="$unix_path"
36075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36077    new_path="$unix_path"
36078  fi
36079
36080
36081  # Now try to locate executable using which
36082  new_path=`$WHICH "$new_path" 2> /dev/null`
36083
36084  if test "x$new_path" = x; then
36085    # Oops. Which didn't find the executable.
36086    # The splitting of arguments from the executable at a space might have been incorrect,
36087    # since paths with space are more likely in Windows. Give it another try with the whole
36088    # argument.
36089    path="$complete"
36090    arguments="EOL"
36091    new_path="$path"
36092
36093  windows_path="$new_path"
36094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36095    unix_path=`$CYGPATH -u "$windows_path"`
36096    new_path="$unix_path"
36097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36099    new_path="$unix_path"
36100  fi
36101
36102
36103    new_path=`$WHICH "$new_path" 2> /dev/null`
36104    # bat and cmd files are not always considered executable in MSYS causing which
36105    # to not find them
36106    if test "x$new_path" = x \
36107        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36108        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36109      new_path="$path"
36110
36111  windows_path="$new_path"
36112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36113    unix_path=`$CYGPATH -u "$windows_path"`
36114    new_path="$unix_path"
36115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36117    new_path="$unix_path"
36118  fi
36119
36120    fi
36121
36122    if test "x$new_path" = x; then
36123      # It's still not found. Now this is an unrecoverable error.
36124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36125$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36126      has_space=`$ECHO "$complete" | $GREP " "`
36127      if test "x$has_space" != x; then
36128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36130      fi
36131      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36132    fi
36133  fi
36134
36135  # Now new_path has a complete unix path to the binary
36136  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36137    # Keep paths in /bin as-is, but remove trailing .exe if any
36138    new_path="${new_path/%.exe/}"
36139    # Do not save /bin paths to all_fixpath_prefixes!
36140  else
36141    # Not in mixed or Windows style, start by that.
36142    new_path=`cmd //c echo $new_path`
36143
36144  input_path="$new_path"
36145  # Check if we need to convert this using DOS-style short mode. If the path
36146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36147  # take no chances and rewrite it.
36148  # Note: m4 eats our [], so we need to use [ and ] instead.
36149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36150  if test "x$has_forbidden_chars" != x; then
36151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36153  fi
36154
36155    # Output is in $new_path
36156
36157  windows_path="$new_path"
36158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36159    unix_path=`$CYGPATH -u "$windows_path"`
36160    new_path="$unix_path"
36161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36163    new_path="$unix_path"
36164  fi
36165
36166    # remove trailing .exe if any
36167    new_path="${new_path/%.exe/}"
36168
36169    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36170    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36171  fi
36172
36173    else
36174      # We're on a unix platform. Hooray! :)
36175      # First separate the path from the arguments. This will split at the first
36176      # space.
36177      complete="$CXXCPP"
36178      path="${complete%% *}"
36179      tmp="$complete EOL"
36180      arguments="${tmp#* }"
36181
36182      # Cannot rely on the command "which" here since it doesn't always work.
36183      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36184      if test -z "$is_absolute_path"; then
36185        # Path to executable is not absolute. Find it.
36186        IFS_save="$IFS"
36187        IFS=:
36188        for p in $PATH; do
36189          if test -f "$p/$path" && test -x "$p/$path"; then
36190            new_path="$p/$path"
36191            break
36192          fi
36193        done
36194        IFS="$IFS_save"
36195      else
36196        # This is an absolute path, we can use it without further modifications.
36197        new_path="$path"
36198      fi
36199
36200      if test "x$new_path" = x; then
36201        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36202$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36203        has_space=`$ECHO "$complete" | $GREP " "`
36204        if test "x$has_space" != x; then
36205          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36206$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36207        fi
36208        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36209      fi
36210    fi
36211
36212    # Now join together the path and the arguments once again
36213    if test "x$arguments" != xEOL; then
36214      new_complete="$new_path ${arguments% *}"
36215    else
36216      new_complete="$new_path"
36217    fi
36218
36219    if test "x$complete" != "x$new_complete"; then
36220      CXXCPP="$new_complete"
36221      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36222$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36223    fi
36224  fi
36225
36226
36227  #
36228  # Setup the linker (LD)
36229  #
36230  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36231    # In the Microsoft toolchain we have a separate LD command "link".
36232    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36233    # a cygwin program for something completely different.
36234    # Extract the first word of "link", so it can be a program name with args.
36235set dummy link; ac_word=$2
36236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36237$as_echo_n "checking for $ac_word... " >&6; }
36238if ${ac_cv_prog_LD+:} false; then :
36239  $as_echo_n "(cached) " >&6
36240else
36241  if test -n "$LD"; then
36242  ac_cv_prog_LD="$LD" # Let the user override the test.
36243else
36244  ac_prog_rejected=no
36245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36246for as_dir in $PATH
36247do
36248  IFS=$as_save_IFS
36249  test -z "$as_dir" && as_dir=.
36250    for ac_exec_ext in '' $ac_executable_extensions; do
36251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36252    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36253       ac_prog_rejected=yes
36254       continue
36255     fi
36256    ac_cv_prog_LD="link"
36257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36258    break 2
36259  fi
36260done
36261  done
36262IFS=$as_save_IFS
36263
36264if test $ac_prog_rejected = yes; then
36265  # We found a bogon in the path, so make sure we never use it.
36266  set dummy $ac_cv_prog_LD
36267  shift
36268  if test $# != 0; then
36269    # We chose a different compiler from the bogus one.
36270    # However, it has the same basename, so the bogon will be chosen
36271    # first if we set LD to just the basename; use the full file name.
36272    shift
36273    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36274  fi
36275fi
36276fi
36277fi
36278LD=$ac_cv_prog_LD
36279if test -n "$LD"; then
36280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36281$as_echo "$LD" >&6; }
36282else
36283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36284$as_echo "no" >&6; }
36285fi
36286
36287
36288
36289  # Only process if variable expands to non-empty
36290
36291  if test "x$LD" != x; then
36292    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36293
36294  # First separate the path from the arguments. This will split at the first
36295  # space.
36296  complete="$LD"
36297  path="${complete%% *}"
36298  tmp="$complete EOL"
36299  arguments="${tmp#* }"
36300
36301  # Input might be given as Windows format, start by converting to
36302  # unix format.
36303  new_path=`$CYGPATH -u "$path"`
36304
36305  # Now try to locate executable using which
36306  new_path=`$WHICH "$new_path" 2> /dev/null`
36307  # bat and cmd files are not always considered executable in cygwin causing which
36308  # to not find them
36309  if test "x$new_path" = x \
36310      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36311      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36312    new_path=`$CYGPATH -u "$path"`
36313  fi
36314  if test "x$new_path" = x; then
36315    # Oops. Which didn't find the executable.
36316    # The splitting of arguments from the executable at a space might have been incorrect,
36317    # since paths with space are more likely in Windows. Give it another try with the whole
36318    # argument.
36319    path="$complete"
36320    arguments="EOL"
36321    new_path=`$CYGPATH -u "$path"`
36322    new_path=`$WHICH "$new_path" 2> /dev/null`
36323    # bat and cmd files are not always considered executable in cygwin causing which
36324    # to not find them
36325    if test "x$new_path" = x \
36326        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36327        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36328      new_path=`$CYGPATH -u "$path"`
36329    fi
36330    if test "x$new_path" = x; then
36331      # It's still not found. Now this is an unrecoverable error.
36332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36333$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36334      has_space=`$ECHO "$complete" | $GREP " "`
36335      if test "x$has_space" != x; then
36336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36338      fi
36339      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36340    fi
36341  fi
36342
36343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36346  # "foo.exe" is OK but "foo" is an error.
36347  #
36348  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36349  # It is also a way to make sure we got the proper file name for the real test later on.
36350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36351  if test "x$test_shortpath" = x; then
36352    # Short path failed, file does not exist as specified.
36353    # Try adding .exe or .cmd
36354    if test -f "${new_path}.exe"; then
36355      input_to_shortpath="${new_path}.exe"
36356    elif test -f "${new_path}.cmd"; then
36357      input_to_shortpath="${new_path}.cmd"
36358    else
36359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36360$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36361      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36362$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36363      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36364    fi
36365  else
36366    input_to_shortpath="$new_path"
36367  fi
36368
36369  # Call helper function which possibly converts this using DOS-style short mode.
36370  # If so, the updated path is stored in $new_path.
36371  new_path="$input_to_shortpath"
36372
36373  input_path="$input_to_shortpath"
36374  # Check if we need to convert this using DOS-style short mode. If the path
36375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36376  # take no chances and rewrite it.
36377  # Note: m4 eats our [], so we need to use [ and ] instead.
36378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36379  if test "x$has_forbidden_chars" != x; then
36380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36384      # Going to short mode and back again did indeed matter. Since short mode is
36385      # case insensitive, let's make it lowercase to improve readability.
36386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36387      # Now convert it back to Unix-style (cygpath)
36388      input_path=`$CYGPATH -u "$shortmode_path"`
36389      new_path="$input_path"
36390    fi
36391  fi
36392
36393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36394  if test "x$test_cygdrive_prefix" = x; then
36395    # As a simple fix, exclude /usr/bin since it's not a real path.
36396    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36398      # a path prefixed by /cygdrive for fixpath to work.
36399      new_path="$CYGWIN_ROOT_PATH$input_path"
36400    fi
36401  fi
36402
36403  # remove trailing .exe if any
36404  new_path="${new_path/%.exe/}"
36405
36406    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36407
36408  # First separate the path from the arguments. This will split at the first
36409  # space.
36410  complete="$LD"
36411  path="${complete%% *}"
36412  tmp="$complete EOL"
36413  arguments="${tmp#* }"
36414
36415  # Input might be given as Windows format, start by converting to
36416  # unix format.
36417  new_path="$path"
36418
36419  windows_path="$new_path"
36420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36421    unix_path=`$CYGPATH -u "$windows_path"`
36422    new_path="$unix_path"
36423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36425    new_path="$unix_path"
36426  fi
36427
36428
36429  # Now try to locate executable using which
36430  new_path=`$WHICH "$new_path" 2> /dev/null`
36431
36432  if test "x$new_path" = x; then
36433    # Oops. Which didn't find the executable.
36434    # The splitting of arguments from the executable at a space might have been incorrect,
36435    # since paths with space are more likely in Windows. Give it another try with the whole
36436    # argument.
36437    path="$complete"
36438    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
36452    # bat and cmd files are not always considered executable in MSYS causing which
36453    # to not find them
36454    if test "x$new_path" = x \
36455        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36456        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36457      new_path="$path"
36458
36459  windows_path="$new_path"
36460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36461    unix_path=`$CYGPATH -u "$windows_path"`
36462    new_path="$unix_path"
36463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36465    new_path="$unix_path"
36466  fi
36467
36468    fi
36469
36470    if test "x$new_path" = x; then
36471      # It's still not found. Now this is an unrecoverable error.
36472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36473$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36474      has_space=`$ECHO "$complete" | $GREP " "`
36475      if test "x$has_space" != x; then
36476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36478      fi
36479      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36480    fi
36481  fi
36482
36483  # Now new_path has a complete unix path to the binary
36484  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36485    # Keep paths in /bin as-is, but remove trailing .exe if any
36486    new_path="${new_path/%.exe/}"
36487    # Do not save /bin paths to all_fixpath_prefixes!
36488  else
36489    # Not in mixed or Windows style, start by that.
36490    new_path=`cmd //c echo $new_path`
36491
36492  input_path="$new_path"
36493  # Check if we need to convert this using DOS-style short mode. If the path
36494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36495  # take no chances and rewrite it.
36496  # Note: m4 eats our [], so we need to use [ and ] instead.
36497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36498  if test "x$has_forbidden_chars" != x; then
36499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36501  fi
36502
36503    # Output is in $new_path
36504
36505  windows_path="$new_path"
36506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36507    unix_path=`$CYGPATH -u "$windows_path"`
36508    new_path="$unix_path"
36509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36511    new_path="$unix_path"
36512  fi
36513
36514    # remove trailing .exe if any
36515    new_path="${new_path/%.exe/}"
36516
36517    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36518    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36519  fi
36520
36521    else
36522      # We're on a unix platform. Hooray! :)
36523      # First separate the path from the arguments. This will split at the first
36524      # space.
36525      complete="$LD"
36526      path="${complete%% *}"
36527      tmp="$complete EOL"
36528      arguments="${tmp#* }"
36529
36530      # Cannot rely on the command "which" here since it doesn't always work.
36531      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36532      if test -z "$is_absolute_path"; then
36533        # Path to executable is not absolute. Find it.
36534        IFS_save="$IFS"
36535        IFS=:
36536        for p in $PATH; do
36537          if test -f "$p/$path" && test -x "$p/$path"; then
36538            new_path="$p/$path"
36539            break
36540          fi
36541        done
36542        IFS="$IFS_save"
36543      else
36544        # This is an absolute path, we can use it without further modifications.
36545        new_path="$path"
36546      fi
36547
36548      if test "x$new_path" = x; then
36549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36550$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36551        has_space=`$ECHO "$complete" | $GREP " "`
36552        if test "x$has_space" != x; then
36553          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36554$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36555        fi
36556        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36557      fi
36558    fi
36559
36560    # Now join together the path and the arguments once again
36561    if test "x$arguments" != xEOL; then
36562      new_complete="$new_path ${arguments% *}"
36563    else
36564      new_complete="$new_path"
36565    fi
36566
36567    if test "x$complete" != "x$new_complete"; then
36568      LD="$new_complete"
36569      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36570$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36571    fi
36572  fi
36573
36574    # Verify that we indeed succeeded with this trick.
36575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36576$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36577    "$LD" --version > /dev/null
36578    if test $? -eq 0 ; then
36579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36580$as_echo "no" >&6; }
36581      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36582    else
36583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36584$as_echo "yes" >&6; }
36585    fi
36586    LDCXX="$LD"
36587  else
36588    # All other toolchains use the compiler to link.
36589    LD="$CC"
36590    LDCXX="$CXX"
36591  fi
36592
36593  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36594
36595
36596  #
36597  # Setup the assembler (AS)
36598  #
36599  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36600
36601
36602  # Publish this variable in the help.
36603
36604
36605  if [ -z "${AS+x}" ]; then
36606    # The variable is not set by user, try to locate tool using the code snippet
36607    for ac_prog in as
36608do
36609  # Extract the first word of "$ac_prog", so it can be a program name with args.
36610set dummy $ac_prog; ac_word=$2
36611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36612$as_echo_n "checking for $ac_word... " >&6; }
36613if ${ac_cv_path_AS+:} false; then :
36614  $as_echo_n "(cached) " >&6
36615else
36616  case $AS in
36617  [\\/]* | ?:[\\/]*)
36618  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36619  ;;
36620  *)
36621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36622for as_dir in $PATH
36623do
36624  IFS=$as_save_IFS
36625  test -z "$as_dir" && as_dir=.
36626    for ac_exec_ext in '' $ac_executable_extensions; do
36627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36628    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36630    break 2
36631  fi
36632done
36633  done
36634IFS=$as_save_IFS
36635
36636  ;;
36637esac
36638fi
36639AS=$ac_cv_path_AS
36640if test -n "$AS"; then
36641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36642$as_echo "$AS" >&6; }
36643else
36644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36645$as_echo "no" >&6; }
36646fi
36647
36648
36649  test -n "$AS" && break
36650done
36651
36652  else
36653    # The variable is set, but is it from the command line or the environment?
36654
36655    # Try to remove the string !AS! from our list.
36656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36658      # If it failed, the variable was not from the command line. Ignore it,
36659      # but warn the user (except for BASH, which is always set by the calling BASH).
36660      if test "xAS" != xBASH; then
36661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36662$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36663      fi
36664      # Try to locate tool using the code snippet
36665      for ac_prog in as
36666do
36667  # Extract the first word of "$ac_prog", so it can be a program name with args.
36668set dummy $ac_prog; ac_word=$2
36669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36670$as_echo_n "checking for $ac_word... " >&6; }
36671if ${ac_cv_path_AS+:} false; then :
36672  $as_echo_n "(cached) " >&6
36673else
36674  case $AS in
36675  [\\/]* | ?:[\\/]*)
36676  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36677  ;;
36678  *)
36679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36680for as_dir in $PATH
36681do
36682  IFS=$as_save_IFS
36683  test -z "$as_dir" && as_dir=.
36684    for ac_exec_ext in '' $ac_executable_extensions; do
36685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36686    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36688    break 2
36689  fi
36690done
36691  done
36692IFS=$as_save_IFS
36693
36694  ;;
36695esac
36696fi
36697AS=$ac_cv_path_AS
36698if test -n "$AS"; then
36699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36700$as_echo "$AS" >&6; }
36701else
36702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36703$as_echo "no" >&6; }
36704fi
36705
36706
36707  test -n "$AS" && break
36708done
36709
36710    else
36711      # If it succeeded, then it was overridden by the user. We will use it
36712      # for the tool.
36713
36714      # First remove it from the list of overridden variables, so we can test
36715      # for unknown variables in the end.
36716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36717
36718      # Check if we try to supply an empty value
36719      if test "x$AS" = x; then
36720        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36721$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36723$as_echo_n "checking for AS... " >&6; }
36724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36725$as_echo "disabled" >&6; }
36726      else
36727        # Check if the provided tool contains a complete path.
36728        tool_specified="$AS"
36729        tool_basename="${tool_specified##*/}"
36730        if test "x$tool_basename" = "x$tool_specified"; then
36731          # A command without a complete path is provided, search $PATH.
36732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36733$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36734          # Extract the first word of "$tool_basename", so it can be a program name with args.
36735set dummy $tool_basename; ac_word=$2
36736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36737$as_echo_n "checking for $ac_word... " >&6; }
36738if ${ac_cv_path_AS+:} false; then :
36739  $as_echo_n "(cached) " >&6
36740else
36741  case $AS in
36742  [\\/]* | ?:[\\/]*)
36743  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36744  ;;
36745  *)
36746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36747for as_dir in $PATH
36748do
36749  IFS=$as_save_IFS
36750  test -z "$as_dir" && as_dir=.
36751    for ac_exec_ext in '' $ac_executable_extensions; do
36752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36753    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36755    break 2
36756  fi
36757done
36758  done
36759IFS=$as_save_IFS
36760
36761  ;;
36762esac
36763fi
36764AS=$ac_cv_path_AS
36765if test -n "$AS"; then
36766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36767$as_echo "$AS" >&6; }
36768else
36769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36770$as_echo "no" >&6; }
36771fi
36772
36773
36774          if test "x$AS" = x; then
36775            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36776          fi
36777        else
36778          # Otherwise we believe it is a complete path. Use it as it is.
36779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36780$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36781          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36782$as_echo_n "checking for AS... " >&6; }
36783          if test ! -x "$tool_specified"; then
36784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36785$as_echo "not found" >&6; }
36786            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36787          fi
36788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36789$as_echo "$tool_specified" >&6; }
36790        fi
36791      fi
36792    fi
36793
36794  fi
36795
36796
36797
36798  # Only process if variable expands to non-empty
36799
36800  if test "x$AS" != x; then
36801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36802
36803  # First separate the path from the arguments. This will split at the first
36804  # space.
36805  complete="$AS"
36806  path="${complete%% *}"
36807  tmp="$complete EOL"
36808  arguments="${tmp#* }"
36809
36810  # Input might be given as Windows format, start by converting to
36811  # unix format.
36812  new_path=`$CYGPATH -u "$path"`
36813
36814  # Now try to locate executable using which
36815  new_path=`$WHICH "$new_path" 2> /dev/null`
36816  # bat and cmd files are not always considered executable in cygwin causing which
36817  # to not find them
36818  if test "x$new_path" = x \
36819      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36820      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36821    new_path=`$CYGPATH -u "$path"`
36822  fi
36823  if test "x$new_path" = x; then
36824    # Oops. Which didn't find the executable.
36825    # The splitting of arguments from the executable at a space might have been incorrect,
36826    # since paths with space are more likely in Windows. Give it another try with the whole
36827    # argument.
36828    path="$complete"
36829    arguments="EOL"
36830    new_path=`$CYGPATH -u "$path"`
36831    new_path=`$WHICH "$new_path" 2> /dev/null`
36832    # bat and cmd files are not always considered executable in cygwin causing which
36833    # to not find them
36834    if test "x$new_path" = x \
36835        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36836        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36837      new_path=`$CYGPATH -u "$path"`
36838    fi
36839    if test "x$new_path" = x; then
36840      # It's still not found. Now this is an unrecoverable error.
36841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36842$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36843      has_space=`$ECHO "$complete" | $GREP " "`
36844      if test "x$has_space" != x; then
36845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36847      fi
36848      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36849    fi
36850  fi
36851
36852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36855  # "foo.exe" is OK but "foo" is an error.
36856  #
36857  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36858  # It is also a way to make sure we got the proper file name for the real test later on.
36859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36860  if test "x$test_shortpath" = x; then
36861    # Short path failed, file does not exist as specified.
36862    # Try adding .exe or .cmd
36863    if test -f "${new_path}.exe"; then
36864      input_to_shortpath="${new_path}.exe"
36865    elif test -f "${new_path}.cmd"; then
36866      input_to_shortpath="${new_path}.cmd"
36867    else
36868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36869$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36870      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36871$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36872      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36873    fi
36874  else
36875    input_to_shortpath="$new_path"
36876  fi
36877
36878  # Call helper function which possibly converts this using DOS-style short mode.
36879  # If so, the updated path is stored in $new_path.
36880  new_path="$input_to_shortpath"
36881
36882  input_path="$input_to_shortpath"
36883  # Check if we need to convert this using DOS-style short mode. If the path
36884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36885  # take no chances and rewrite it.
36886  # Note: m4 eats our [], so we need to use [ and ] instead.
36887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36888  if test "x$has_forbidden_chars" != x; then
36889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36893      # Going to short mode and back again did indeed matter. Since short mode is
36894      # case insensitive, let's make it lowercase to improve readability.
36895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36896      # Now convert it back to Unix-style (cygpath)
36897      input_path=`$CYGPATH -u "$shortmode_path"`
36898      new_path="$input_path"
36899    fi
36900  fi
36901
36902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36903  if test "x$test_cygdrive_prefix" = x; then
36904    # As a simple fix, exclude /usr/bin since it's not a real path.
36905    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36907      # a path prefixed by /cygdrive for fixpath to work.
36908      new_path="$CYGWIN_ROOT_PATH$input_path"
36909    fi
36910  fi
36911
36912  # remove trailing .exe if any
36913  new_path="${new_path/%.exe/}"
36914
36915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36916
36917  # First separate the path from the arguments. This will split at the first
36918  # space.
36919  complete="$AS"
36920  path="${complete%% *}"
36921  tmp="$complete EOL"
36922  arguments="${tmp#* }"
36923
36924  # Input might be given as Windows format, start by converting to
36925  # unix format.
36926  new_path="$path"
36927
36928  windows_path="$new_path"
36929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36930    unix_path=`$CYGPATH -u "$windows_path"`
36931    new_path="$unix_path"
36932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36934    new_path="$unix_path"
36935  fi
36936
36937
36938  # Now try to locate executable using which
36939  new_path=`$WHICH "$new_path" 2> /dev/null`
36940
36941  if test "x$new_path" = x; then
36942    # Oops. Which didn't find the executable.
36943    # The splitting of arguments from the executable at a space might have been incorrect,
36944    # since paths with space are more likely in Windows. Give it another try with the whole
36945    # argument.
36946    path="$complete"
36947    arguments="EOL"
36948    new_path="$path"
36949
36950  windows_path="$new_path"
36951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36952    unix_path=`$CYGPATH -u "$windows_path"`
36953    new_path="$unix_path"
36954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36956    new_path="$unix_path"
36957  fi
36958
36959
36960    new_path=`$WHICH "$new_path" 2> /dev/null`
36961    # bat and cmd files are not always considered executable in MSYS causing which
36962    # to not find them
36963    if test "x$new_path" = x \
36964        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36965        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36966      new_path="$path"
36967
36968  windows_path="$new_path"
36969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36970    unix_path=`$CYGPATH -u "$windows_path"`
36971    new_path="$unix_path"
36972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36974    new_path="$unix_path"
36975  fi
36976
36977    fi
36978
36979    if test "x$new_path" = x; then
36980      # It's still not found. Now this is an unrecoverable error.
36981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36982$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36983      has_space=`$ECHO "$complete" | $GREP " "`
36984      if test "x$has_space" != x; then
36985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36987      fi
36988      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36989    fi
36990  fi
36991
36992  # Now new_path has a complete unix path to the binary
36993  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36994    # Keep paths in /bin as-is, but remove trailing .exe if any
36995    new_path="${new_path/%.exe/}"
36996    # Do not save /bin paths to all_fixpath_prefixes!
36997  else
36998    # Not in mixed or Windows style, start by that.
36999    new_path=`cmd //c echo $new_path`
37000
37001  input_path="$new_path"
37002  # Check if we need to convert this using DOS-style short mode. If the path
37003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37004  # take no chances and rewrite it.
37005  # Note: m4 eats our [], so we need to use [ and ] instead.
37006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37007  if test "x$has_forbidden_chars" != x; then
37008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37010  fi
37011
37012    # Output is in $new_path
37013
37014  windows_path="$new_path"
37015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37016    unix_path=`$CYGPATH -u "$windows_path"`
37017    new_path="$unix_path"
37018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37020    new_path="$unix_path"
37021  fi
37022
37023    # remove trailing .exe if any
37024    new_path="${new_path/%.exe/}"
37025
37026    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37027    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37028  fi
37029
37030    else
37031      # We're on a unix platform. Hooray! :)
37032      # First separate the path from the arguments. This will split at the first
37033      # space.
37034      complete="$AS"
37035      path="${complete%% *}"
37036      tmp="$complete EOL"
37037      arguments="${tmp#* }"
37038
37039      # Cannot rely on the command "which" here since it doesn't always work.
37040      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37041      if test -z "$is_absolute_path"; then
37042        # Path to executable is not absolute. Find it.
37043        IFS_save="$IFS"
37044        IFS=:
37045        for p in $PATH; do
37046          if test -f "$p/$path" && test -x "$p/$path"; then
37047            new_path="$p/$path"
37048            break
37049          fi
37050        done
37051        IFS="$IFS_save"
37052      else
37053        # This is an absolute path, we can use it without further modifications.
37054        new_path="$path"
37055      fi
37056
37057      if test "x$new_path" = x; then
37058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37059$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37060        has_space=`$ECHO "$complete" | $GREP " "`
37061        if test "x$has_space" != x; then
37062          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37064        fi
37065        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37066      fi
37067    fi
37068
37069    # Now join together the path and the arguments once again
37070    if test "x$arguments" != xEOL; then
37071      new_complete="$new_path ${arguments% *}"
37072    else
37073      new_complete="$new_path"
37074    fi
37075
37076    if test "x$complete" != "x$new_complete"; then
37077      AS="$new_complete"
37078      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37079$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37080    fi
37081  fi
37082
37083    if test "x$AS" = x; then
37084      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37085    fi
37086  else
37087    # FIXME: is this correct for microsoft?
37088    AS="$CC -c"
37089  fi
37090
37091
37092  #
37093  # Setup the archiver (AR)
37094  #
37095  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37096    # The corresponding ar tool is lib.exe (used to create static libraries)
37097    # Extract the first word of "lib", so it can be a program name with args.
37098set dummy lib; ac_word=$2
37099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37100$as_echo_n "checking for $ac_word... " >&6; }
37101if ${ac_cv_prog_AR+:} false; then :
37102  $as_echo_n "(cached) " >&6
37103else
37104  if test -n "$AR"; then
37105  ac_cv_prog_AR="$AR" # Let the user override the test.
37106else
37107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37108for as_dir in $PATH
37109do
37110  IFS=$as_save_IFS
37111  test -z "$as_dir" && as_dir=.
37112    for ac_exec_ext in '' $ac_executable_extensions; do
37113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37114    ac_cv_prog_AR="lib"
37115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37116    break 2
37117  fi
37118done
37119  done
37120IFS=$as_save_IFS
37121
37122fi
37123fi
37124AR=$ac_cv_prog_AR
37125if test -n "$AR"; then
37126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37127$as_echo "$AR" >&6; }
37128else
37129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37130$as_echo "no" >&6; }
37131fi
37132
37133
37134  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37135
37136
37137  # Publish this variable in the help.
37138
37139
37140  if [ -z "${AR+x}" ]; then
37141    # The variable is not set by user, try to locate tool using the code snippet
37142    if test -n "$ac_tool_prefix"; then
37143  for ac_prog in ar gcc-ar
37144  do
37145    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37146set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37148$as_echo_n "checking for $ac_word... " >&6; }
37149if ${ac_cv_prog_AR+:} false; then :
37150  $as_echo_n "(cached) " >&6
37151else
37152  if test -n "$AR"; then
37153  ac_cv_prog_AR="$AR" # Let the user override the test.
37154else
37155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37156for as_dir in $PATH
37157do
37158  IFS=$as_save_IFS
37159  test -z "$as_dir" && as_dir=.
37160    for ac_exec_ext in '' $ac_executable_extensions; do
37161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37162    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37164    break 2
37165  fi
37166done
37167  done
37168IFS=$as_save_IFS
37169
37170fi
37171fi
37172AR=$ac_cv_prog_AR
37173if test -n "$AR"; then
37174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37175$as_echo "$AR" >&6; }
37176else
37177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37178$as_echo "no" >&6; }
37179fi
37180
37181
37182    test -n "$AR" && break
37183  done
37184fi
37185if test -z "$AR"; then
37186  ac_ct_AR=$AR
37187  for ac_prog in ar gcc-ar
37188do
37189  # Extract the first word of "$ac_prog", so it can be a program name with args.
37190set dummy $ac_prog; ac_word=$2
37191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37192$as_echo_n "checking for $ac_word... " >&6; }
37193if ${ac_cv_prog_ac_ct_AR+:} false; then :
37194  $as_echo_n "(cached) " >&6
37195else
37196  if test -n "$ac_ct_AR"; then
37197  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37198else
37199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37200for as_dir in $PATH
37201do
37202  IFS=$as_save_IFS
37203  test -z "$as_dir" && as_dir=.
37204    for ac_exec_ext in '' $ac_executable_extensions; do
37205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37206    ac_cv_prog_ac_ct_AR="$ac_prog"
37207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37208    break 2
37209  fi
37210done
37211  done
37212IFS=$as_save_IFS
37213
37214fi
37215fi
37216ac_ct_AR=$ac_cv_prog_ac_ct_AR
37217if test -n "$ac_ct_AR"; then
37218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37219$as_echo "$ac_ct_AR" >&6; }
37220else
37221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37222$as_echo "no" >&6; }
37223fi
37224
37225
37226  test -n "$ac_ct_AR" && break
37227done
37228
37229  if test "x$ac_ct_AR" = x; then
37230    AR=""
37231  else
37232    case $cross_compiling:$ac_tool_warned in
37233yes:)
37234{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37235$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37236ac_tool_warned=yes ;;
37237esac
37238    AR=$ac_ct_AR
37239  fi
37240fi
37241
37242  else
37243    # The variable is set, but is it from the command line or the environment?
37244
37245    # Try to remove the string !AR! from our list.
37246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37248      # If it failed, the variable was not from the command line. Ignore it,
37249      # but warn the user (except for BASH, which is always set by the calling BASH).
37250      if test "xAR" != xBASH; then
37251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37252$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37253      fi
37254      # Try to locate tool using the code snippet
37255      if test -n "$ac_tool_prefix"; then
37256  for ac_prog in ar gcc-ar
37257  do
37258    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37259set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37261$as_echo_n "checking for $ac_word... " >&6; }
37262if ${ac_cv_prog_AR+:} false; then :
37263  $as_echo_n "(cached) " >&6
37264else
37265  if test -n "$AR"; then
37266  ac_cv_prog_AR="$AR" # Let the user override the test.
37267else
37268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37269for as_dir in $PATH
37270do
37271  IFS=$as_save_IFS
37272  test -z "$as_dir" && as_dir=.
37273    for ac_exec_ext in '' $ac_executable_extensions; do
37274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37275    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37277    break 2
37278  fi
37279done
37280  done
37281IFS=$as_save_IFS
37282
37283fi
37284fi
37285AR=$ac_cv_prog_AR
37286if test -n "$AR"; then
37287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37288$as_echo "$AR" >&6; }
37289else
37290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37291$as_echo "no" >&6; }
37292fi
37293
37294
37295    test -n "$AR" && break
37296  done
37297fi
37298if test -z "$AR"; then
37299  ac_ct_AR=$AR
37300  for ac_prog in ar gcc-ar
37301do
37302  # Extract the first word of "$ac_prog", so it can be a program name with args.
37303set dummy $ac_prog; ac_word=$2
37304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37305$as_echo_n "checking for $ac_word... " >&6; }
37306if ${ac_cv_prog_ac_ct_AR+:} false; then :
37307  $as_echo_n "(cached) " >&6
37308else
37309  if test -n "$ac_ct_AR"; then
37310  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37311else
37312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37313for as_dir in $PATH
37314do
37315  IFS=$as_save_IFS
37316  test -z "$as_dir" && as_dir=.
37317    for ac_exec_ext in '' $ac_executable_extensions; do
37318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37319    ac_cv_prog_ac_ct_AR="$ac_prog"
37320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37321    break 2
37322  fi
37323done
37324  done
37325IFS=$as_save_IFS
37326
37327fi
37328fi
37329ac_ct_AR=$ac_cv_prog_ac_ct_AR
37330if test -n "$ac_ct_AR"; then
37331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37332$as_echo "$ac_ct_AR" >&6; }
37333else
37334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37335$as_echo "no" >&6; }
37336fi
37337
37338
37339  test -n "$ac_ct_AR" && break
37340done
37341
37342  if test "x$ac_ct_AR" = x; then
37343    AR=""
37344  else
37345    case $cross_compiling:$ac_tool_warned in
37346yes:)
37347{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37348$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37349ac_tool_warned=yes ;;
37350esac
37351    AR=$ac_ct_AR
37352  fi
37353fi
37354
37355    else
37356      # If it succeeded, then it was overridden by the user. We will use it
37357      # for the tool.
37358
37359      # First remove it from the list of overridden variables, so we can test
37360      # for unknown variables in the end.
37361      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37362
37363      # Check if we try to supply an empty value
37364      if test "x$AR" = x; then
37365        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37366$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37368$as_echo_n "checking for AR... " >&6; }
37369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37370$as_echo "disabled" >&6; }
37371      else
37372        # Check if the provided tool contains a complete path.
37373        tool_specified="$AR"
37374        tool_basename="${tool_specified##*/}"
37375        if test "x$tool_basename" = "x$tool_specified"; then
37376          # A command without a complete path is provided, search $PATH.
37377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37378$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37379          # Extract the first word of "$tool_basename", so it can be a program name with args.
37380set dummy $tool_basename; ac_word=$2
37381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37382$as_echo_n "checking for $ac_word... " >&6; }
37383if ${ac_cv_path_AR+:} false; then :
37384  $as_echo_n "(cached) " >&6
37385else
37386  case $AR in
37387  [\\/]* | ?:[\\/]*)
37388  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37389  ;;
37390  *)
37391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37392for as_dir in $PATH
37393do
37394  IFS=$as_save_IFS
37395  test -z "$as_dir" && as_dir=.
37396    for ac_exec_ext in '' $ac_executable_extensions; do
37397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37398    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37400    break 2
37401  fi
37402done
37403  done
37404IFS=$as_save_IFS
37405
37406  ;;
37407esac
37408fi
37409AR=$ac_cv_path_AR
37410if test -n "$AR"; then
37411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37412$as_echo "$AR" >&6; }
37413else
37414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37415$as_echo "no" >&6; }
37416fi
37417
37418
37419          if test "x$AR" = x; then
37420            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37421          fi
37422        else
37423          # Otherwise we believe it is a complete path. Use it as it is.
37424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37425$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37426          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37427$as_echo_n "checking for AR... " >&6; }
37428          if test ! -x "$tool_specified"; then
37429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37430$as_echo "not found" >&6; }
37431            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37432          fi
37433          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37434$as_echo "$tool_specified" >&6; }
37435        fi
37436      fi
37437    fi
37438
37439  fi
37440
37441
37442  else
37443
37444
37445  # Publish this variable in the help.
37446
37447
37448  if [ -z "${AR+x}" ]; then
37449    # The variable is not set by user, try to locate tool using the code snippet
37450    if test -n "$ac_tool_prefix"; then
37451  for ac_prog in ar
37452  do
37453    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37454set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37456$as_echo_n "checking for $ac_word... " >&6; }
37457if ${ac_cv_prog_AR+:} false; then :
37458  $as_echo_n "(cached) " >&6
37459else
37460  if test -n "$AR"; then
37461  ac_cv_prog_AR="$AR" # Let the user override the test.
37462else
37463as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37464for as_dir in $PATH
37465do
37466  IFS=$as_save_IFS
37467  test -z "$as_dir" && as_dir=.
37468    for ac_exec_ext in '' $ac_executable_extensions; do
37469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37470    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37472    break 2
37473  fi
37474done
37475  done
37476IFS=$as_save_IFS
37477
37478fi
37479fi
37480AR=$ac_cv_prog_AR
37481if test -n "$AR"; then
37482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37483$as_echo "$AR" >&6; }
37484else
37485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37486$as_echo "no" >&6; }
37487fi
37488
37489
37490    test -n "$AR" && break
37491  done
37492fi
37493if test -z "$AR"; then
37494  ac_ct_AR=$AR
37495  for ac_prog in ar
37496do
37497  # Extract the first word of "$ac_prog", so it can be a program name with args.
37498set dummy $ac_prog; ac_word=$2
37499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37500$as_echo_n "checking for $ac_word... " >&6; }
37501if ${ac_cv_prog_ac_ct_AR+:} false; then :
37502  $as_echo_n "(cached) " >&6
37503else
37504  if test -n "$ac_ct_AR"; then
37505  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37506else
37507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37508for as_dir in $PATH
37509do
37510  IFS=$as_save_IFS
37511  test -z "$as_dir" && as_dir=.
37512    for ac_exec_ext in '' $ac_executable_extensions; do
37513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37514    ac_cv_prog_ac_ct_AR="$ac_prog"
37515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37516    break 2
37517  fi
37518done
37519  done
37520IFS=$as_save_IFS
37521
37522fi
37523fi
37524ac_ct_AR=$ac_cv_prog_ac_ct_AR
37525if test -n "$ac_ct_AR"; then
37526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37527$as_echo "$ac_ct_AR" >&6; }
37528else
37529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37530$as_echo "no" >&6; }
37531fi
37532
37533
37534  test -n "$ac_ct_AR" && break
37535done
37536
37537  if test "x$ac_ct_AR" = x; then
37538    AR=""
37539  else
37540    case $cross_compiling:$ac_tool_warned in
37541yes:)
37542{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37543$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37544ac_tool_warned=yes ;;
37545esac
37546    AR=$ac_ct_AR
37547  fi
37548fi
37549
37550  else
37551    # The variable is set, but is it from the command line or the environment?
37552
37553    # Try to remove the string !AR! from our list.
37554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37556      # If it failed, the variable was not from the command line. Ignore it,
37557      # but warn the user (except for BASH, which is always set by the calling BASH).
37558      if test "xAR" != xBASH; then
37559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37560$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37561      fi
37562      # Try to locate tool using the code snippet
37563      if test -n "$ac_tool_prefix"; then
37564  for ac_prog in ar
37565  do
37566    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37567set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37569$as_echo_n "checking for $ac_word... " >&6; }
37570if ${ac_cv_prog_AR+:} false; then :
37571  $as_echo_n "(cached) " >&6
37572else
37573  if test -n "$AR"; then
37574  ac_cv_prog_AR="$AR" # Let the user override the test.
37575else
37576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37577for as_dir in $PATH
37578do
37579  IFS=$as_save_IFS
37580  test -z "$as_dir" && as_dir=.
37581    for ac_exec_ext in '' $ac_executable_extensions; do
37582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37583    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37585    break 2
37586  fi
37587done
37588  done
37589IFS=$as_save_IFS
37590
37591fi
37592fi
37593AR=$ac_cv_prog_AR
37594if test -n "$AR"; then
37595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37596$as_echo "$AR" >&6; }
37597else
37598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37599$as_echo "no" >&6; }
37600fi
37601
37602
37603    test -n "$AR" && break
37604  done
37605fi
37606if test -z "$AR"; then
37607  ac_ct_AR=$AR
37608  for ac_prog in ar
37609do
37610  # Extract the first word of "$ac_prog", so it can be a program name with args.
37611set dummy $ac_prog; ac_word=$2
37612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37613$as_echo_n "checking for $ac_word... " >&6; }
37614if ${ac_cv_prog_ac_ct_AR+:} false; then :
37615  $as_echo_n "(cached) " >&6
37616else
37617  if test -n "$ac_ct_AR"; then
37618  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37619else
37620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37621for as_dir in $PATH
37622do
37623  IFS=$as_save_IFS
37624  test -z "$as_dir" && as_dir=.
37625    for ac_exec_ext in '' $ac_executable_extensions; do
37626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37627    ac_cv_prog_ac_ct_AR="$ac_prog"
37628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37629    break 2
37630  fi
37631done
37632  done
37633IFS=$as_save_IFS
37634
37635fi
37636fi
37637ac_ct_AR=$ac_cv_prog_ac_ct_AR
37638if test -n "$ac_ct_AR"; then
37639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37640$as_echo "$ac_ct_AR" >&6; }
37641else
37642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37643$as_echo "no" >&6; }
37644fi
37645
37646
37647  test -n "$ac_ct_AR" && break
37648done
37649
37650  if test "x$ac_ct_AR" = x; then
37651    AR=""
37652  else
37653    case $cross_compiling:$ac_tool_warned in
37654yes:)
37655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37657ac_tool_warned=yes ;;
37658esac
37659    AR=$ac_ct_AR
37660  fi
37661fi
37662
37663    else
37664      # If it succeeded, then it was overridden by the user. We will use it
37665      # for the tool.
37666
37667      # First remove it from the list of overridden variables, so we can test
37668      # for unknown variables in the end.
37669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37670
37671      # Check if we try to supply an empty value
37672      if test "x$AR" = x; then
37673        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37674$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37675        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37676$as_echo_n "checking for AR... " >&6; }
37677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37678$as_echo "disabled" >&6; }
37679      else
37680        # Check if the provided tool contains a complete path.
37681        tool_specified="$AR"
37682        tool_basename="${tool_specified##*/}"
37683        if test "x$tool_basename" = "x$tool_specified"; then
37684          # A command without a complete path is provided, search $PATH.
37685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37686$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37687          # Extract the first word of "$tool_basename", so it can be a program name with args.
37688set dummy $tool_basename; ac_word=$2
37689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37690$as_echo_n "checking for $ac_word... " >&6; }
37691if ${ac_cv_path_AR+:} false; then :
37692  $as_echo_n "(cached) " >&6
37693else
37694  case $AR in
37695  [\\/]* | ?:[\\/]*)
37696  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37697  ;;
37698  *)
37699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37700for as_dir in $PATH
37701do
37702  IFS=$as_save_IFS
37703  test -z "$as_dir" && as_dir=.
37704    for ac_exec_ext in '' $ac_executable_extensions; do
37705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37706    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37708    break 2
37709  fi
37710done
37711  done
37712IFS=$as_save_IFS
37713
37714  ;;
37715esac
37716fi
37717AR=$ac_cv_path_AR
37718if test -n "$AR"; then
37719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37720$as_echo "$AR" >&6; }
37721else
37722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37723$as_echo "no" >&6; }
37724fi
37725
37726
37727          if test "x$AR" = x; then
37728            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37729          fi
37730        else
37731          # Otherwise we believe it is a complete path. Use it as it is.
37732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37733$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37734          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37735$as_echo_n "checking for AR... " >&6; }
37736          if test ! -x "$tool_specified"; then
37737            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37738$as_echo "not found" >&6; }
37739            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37740          fi
37741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37742$as_echo "$tool_specified" >&6; }
37743        fi
37744      fi
37745    fi
37746
37747  fi
37748
37749
37750  fi
37751
37752  # Only process if variable expands to non-empty
37753
37754  if test "x$AR" != x; then
37755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37756
37757  # First separate the path from the arguments. This will split at the first
37758  # space.
37759  complete="$AR"
37760  path="${complete%% *}"
37761  tmp="$complete EOL"
37762  arguments="${tmp#* }"
37763
37764  # Input might be given as Windows format, start by converting to
37765  # unix format.
37766  new_path=`$CYGPATH -u "$path"`
37767
37768  # Now try to locate executable using which
37769  new_path=`$WHICH "$new_path" 2> /dev/null`
37770  # bat and cmd files are not always considered executable in cygwin causing which
37771  # to not find them
37772  if test "x$new_path" = x \
37773      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37774      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37775    new_path=`$CYGPATH -u "$path"`
37776  fi
37777  if test "x$new_path" = x; then
37778    # Oops. Which didn't find the executable.
37779    # The splitting of arguments from the executable at a space might have been incorrect,
37780    # since paths with space are more likely in Windows. Give it another try with the whole
37781    # argument.
37782    path="$complete"
37783    arguments="EOL"
37784    new_path=`$CYGPATH -u "$path"`
37785    new_path=`$WHICH "$new_path" 2> /dev/null`
37786    # bat and cmd files are not always considered executable in cygwin causing which
37787    # to not find them
37788    if test "x$new_path" = x \
37789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37791      new_path=`$CYGPATH -u "$path"`
37792    fi
37793    if test "x$new_path" = x; then
37794      # It's still not found. Now this is an unrecoverable error.
37795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37796$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37797      has_space=`$ECHO "$complete" | $GREP " "`
37798      if test "x$has_space" != x; then
37799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37801      fi
37802      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37803    fi
37804  fi
37805
37806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37809  # "foo.exe" is OK but "foo" is an error.
37810  #
37811  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37812  # It is also a way to make sure we got the proper file name for the real test later on.
37813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37814  if test "x$test_shortpath" = x; then
37815    # Short path failed, file does not exist as specified.
37816    # Try adding .exe or .cmd
37817    if test -f "${new_path}.exe"; then
37818      input_to_shortpath="${new_path}.exe"
37819    elif test -f "${new_path}.cmd"; then
37820      input_to_shortpath="${new_path}.cmd"
37821    else
37822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37823$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37824      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37825$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37826      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37827    fi
37828  else
37829    input_to_shortpath="$new_path"
37830  fi
37831
37832  # Call helper function which possibly converts this using DOS-style short mode.
37833  # If so, the updated path is stored in $new_path.
37834  new_path="$input_to_shortpath"
37835
37836  input_path="$input_to_shortpath"
37837  # Check if we need to convert this using DOS-style short mode. If the path
37838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37839  # take no chances and rewrite it.
37840  # Note: m4 eats our [], so we need to use [ and ] instead.
37841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37842  if test "x$has_forbidden_chars" != x; then
37843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37847      # Going to short mode and back again did indeed matter. Since short mode is
37848      # case insensitive, let's make it lowercase to improve readability.
37849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37850      # Now convert it back to Unix-style (cygpath)
37851      input_path=`$CYGPATH -u "$shortmode_path"`
37852      new_path="$input_path"
37853    fi
37854  fi
37855
37856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37857  if test "x$test_cygdrive_prefix" = x; then
37858    # As a simple fix, exclude /usr/bin since it's not a real path.
37859    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37861      # a path prefixed by /cygdrive for fixpath to work.
37862      new_path="$CYGWIN_ROOT_PATH$input_path"
37863    fi
37864  fi
37865
37866  # remove trailing .exe if any
37867  new_path="${new_path/%.exe/}"
37868
37869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37870
37871  # First separate the path from the arguments. This will split at the first
37872  # space.
37873  complete="$AR"
37874  path="${complete%% *}"
37875  tmp="$complete EOL"
37876  arguments="${tmp#* }"
37877
37878  # Input might be given as Windows format, start by converting to
37879  # unix format.
37880  new_path="$path"
37881
37882  windows_path="$new_path"
37883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37884    unix_path=`$CYGPATH -u "$windows_path"`
37885    new_path="$unix_path"
37886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37888    new_path="$unix_path"
37889  fi
37890
37891
37892  # Now try to locate executable using which
37893  new_path=`$WHICH "$new_path" 2> /dev/null`
37894
37895  if test "x$new_path" = x; then
37896    # Oops. Which didn't find the executable.
37897    # The splitting of arguments from the executable at a space might have been incorrect,
37898    # since paths with space are more likely in Windows. Give it another try with the whole
37899    # argument.
37900    path="$complete"
37901    arguments="EOL"
37902    new_path="$path"
37903
37904  windows_path="$new_path"
37905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37906    unix_path=`$CYGPATH -u "$windows_path"`
37907    new_path="$unix_path"
37908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37910    new_path="$unix_path"
37911  fi
37912
37913
37914    new_path=`$WHICH "$new_path" 2> /dev/null`
37915    # bat and cmd files are not always considered executable in MSYS causing which
37916    # to not find them
37917    if test "x$new_path" = x \
37918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37920      new_path="$path"
37921
37922  windows_path="$new_path"
37923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37924    unix_path=`$CYGPATH -u "$windows_path"`
37925    new_path="$unix_path"
37926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37928    new_path="$unix_path"
37929  fi
37930
37931    fi
37932
37933    if test "x$new_path" = x; then
37934      # It's still not found. Now this is an unrecoverable error.
37935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37936$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37937      has_space=`$ECHO "$complete" | $GREP " "`
37938      if test "x$has_space" != x; then
37939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37941      fi
37942      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37943    fi
37944  fi
37945
37946  # Now new_path has a complete unix path to the binary
37947  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37948    # Keep paths in /bin as-is, but remove trailing .exe if any
37949    new_path="${new_path/%.exe/}"
37950    # Do not save /bin paths to all_fixpath_prefixes!
37951  else
37952    # Not in mixed or Windows style, start by that.
37953    new_path=`cmd //c echo $new_path`
37954
37955  input_path="$new_path"
37956  # Check if we need to convert this using DOS-style short mode. If the path
37957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37958  # take no chances and rewrite it.
37959  # Note: m4 eats our [], so we need to use [ and ] instead.
37960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37961  if test "x$has_forbidden_chars" != x; then
37962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37964  fi
37965
37966    # Output is in $new_path
37967
37968  windows_path="$new_path"
37969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37970    unix_path=`$CYGPATH -u "$windows_path"`
37971    new_path="$unix_path"
37972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37974    new_path="$unix_path"
37975  fi
37976
37977    # remove trailing .exe if any
37978    new_path="${new_path/%.exe/}"
37979
37980    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37981    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37982  fi
37983
37984    else
37985      # We're on a unix platform. Hooray! :)
37986      # First separate the path from the arguments. This will split at the first
37987      # space.
37988      complete="$AR"
37989      path="${complete%% *}"
37990      tmp="$complete EOL"
37991      arguments="${tmp#* }"
37992
37993      # Cannot rely on the command "which" here since it doesn't always work.
37994      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37995      if test -z "$is_absolute_path"; then
37996        # Path to executable is not absolute. Find it.
37997        IFS_save="$IFS"
37998        IFS=:
37999        for p in $PATH; do
38000          if test -f "$p/$path" && test -x "$p/$path"; then
38001            new_path="$p/$path"
38002            break
38003          fi
38004        done
38005        IFS="$IFS_save"
38006      else
38007        # This is an absolute path, we can use it without further modifications.
38008        new_path="$path"
38009      fi
38010
38011      if test "x$new_path" = x; then
38012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38013$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38014        has_space=`$ECHO "$complete" | $GREP " "`
38015        if test "x$has_space" != x; then
38016          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38018        fi
38019        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38020      fi
38021    fi
38022
38023    # Now join together the path and the arguments once again
38024    if test "x$arguments" != xEOL; then
38025      new_complete="$new_path ${arguments% *}"
38026    else
38027      new_complete="$new_path"
38028    fi
38029
38030    if test "x$complete" != "x$new_complete"; then
38031      AR="$new_complete"
38032      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38033$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38034    fi
38035  fi
38036
38037
38038
38039  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38040
38041
38042  # Publish this variable in the help.
38043
38044
38045  if [ -z "${LIPO+x}" ]; then
38046    # The variable is not set by user, try to locate tool using the code snippet
38047    for ac_prog in lipo
38048do
38049  # Extract the first word of "$ac_prog", so it can be a program name with args.
38050set dummy $ac_prog; ac_word=$2
38051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38052$as_echo_n "checking for $ac_word... " >&6; }
38053if ${ac_cv_path_LIPO+:} false; then :
38054  $as_echo_n "(cached) " >&6
38055else
38056  case $LIPO in
38057  [\\/]* | ?:[\\/]*)
38058  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38059  ;;
38060  *)
38061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38062for as_dir in $PATH
38063do
38064  IFS=$as_save_IFS
38065  test -z "$as_dir" && as_dir=.
38066    for ac_exec_ext in '' $ac_executable_extensions; do
38067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38068    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38070    break 2
38071  fi
38072done
38073  done
38074IFS=$as_save_IFS
38075
38076  ;;
38077esac
38078fi
38079LIPO=$ac_cv_path_LIPO
38080if test -n "$LIPO"; then
38081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38082$as_echo "$LIPO" >&6; }
38083else
38084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38085$as_echo "no" >&6; }
38086fi
38087
38088
38089  test -n "$LIPO" && break
38090done
38091
38092  else
38093    # The variable is set, but is it from the command line or the environment?
38094
38095    # Try to remove the string !LIPO! from our list.
38096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38098      # If it failed, the variable was not from the command line. Ignore it,
38099      # but warn the user (except for BASH, which is always set by the calling BASH).
38100      if test "xLIPO" != xBASH; then
38101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38102$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38103      fi
38104      # Try to locate tool using the code snippet
38105      for ac_prog in lipo
38106do
38107  # Extract the first word of "$ac_prog", so it can be a program name with args.
38108set dummy $ac_prog; ac_word=$2
38109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38110$as_echo_n "checking for $ac_word... " >&6; }
38111if ${ac_cv_path_LIPO+:} false; then :
38112  $as_echo_n "(cached) " >&6
38113else
38114  case $LIPO in
38115  [\\/]* | ?:[\\/]*)
38116  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38117  ;;
38118  *)
38119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38120for as_dir in $PATH
38121do
38122  IFS=$as_save_IFS
38123  test -z "$as_dir" && as_dir=.
38124    for ac_exec_ext in '' $ac_executable_extensions; do
38125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38126    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38128    break 2
38129  fi
38130done
38131  done
38132IFS=$as_save_IFS
38133
38134  ;;
38135esac
38136fi
38137LIPO=$ac_cv_path_LIPO
38138if test -n "$LIPO"; then
38139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38140$as_echo "$LIPO" >&6; }
38141else
38142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38143$as_echo "no" >&6; }
38144fi
38145
38146
38147  test -n "$LIPO" && break
38148done
38149
38150    else
38151      # If it succeeded, then it was overridden by the user. We will use it
38152      # for the tool.
38153
38154      # First remove it from the list of overridden variables, so we can test
38155      # for unknown variables in the end.
38156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38157
38158      # Check if we try to supply an empty value
38159      if test "x$LIPO" = x; then
38160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38161$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38163$as_echo_n "checking for LIPO... " >&6; }
38164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38165$as_echo "disabled" >&6; }
38166      else
38167        # Check if the provided tool contains a complete path.
38168        tool_specified="$LIPO"
38169        tool_basename="${tool_specified##*/}"
38170        if test "x$tool_basename" = "x$tool_specified"; then
38171          # A command without a complete path is provided, search $PATH.
38172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38173$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38174          # Extract the first word of "$tool_basename", so it can be a program name with args.
38175set dummy $tool_basename; ac_word=$2
38176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38177$as_echo_n "checking for $ac_word... " >&6; }
38178if ${ac_cv_path_LIPO+:} false; then :
38179  $as_echo_n "(cached) " >&6
38180else
38181  case $LIPO in
38182  [\\/]* | ?:[\\/]*)
38183  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38184  ;;
38185  *)
38186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38187for as_dir in $PATH
38188do
38189  IFS=$as_save_IFS
38190  test -z "$as_dir" && as_dir=.
38191    for ac_exec_ext in '' $ac_executable_extensions; do
38192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38193    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38195    break 2
38196  fi
38197done
38198  done
38199IFS=$as_save_IFS
38200
38201  ;;
38202esac
38203fi
38204LIPO=$ac_cv_path_LIPO
38205if test -n "$LIPO"; then
38206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38207$as_echo "$LIPO" >&6; }
38208else
38209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38210$as_echo "no" >&6; }
38211fi
38212
38213
38214          if test "x$LIPO" = x; then
38215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38216          fi
38217        else
38218          # Otherwise we believe it is a complete path. Use it as it is.
38219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38220$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38222$as_echo_n "checking for LIPO... " >&6; }
38223          if test ! -x "$tool_specified"; then
38224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38225$as_echo "not found" >&6; }
38226            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38227          fi
38228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38229$as_echo "$tool_specified" >&6; }
38230        fi
38231      fi
38232    fi
38233
38234  fi
38235
38236
38237
38238  # Only process if variable expands to non-empty
38239
38240  if test "x$LIPO" != x; then
38241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38242
38243  # First separate the path from the arguments. This will split at the first
38244  # space.
38245  complete="$LIPO"
38246  path="${complete%% *}"
38247  tmp="$complete EOL"
38248  arguments="${tmp#* }"
38249
38250  # Input might be given as Windows format, start by converting to
38251  # unix format.
38252  new_path=`$CYGPATH -u "$path"`
38253
38254  # Now try to locate executable using which
38255  new_path=`$WHICH "$new_path" 2> /dev/null`
38256  # bat and cmd files are not always considered executable in cygwin causing which
38257  # to not find them
38258  if test "x$new_path" = x \
38259      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38260      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38261    new_path=`$CYGPATH -u "$path"`
38262  fi
38263  if test "x$new_path" = x; then
38264    # Oops. Which didn't find the executable.
38265    # The splitting of arguments from the executable at a space might have been incorrect,
38266    # since paths with space are more likely in Windows. Give it another try with the whole
38267    # argument.
38268    path="$complete"
38269    arguments="EOL"
38270    new_path=`$CYGPATH -u "$path"`
38271    new_path=`$WHICH "$new_path" 2> /dev/null`
38272    # bat and cmd files are not always considered executable in cygwin causing which
38273    # to not find them
38274    if test "x$new_path" = x \
38275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38277      new_path=`$CYGPATH -u "$path"`
38278    fi
38279    if test "x$new_path" = x; then
38280      # It's still not found. Now this is an unrecoverable error.
38281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38282$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38283      has_space=`$ECHO "$complete" | $GREP " "`
38284      if test "x$has_space" != x; then
38285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38287      fi
38288      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38289    fi
38290  fi
38291
38292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38295  # "foo.exe" is OK but "foo" is an error.
38296  #
38297  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38298  # It is also a way to make sure we got the proper file name for the real test later on.
38299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38300  if test "x$test_shortpath" = x; then
38301    # Short path failed, file does not exist as specified.
38302    # Try adding .exe or .cmd
38303    if test -f "${new_path}.exe"; then
38304      input_to_shortpath="${new_path}.exe"
38305    elif test -f "${new_path}.cmd"; then
38306      input_to_shortpath="${new_path}.cmd"
38307    else
38308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38309$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38310      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38311$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38312      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38313    fi
38314  else
38315    input_to_shortpath="$new_path"
38316  fi
38317
38318  # Call helper function which possibly converts this using DOS-style short mode.
38319  # If so, the updated path is stored in $new_path.
38320  new_path="$input_to_shortpath"
38321
38322  input_path="$input_to_shortpath"
38323  # Check if we need to convert this using DOS-style short mode. If the path
38324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38325  # take no chances and rewrite it.
38326  # Note: m4 eats our [], so we need to use [ and ] instead.
38327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38328  if test "x$has_forbidden_chars" != x; then
38329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38333      # Going to short mode and back again did indeed matter. Since short mode is
38334      # case insensitive, let's make it lowercase to improve readability.
38335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38336      # Now convert it back to Unix-style (cygpath)
38337      input_path=`$CYGPATH -u "$shortmode_path"`
38338      new_path="$input_path"
38339    fi
38340  fi
38341
38342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38343  if test "x$test_cygdrive_prefix" = x; then
38344    # As a simple fix, exclude /usr/bin since it's not a real path.
38345    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38347      # a path prefixed by /cygdrive for fixpath to work.
38348      new_path="$CYGWIN_ROOT_PATH$input_path"
38349    fi
38350  fi
38351
38352  # remove trailing .exe if any
38353  new_path="${new_path/%.exe/}"
38354
38355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38356
38357  # First separate the path from the arguments. This will split at the first
38358  # space.
38359  complete="$LIPO"
38360  path="${complete%% *}"
38361  tmp="$complete EOL"
38362  arguments="${tmp#* }"
38363
38364  # Input might be given as Windows format, start by converting to
38365  # unix format.
38366  new_path="$path"
38367
38368  windows_path="$new_path"
38369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38370    unix_path=`$CYGPATH -u "$windows_path"`
38371    new_path="$unix_path"
38372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38374    new_path="$unix_path"
38375  fi
38376
38377
38378  # Now try to locate executable using which
38379  new_path=`$WHICH "$new_path" 2> /dev/null`
38380
38381  if test "x$new_path" = x; then
38382    # Oops. Which didn't find the executable.
38383    # The splitting of arguments from the executable at a space might have been incorrect,
38384    # since paths with space are more likely in Windows. Give it another try with the whole
38385    # argument.
38386    path="$complete"
38387    arguments="EOL"
38388    new_path="$path"
38389
38390  windows_path="$new_path"
38391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38392    unix_path=`$CYGPATH -u "$windows_path"`
38393    new_path="$unix_path"
38394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38396    new_path="$unix_path"
38397  fi
38398
38399
38400    new_path=`$WHICH "$new_path" 2> /dev/null`
38401    # bat and cmd files are not always considered executable in MSYS causing which
38402    # to not find them
38403    if test "x$new_path" = x \
38404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38406      new_path="$path"
38407
38408  windows_path="$new_path"
38409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38410    unix_path=`$CYGPATH -u "$windows_path"`
38411    new_path="$unix_path"
38412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38414    new_path="$unix_path"
38415  fi
38416
38417    fi
38418
38419    if test "x$new_path" = x; then
38420      # It's still not found. Now this is an unrecoverable error.
38421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38422$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38423      has_space=`$ECHO "$complete" | $GREP " "`
38424      if test "x$has_space" != x; then
38425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38427      fi
38428      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38429    fi
38430  fi
38431
38432  # Now new_path has a complete unix path to the binary
38433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38434    # Keep paths in /bin as-is, but remove trailing .exe if any
38435    new_path="${new_path/%.exe/}"
38436    # Do not save /bin paths to all_fixpath_prefixes!
38437  else
38438    # Not in mixed or Windows style, start by that.
38439    new_path=`cmd //c echo $new_path`
38440
38441  input_path="$new_path"
38442  # Check if we need to convert this using DOS-style short mode. If the path
38443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38444  # take no chances and rewrite it.
38445  # Note: m4 eats our [], so we need to use [ and ] instead.
38446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38447  if test "x$has_forbidden_chars" != x; then
38448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38450  fi
38451
38452    # Output is in $new_path
38453
38454  windows_path="$new_path"
38455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38456    unix_path=`$CYGPATH -u "$windows_path"`
38457    new_path="$unix_path"
38458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38460    new_path="$unix_path"
38461  fi
38462
38463    # remove trailing .exe if any
38464    new_path="${new_path/%.exe/}"
38465
38466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38468  fi
38469
38470    else
38471      # We're on a unix platform. Hooray! :)
38472      # First separate the path from the arguments. This will split at the first
38473      # space.
38474      complete="$LIPO"
38475      path="${complete%% *}"
38476      tmp="$complete EOL"
38477      arguments="${tmp#* }"
38478
38479      # Cannot rely on the command "which" here since it doesn't always work.
38480      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38481      if test -z "$is_absolute_path"; then
38482        # Path to executable is not absolute. Find it.
38483        IFS_save="$IFS"
38484        IFS=:
38485        for p in $PATH; do
38486          if test -f "$p/$path" && test -x "$p/$path"; then
38487            new_path="$p/$path"
38488            break
38489          fi
38490        done
38491        IFS="$IFS_save"
38492      else
38493        # This is an absolute path, we can use it without further modifications.
38494        new_path="$path"
38495      fi
38496
38497      if test "x$new_path" = x; then
38498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38499$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38500        has_space=`$ECHO "$complete" | $GREP " "`
38501        if test "x$has_space" != x; then
38502          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38504        fi
38505        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38506      fi
38507    fi
38508
38509    # Now join together the path and the arguments once again
38510    if test "x$arguments" != xEOL; then
38511      new_complete="$new_path ${arguments% *}"
38512    else
38513      new_complete="$new_path"
38514    fi
38515
38516    if test "x$complete" != "x$new_complete"; then
38517      LIPO="$new_complete"
38518      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38519$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38520    fi
38521  fi
38522
38523  fi
38524
38525  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38526    # Extract the first word of "mt", so it can be a program name with args.
38527set dummy mt; ac_word=$2
38528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38529$as_echo_n "checking for $ac_word... " >&6; }
38530if ${ac_cv_prog_MT+:} false; then :
38531  $as_echo_n "(cached) " >&6
38532else
38533  if test -n "$MT"; then
38534  ac_cv_prog_MT="$MT" # Let the user override the test.
38535else
38536  ac_prog_rejected=no
38537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38538for as_dir in $PATH
38539do
38540  IFS=$as_save_IFS
38541  test -z "$as_dir" && as_dir=.
38542    for ac_exec_ext in '' $ac_executable_extensions; do
38543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38544    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38545       ac_prog_rejected=yes
38546       continue
38547     fi
38548    ac_cv_prog_MT="mt"
38549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38550    break 2
38551  fi
38552done
38553  done
38554IFS=$as_save_IFS
38555
38556if test $ac_prog_rejected = yes; then
38557  # We found a bogon in the path, so make sure we never use it.
38558  set dummy $ac_cv_prog_MT
38559  shift
38560  if test $# != 0; then
38561    # We chose a different compiler from the bogus one.
38562    # However, it has the same basename, so the bogon will be chosen
38563    # first if we set MT to just the basename; use the full file name.
38564    shift
38565    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38566  fi
38567fi
38568fi
38569fi
38570MT=$ac_cv_prog_MT
38571if test -n "$MT"; then
38572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38573$as_echo "$MT" >&6; }
38574else
38575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38576$as_echo "no" >&6; }
38577fi
38578
38579
38580
38581  # Only process if variable expands to non-empty
38582
38583  if test "x$MT" != x; then
38584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38585
38586  # First separate the path from the arguments. This will split at the first
38587  # space.
38588  complete="$MT"
38589  path="${complete%% *}"
38590  tmp="$complete EOL"
38591  arguments="${tmp#* }"
38592
38593  # Input might be given as Windows format, start by converting to
38594  # unix format.
38595  new_path=`$CYGPATH -u "$path"`
38596
38597  # Now try to locate executable using which
38598  new_path=`$WHICH "$new_path" 2> /dev/null`
38599  # bat and cmd files are not always considered executable in cygwin causing which
38600  # to not find them
38601  if test "x$new_path" = x \
38602      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38603      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38604    new_path=`$CYGPATH -u "$path"`
38605  fi
38606  if test "x$new_path" = x; then
38607    # Oops. Which didn't find the executable.
38608    # The splitting of arguments from the executable at a space might have been incorrect,
38609    # since paths with space are more likely in Windows. Give it another try with the whole
38610    # argument.
38611    path="$complete"
38612    arguments="EOL"
38613    new_path=`$CYGPATH -u "$path"`
38614    new_path=`$WHICH "$new_path" 2> /dev/null`
38615    # bat and cmd files are not always considered executable in cygwin causing which
38616    # to not find them
38617    if test "x$new_path" = x \
38618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38620      new_path=`$CYGPATH -u "$path"`
38621    fi
38622    if test "x$new_path" = x; then
38623      # It's still not found. Now this is an unrecoverable error.
38624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38625$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38626      has_space=`$ECHO "$complete" | $GREP " "`
38627      if test "x$has_space" != x; then
38628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38630      fi
38631      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38632    fi
38633  fi
38634
38635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38638  # "foo.exe" is OK but "foo" is an error.
38639  #
38640  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38641  # It is also a way to make sure we got the proper file name for the real test later on.
38642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38643  if test "x$test_shortpath" = x; then
38644    # Short path failed, file does not exist as specified.
38645    # Try adding .exe or .cmd
38646    if test -f "${new_path}.exe"; then
38647      input_to_shortpath="${new_path}.exe"
38648    elif test -f "${new_path}.cmd"; then
38649      input_to_shortpath="${new_path}.cmd"
38650    else
38651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38652$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38653      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38655      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38656    fi
38657  else
38658    input_to_shortpath="$new_path"
38659  fi
38660
38661  # Call helper function which possibly converts this using DOS-style short mode.
38662  # If so, the updated path is stored in $new_path.
38663  new_path="$input_to_shortpath"
38664
38665  input_path="$input_to_shortpath"
38666  # Check if we need to convert this using DOS-style short mode. If the path
38667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38668  # take no chances and rewrite it.
38669  # Note: m4 eats our [], so we need to use [ and ] instead.
38670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38671  if test "x$has_forbidden_chars" != x; then
38672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38676      # Going to short mode and back again did indeed matter. Since short mode is
38677      # case insensitive, let's make it lowercase to improve readability.
38678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38679      # Now convert it back to Unix-style (cygpath)
38680      input_path=`$CYGPATH -u "$shortmode_path"`
38681      new_path="$input_path"
38682    fi
38683  fi
38684
38685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38686  if test "x$test_cygdrive_prefix" = x; then
38687    # As a simple fix, exclude /usr/bin since it's not a real path.
38688    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38690      # a path prefixed by /cygdrive for fixpath to work.
38691      new_path="$CYGWIN_ROOT_PATH$input_path"
38692    fi
38693  fi
38694
38695  # remove trailing .exe if any
38696  new_path="${new_path/%.exe/}"
38697
38698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38699
38700  # First separate the path from the arguments. This will split at the first
38701  # space.
38702  complete="$MT"
38703  path="${complete%% *}"
38704  tmp="$complete EOL"
38705  arguments="${tmp#* }"
38706
38707  # Input might be given as Windows format, start by converting to
38708  # unix format.
38709  new_path="$path"
38710
38711  windows_path="$new_path"
38712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38713    unix_path=`$CYGPATH -u "$windows_path"`
38714    new_path="$unix_path"
38715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38717    new_path="$unix_path"
38718  fi
38719
38720
38721  # Now try to locate executable using which
38722  new_path=`$WHICH "$new_path" 2> /dev/null`
38723
38724  if test "x$new_path" = x; then
38725    # Oops. Which didn't find the executable.
38726    # The splitting of arguments from the executable at a space might have been incorrect,
38727    # since paths with space are more likely in Windows. Give it another try with the whole
38728    # argument.
38729    path="$complete"
38730    arguments="EOL"
38731    new_path="$path"
38732
38733  windows_path="$new_path"
38734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38735    unix_path=`$CYGPATH -u "$windows_path"`
38736    new_path="$unix_path"
38737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38739    new_path="$unix_path"
38740  fi
38741
38742
38743    new_path=`$WHICH "$new_path" 2> /dev/null`
38744    # bat and cmd files are not always considered executable in MSYS causing which
38745    # to not find them
38746    if test "x$new_path" = x \
38747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38749      new_path="$path"
38750
38751  windows_path="$new_path"
38752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38753    unix_path=`$CYGPATH -u "$windows_path"`
38754    new_path="$unix_path"
38755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38757    new_path="$unix_path"
38758  fi
38759
38760    fi
38761
38762    if test "x$new_path" = x; then
38763      # It's still not found. Now this is an unrecoverable error.
38764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38765$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38766      has_space=`$ECHO "$complete" | $GREP " "`
38767      if test "x$has_space" != x; then
38768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38770      fi
38771      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38772    fi
38773  fi
38774
38775  # Now new_path has a complete unix path to the binary
38776  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38777    # Keep paths in /bin as-is, but remove trailing .exe if any
38778    new_path="${new_path/%.exe/}"
38779    # Do not save /bin paths to all_fixpath_prefixes!
38780  else
38781    # Not in mixed or Windows style, start by that.
38782    new_path=`cmd //c echo $new_path`
38783
38784  input_path="$new_path"
38785  # Check if we need to convert this using DOS-style short mode. If the path
38786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38787  # take no chances and rewrite it.
38788  # Note: m4 eats our [], so we need to use [ and ] instead.
38789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38790  if test "x$has_forbidden_chars" != x; then
38791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38793  fi
38794
38795    # Output is in $new_path
38796
38797  windows_path="$new_path"
38798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38799    unix_path=`$CYGPATH -u "$windows_path"`
38800    new_path="$unix_path"
38801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38803    new_path="$unix_path"
38804  fi
38805
38806    # remove trailing .exe if any
38807    new_path="${new_path/%.exe/}"
38808
38809    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38810    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38811  fi
38812
38813    else
38814      # We're on a unix platform. Hooray! :)
38815      # First separate the path from the arguments. This will split at the first
38816      # space.
38817      complete="$MT"
38818      path="${complete%% *}"
38819      tmp="$complete EOL"
38820      arguments="${tmp#* }"
38821
38822      # Cannot rely on the command "which" here since it doesn't always work.
38823      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38824      if test -z "$is_absolute_path"; then
38825        # Path to executable is not absolute. Find it.
38826        IFS_save="$IFS"
38827        IFS=:
38828        for p in $PATH; do
38829          if test -f "$p/$path" && test -x "$p/$path"; then
38830            new_path="$p/$path"
38831            break
38832          fi
38833        done
38834        IFS="$IFS_save"
38835      else
38836        # This is an absolute path, we can use it without further modifications.
38837        new_path="$path"
38838      fi
38839
38840      if test "x$new_path" = x; then
38841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38842$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38843        has_space=`$ECHO "$complete" | $GREP " "`
38844        if test "x$has_space" != x; then
38845          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38846$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38847        fi
38848        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38849      fi
38850    fi
38851
38852    # Now join together the path and the arguments once again
38853    if test "x$arguments" != xEOL; then
38854      new_complete="$new_path ${arguments% *}"
38855    else
38856      new_complete="$new_path"
38857    fi
38858
38859    if test "x$complete" != "x$new_complete"; then
38860      MT="$new_complete"
38861      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38862$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38863    fi
38864  fi
38865
38866    # Setup the resource compiler (RC)
38867    # Extract the first word of "rc", so it can be a program name with args.
38868set dummy rc; ac_word=$2
38869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38870$as_echo_n "checking for $ac_word... " >&6; }
38871if ${ac_cv_prog_RC+:} false; then :
38872  $as_echo_n "(cached) " >&6
38873else
38874  if test -n "$RC"; then
38875  ac_cv_prog_RC="$RC" # Let the user override the test.
38876else
38877  ac_prog_rejected=no
38878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38879for as_dir in $PATH
38880do
38881  IFS=$as_save_IFS
38882  test -z "$as_dir" && as_dir=.
38883    for ac_exec_ext in '' $ac_executable_extensions; do
38884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38885    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38886       ac_prog_rejected=yes
38887       continue
38888     fi
38889    ac_cv_prog_RC="rc"
38890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38891    break 2
38892  fi
38893done
38894  done
38895IFS=$as_save_IFS
38896
38897if test $ac_prog_rejected = yes; then
38898  # We found a bogon in the path, so make sure we never use it.
38899  set dummy $ac_cv_prog_RC
38900  shift
38901  if test $# != 0; then
38902    # We chose a different compiler from the bogus one.
38903    # However, it has the same basename, so the bogon will be chosen
38904    # first if we set RC to just the basename; use the full file name.
38905    shift
38906    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38907  fi
38908fi
38909fi
38910fi
38911RC=$ac_cv_prog_RC
38912if test -n "$RC"; then
38913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38914$as_echo "$RC" >&6; }
38915else
38916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38917$as_echo "no" >&6; }
38918fi
38919
38920
38921
38922  # Only process if variable expands to non-empty
38923
38924  if test "x$RC" != x; then
38925    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38926
38927  # First separate the path from the arguments. This will split at the first
38928  # space.
38929  complete="$RC"
38930  path="${complete%% *}"
38931  tmp="$complete EOL"
38932  arguments="${tmp#* }"
38933
38934  # Input might be given as Windows format, start by converting to
38935  # unix format.
38936  new_path=`$CYGPATH -u "$path"`
38937
38938  # Now try to locate executable using which
38939  new_path=`$WHICH "$new_path" 2> /dev/null`
38940  # bat and cmd files are not always considered executable in cygwin causing which
38941  # to not find them
38942  if test "x$new_path" = x \
38943      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38944      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38945    new_path=`$CYGPATH -u "$path"`
38946  fi
38947  if test "x$new_path" = x; then
38948    # Oops. Which didn't find the executable.
38949    # The splitting of arguments from the executable at a space might have been incorrect,
38950    # since paths with space are more likely in Windows. Give it another try with the whole
38951    # argument.
38952    path="$complete"
38953    arguments="EOL"
38954    new_path=`$CYGPATH -u "$path"`
38955    new_path=`$WHICH "$new_path" 2> /dev/null`
38956    # bat and cmd files are not always considered executable in cygwin causing which
38957    # to not find them
38958    if test "x$new_path" = x \
38959        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38960        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38961      new_path=`$CYGPATH -u "$path"`
38962    fi
38963    if test "x$new_path" = x; then
38964      # It's still not found. Now this is an unrecoverable error.
38965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38966$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38967      has_space=`$ECHO "$complete" | $GREP " "`
38968      if test "x$has_space" != x; then
38969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38971      fi
38972      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38973    fi
38974  fi
38975
38976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38979  # "foo.exe" is OK but "foo" is an error.
38980  #
38981  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38982  # It is also a way to make sure we got the proper file name for the real test later on.
38983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38984  if test "x$test_shortpath" = x; then
38985    # Short path failed, file does not exist as specified.
38986    # Try adding .exe or .cmd
38987    if test -f "${new_path}.exe"; then
38988      input_to_shortpath="${new_path}.exe"
38989    elif test -f "${new_path}.cmd"; then
38990      input_to_shortpath="${new_path}.cmd"
38991    else
38992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38993$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38994      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38995$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38996      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38997    fi
38998  else
38999    input_to_shortpath="$new_path"
39000  fi
39001
39002  # Call helper function which possibly converts this using DOS-style short mode.
39003  # If so, the updated path is stored in $new_path.
39004  new_path="$input_to_shortpath"
39005
39006  input_path="$input_to_shortpath"
39007  # Check if we need to convert this using DOS-style short mode. If the path
39008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39009  # take no chances and rewrite it.
39010  # Note: m4 eats our [], so we need to use [ and ] instead.
39011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39012  if test "x$has_forbidden_chars" != x; then
39013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39017      # Going to short mode and back again did indeed matter. Since short mode is
39018      # case insensitive, let's make it lowercase to improve readability.
39019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39020      # Now convert it back to Unix-style (cygpath)
39021      input_path=`$CYGPATH -u "$shortmode_path"`
39022      new_path="$input_path"
39023    fi
39024  fi
39025
39026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39027  if test "x$test_cygdrive_prefix" = x; then
39028    # As a simple fix, exclude /usr/bin since it's not a real path.
39029    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39031      # a path prefixed by /cygdrive for fixpath to work.
39032      new_path="$CYGWIN_ROOT_PATH$input_path"
39033    fi
39034  fi
39035
39036  # remove trailing .exe if any
39037  new_path="${new_path/%.exe/}"
39038
39039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39040
39041  # First separate the path from the arguments. This will split at the first
39042  # space.
39043  complete="$RC"
39044  path="${complete%% *}"
39045  tmp="$complete EOL"
39046  arguments="${tmp#* }"
39047
39048  # Input might be given as Windows format, start by converting to
39049  # unix format.
39050  new_path="$path"
39051
39052  windows_path="$new_path"
39053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39054    unix_path=`$CYGPATH -u "$windows_path"`
39055    new_path="$unix_path"
39056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39058    new_path="$unix_path"
39059  fi
39060
39061
39062  # Now try to locate executable using which
39063  new_path=`$WHICH "$new_path" 2> /dev/null`
39064
39065  if test "x$new_path" = x; then
39066    # Oops. Which didn't find the executable.
39067    # The splitting of arguments from the executable at a space might have been incorrect,
39068    # since paths with space are more likely in Windows. Give it another try with the whole
39069    # argument.
39070    path="$complete"
39071    arguments="EOL"
39072    new_path="$path"
39073
39074  windows_path="$new_path"
39075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39076    unix_path=`$CYGPATH -u "$windows_path"`
39077    new_path="$unix_path"
39078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39080    new_path="$unix_path"
39081  fi
39082
39083
39084    new_path=`$WHICH "$new_path" 2> /dev/null`
39085    # bat and cmd files are not always considered executable in MSYS causing which
39086    # to not find them
39087    if test "x$new_path" = x \
39088        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39089        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39090      new_path="$path"
39091
39092  windows_path="$new_path"
39093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39094    unix_path=`$CYGPATH -u "$windows_path"`
39095    new_path="$unix_path"
39096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39098    new_path="$unix_path"
39099  fi
39100
39101    fi
39102
39103    if test "x$new_path" = x; then
39104      # It's still not found. Now this is an unrecoverable error.
39105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39106$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39107      has_space=`$ECHO "$complete" | $GREP " "`
39108      if test "x$has_space" != x; then
39109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39111      fi
39112      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39113    fi
39114  fi
39115
39116  # Now new_path has a complete unix path to the binary
39117  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39118    # Keep paths in /bin as-is, but remove trailing .exe if any
39119    new_path="${new_path/%.exe/}"
39120    # Do not save /bin paths to all_fixpath_prefixes!
39121  else
39122    # Not in mixed or Windows style, start by that.
39123    new_path=`cmd //c echo $new_path`
39124
39125  input_path="$new_path"
39126  # Check if we need to convert this using DOS-style short mode. If the path
39127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39128  # take no chances and rewrite it.
39129  # Note: m4 eats our [], so we need to use [ and ] instead.
39130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39131  if test "x$has_forbidden_chars" != x; then
39132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39134  fi
39135
39136    # Output is in $new_path
39137
39138  windows_path="$new_path"
39139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39140    unix_path=`$CYGPATH -u "$windows_path"`
39141    new_path="$unix_path"
39142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39144    new_path="$unix_path"
39145  fi
39146
39147    # remove trailing .exe if any
39148    new_path="${new_path/%.exe/}"
39149
39150    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39151    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39152  fi
39153
39154    else
39155      # We're on a unix platform. Hooray! :)
39156      # First separate the path from the arguments. This will split at the first
39157      # space.
39158      complete="$RC"
39159      path="${complete%% *}"
39160      tmp="$complete EOL"
39161      arguments="${tmp#* }"
39162
39163      # Cannot rely on the command "which" here since it doesn't always work.
39164      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39165      if test -z "$is_absolute_path"; then
39166        # Path to executable is not absolute. Find it.
39167        IFS_save="$IFS"
39168        IFS=:
39169        for p in $PATH; do
39170          if test -f "$p/$path" && test -x "$p/$path"; then
39171            new_path="$p/$path"
39172            break
39173          fi
39174        done
39175        IFS="$IFS_save"
39176      else
39177        # This is an absolute path, we can use it without further modifications.
39178        new_path="$path"
39179      fi
39180
39181      if test "x$new_path" = x; then
39182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39183$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39184        has_space=`$ECHO "$complete" | $GREP " "`
39185        if test "x$has_space" != x; then
39186          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39188        fi
39189        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39190      fi
39191    fi
39192
39193    # Now join together the path and the arguments once again
39194    if test "x$arguments" != xEOL; then
39195      new_complete="$new_path ${arguments% *}"
39196    else
39197      new_complete="$new_path"
39198    fi
39199
39200    if test "x$complete" != "x$new_complete"; then
39201      RC="$new_complete"
39202      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39203$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39204    fi
39205  fi
39206
39207    # Extract the first word of "dumpbin", so it can be a program name with args.
39208set dummy dumpbin; ac_word=$2
39209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39210$as_echo_n "checking for $ac_word... " >&6; }
39211if ${ac_cv_prog_DUMPBIN+:} false; then :
39212  $as_echo_n "(cached) " >&6
39213else
39214  if test -n "$DUMPBIN"; then
39215  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39216else
39217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39218for as_dir in $PATH
39219do
39220  IFS=$as_save_IFS
39221  test -z "$as_dir" && as_dir=.
39222    for ac_exec_ext in '' $ac_executable_extensions; do
39223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39224    ac_cv_prog_DUMPBIN="dumpbin"
39225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39226    break 2
39227  fi
39228done
39229  done
39230IFS=$as_save_IFS
39231
39232fi
39233fi
39234DUMPBIN=$ac_cv_prog_DUMPBIN
39235if test -n "$DUMPBIN"; then
39236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39237$as_echo "$DUMPBIN" >&6; }
39238else
39239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39240$as_echo "no" >&6; }
39241fi
39242
39243
39244
39245  # Only process if variable expands to non-empty
39246
39247  if test "x$DUMPBIN" != x; then
39248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39249
39250  # First separate the path from the arguments. This will split at the first
39251  # space.
39252  complete="$DUMPBIN"
39253  path="${complete%% *}"
39254  tmp="$complete EOL"
39255  arguments="${tmp#* }"
39256
39257  # Input might be given as Windows format, start by converting to
39258  # unix format.
39259  new_path=`$CYGPATH -u "$path"`
39260
39261  # Now try to locate executable using which
39262  new_path=`$WHICH "$new_path" 2> /dev/null`
39263  # bat and cmd files are not always considered executable in cygwin causing which
39264  # to not find them
39265  if test "x$new_path" = x \
39266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39268    new_path=`$CYGPATH -u "$path"`
39269  fi
39270  if test "x$new_path" = x; then
39271    # Oops. Which didn't find the executable.
39272    # The splitting of arguments from the executable at a space might have been incorrect,
39273    # since paths with space are more likely in Windows. Give it another try with the whole
39274    # argument.
39275    path="$complete"
39276    arguments="EOL"
39277    new_path=`$CYGPATH -u "$path"`
39278    new_path=`$WHICH "$new_path" 2> /dev/null`
39279    # bat and cmd files are not always considered executable in cygwin causing which
39280    # to not find them
39281    if test "x$new_path" = x \
39282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39284      new_path=`$CYGPATH -u "$path"`
39285    fi
39286    if test "x$new_path" = x; then
39287      # It's still not found. Now this is an unrecoverable error.
39288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39289$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39290      has_space=`$ECHO "$complete" | $GREP " "`
39291      if test "x$has_space" != x; then
39292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39294      fi
39295      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39296    fi
39297  fi
39298
39299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39302  # "foo.exe" is OK but "foo" is an error.
39303  #
39304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39305  # It is also a way to make sure we got the proper file name for the real test later on.
39306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39307  if test "x$test_shortpath" = x; then
39308    # Short path failed, file does not exist as specified.
39309    # Try adding .exe or .cmd
39310    if test -f "${new_path}.exe"; then
39311      input_to_shortpath="${new_path}.exe"
39312    elif test -f "${new_path}.cmd"; then
39313      input_to_shortpath="${new_path}.cmd"
39314    else
39315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39316$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39319      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39320    fi
39321  else
39322    input_to_shortpath="$new_path"
39323  fi
39324
39325  # Call helper function which possibly converts this using DOS-style short mode.
39326  # If so, the updated path is stored in $new_path.
39327  new_path="$input_to_shortpath"
39328
39329  input_path="$input_to_shortpath"
39330  # Check if we need to convert this using DOS-style short mode. If the path
39331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39332  # take no chances and rewrite it.
39333  # Note: m4 eats our [], so we need to use [ and ] instead.
39334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39335  if test "x$has_forbidden_chars" != x; then
39336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39340      # Going to short mode and back again did indeed matter. Since short mode is
39341      # case insensitive, let's make it lowercase to improve readability.
39342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39343      # Now convert it back to Unix-style (cygpath)
39344      input_path=`$CYGPATH -u "$shortmode_path"`
39345      new_path="$input_path"
39346    fi
39347  fi
39348
39349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39350  if test "x$test_cygdrive_prefix" = x; then
39351    # As a simple fix, exclude /usr/bin since it's not a real path.
39352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39354      # a path prefixed by /cygdrive for fixpath to work.
39355      new_path="$CYGWIN_ROOT_PATH$input_path"
39356    fi
39357  fi
39358
39359  # remove trailing .exe if any
39360  new_path="${new_path/%.exe/}"
39361
39362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39363
39364  # First separate the path from the arguments. This will split at the first
39365  # space.
39366  complete="$DUMPBIN"
39367  path="${complete%% *}"
39368  tmp="$complete EOL"
39369  arguments="${tmp#* }"
39370
39371  # Input might be given as Windows format, start by converting to
39372  # unix format.
39373  new_path="$path"
39374
39375  windows_path="$new_path"
39376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39377    unix_path=`$CYGPATH -u "$windows_path"`
39378    new_path="$unix_path"
39379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39381    new_path="$unix_path"
39382  fi
39383
39384
39385  # Now try to locate executable using which
39386  new_path=`$WHICH "$new_path" 2> /dev/null`
39387
39388  if test "x$new_path" = x; then
39389    # Oops. Which didn't find the executable.
39390    # The splitting of arguments from the executable at a space might have been incorrect,
39391    # since paths with space are more likely in Windows. Give it another try with the whole
39392    # argument.
39393    path="$complete"
39394    arguments="EOL"
39395    new_path="$path"
39396
39397  windows_path="$new_path"
39398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39399    unix_path=`$CYGPATH -u "$windows_path"`
39400    new_path="$unix_path"
39401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39403    new_path="$unix_path"
39404  fi
39405
39406
39407    new_path=`$WHICH "$new_path" 2> /dev/null`
39408    # bat and cmd files are not always considered executable in MSYS causing which
39409    # to not find them
39410    if test "x$new_path" = x \
39411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
39425
39426    if test "x$new_path" = x; then
39427      # It's still not found. Now this is an unrecoverable error.
39428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39429$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39430      has_space=`$ECHO "$complete" | $GREP " "`
39431      if test "x$has_space" != x; then
39432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39434      fi
39435      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39436    fi
39437  fi
39438
39439  # Now new_path has a complete unix path to the binary
39440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39441    # Keep paths in /bin as-is, but remove trailing .exe if any
39442    new_path="${new_path/%.exe/}"
39443    # Do not save /bin paths to all_fixpath_prefixes!
39444  else
39445    # Not in mixed or Windows style, start by that.
39446    new_path=`cmd //c echo $new_path`
39447
39448  input_path="$new_path"
39449  # Check if we need to convert this using DOS-style short mode. If the path
39450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39451  # take no chances and rewrite it.
39452  # Note: m4 eats our [], so we need to use [ and ] instead.
39453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39454  if test "x$has_forbidden_chars" != x; then
39455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39457  fi
39458
39459    # Output is in $new_path
39460
39461  windows_path="$new_path"
39462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39463    unix_path=`$CYGPATH -u "$windows_path"`
39464    new_path="$unix_path"
39465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39467    new_path="$unix_path"
39468  fi
39469
39470    # remove trailing .exe if any
39471    new_path="${new_path/%.exe/}"
39472
39473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39475  fi
39476
39477    else
39478      # We're on a unix platform. Hooray! :)
39479      # First separate the path from the arguments. This will split at the first
39480      # space.
39481      complete="$DUMPBIN"
39482      path="${complete%% *}"
39483      tmp="$complete EOL"
39484      arguments="${tmp#* }"
39485
39486      # Cannot rely on the command "which" here since it doesn't always work.
39487      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39488      if test -z "$is_absolute_path"; then
39489        # Path to executable is not absolute. Find it.
39490        IFS_save="$IFS"
39491        IFS=:
39492        for p in $PATH; do
39493          if test -f "$p/$path" && test -x "$p/$path"; then
39494            new_path="$p/$path"
39495            break
39496          fi
39497        done
39498        IFS="$IFS_save"
39499      else
39500        # This is an absolute path, we can use it without further modifications.
39501        new_path="$path"
39502      fi
39503
39504      if test "x$new_path" = x; then
39505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39506$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39507        has_space=`$ECHO "$complete" | $GREP " "`
39508        if test "x$has_space" != x; then
39509          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39511        fi
39512        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39513      fi
39514    fi
39515
39516    # Now join together the path and the arguments once again
39517    if test "x$arguments" != xEOL; then
39518      new_complete="$new_path ${arguments% *}"
39519    else
39520      new_complete="$new_path"
39521    fi
39522
39523    if test "x$complete" != "x$new_complete"; then
39524      DUMPBIN="$new_complete"
39525      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39526$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39527    fi
39528  fi
39529
39530    # We need to check for 'msbuild.exe' because at the place where we expect to
39531    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39532    # won't find the 'msbuild.exe' executable in that case (and the
39533    # 'ac_executable_extensions' is unusable due to performance reasons).
39534    # Notice that we intentionally don't fix up the path to MSBUILD because we
39535    # will call it in a DOS shell during freetype detection on Windows (see
39536    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39537    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39538set dummy msbuild.exe; ac_word=$2
39539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39540$as_echo_n "checking for $ac_word... " >&6; }
39541if ${ac_cv_prog_MSBUILD+:} false; then :
39542  $as_echo_n "(cached) " >&6
39543else
39544  if test -n "$MSBUILD"; then
39545  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39546else
39547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39548for as_dir in $PATH
39549do
39550  IFS=$as_save_IFS
39551  test -z "$as_dir" && as_dir=.
39552    for ac_exec_ext in '' $ac_executable_extensions; do
39553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39554    ac_cv_prog_MSBUILD="msbuild.exe"
39555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39556    break 2
39557  fi
39558done
39559  done
39560IFS=$as_save_IFS
39561
39562fi
39563fi
39564MSBUILD=$ac_cv_prog_MSBUILD
39565if test -n "$MSBUILD"; then
39566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39567$as_echo "$MSBUILD" >&6; }
39568else
39569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39570$as_echo "no" >&6; }
39571fi
39572
39573
39574  fi
39575
39576  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39577
39578
39579  # Publish this variable in the help.
39580
39581
39582  if [ -z "${STRIP+x}" ]; then
39583    # The variable is not set by user, try to locate tool using the code snippet
39584    for ac_prog in strip
39585do
39586  # Extract the first word of "$ac_prog", so it can be a program name with args.
39587set dummy $ac_prog; ac_word=$2
39588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39589$as_echo_n "checking for $ac_word... " >&6; }
39590if ${ac_cv_path_STRIP+:} false; then :
39591  $as_echo_n "(cached) " >&6
39592else
39593  case $STRIP in
39594  [\\/]* | ?:[\\/]*)
39595  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39596  ;;
39597  *)
39598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39599for as_dir in $PATH
39600do
39601  IFS=$as_save_IFS
39602  test -z "$as_dir" && as_dir=.
39603    for ac_exec_ext in '' $ac_executable_extensions; do
39604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39605    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39607    break 2
39608  fi
39609done
39610  done
39611IFS=$as_save_IFS
39612
39613  ;;
39614esac
39615fi
39616STRIP=$ac_cv_path_STRIP
39617if test -n "$STRIP"; then
39618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39619$as_echo "$STRIP" >&6; }
39620else
39621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39622$as_echo "no" >&6; }
39623fi
39624
39625
39626  test -n "$STRIP" && break
39627done
39628
39629  else
39630    # The variable is set, but is it from the command line or the environment?
39631
39632    # Try to remove the string !STRIP! from our list.
39633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39635      # If it failed, the variable was not from the command line. Ignore it,
39636      # but warn the user (except for BASH, which is always set by the calling BASH).
39637      if test "xSTRIP" != xBASH; then
39638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39639$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39640      fi
39641      # Try to locate tool using the code snippet
39642      for ac_prog in strip
39643do
39644  # Extract the first word of "$ac_prog", so it can be a program name with args.
39645set dummy $ac_prog; ac_word=$2
39646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39647$as_echo_n "checking for $ac_word... " >&6; }
39648if ${ac_cv_path_STRIP+:} false; then :
39649  $as_echo_n "(cached) " >&6
39650else
39651  case $STRIP in
39652  [\\/]* | ?:[\\/]*)
39653  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39654  ;;
39655  *)
39656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39657for as_dir in $PATH
39658do
39659  IFS=$as_save_IFS
39660  test -z "$as_dir" && as_dir=.
39661    for ac_exec_ext in '' $ac_executable_extensions; do
39662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39663    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39665    break 2
39666  fi
39667done
39668  done
39669IFS=$as_save_IFS
39670
39671  ;;
39672esac
39673fi
39674STRIP=$ac_cv_path_STRIP
39675if test -n "$STRIP"; then
39676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39677$as_echo "$STRIP" >&6; }
39678else
39679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39680$as_echo "no" >&6; }
39681fi
39682
39683
39684  test -n "$STRIP" && break
39685done
39686
39687    else
39688      # If it succeeded, then it was overridden by the user. We will use it
39689      # for the tool.
39690
39691      # First remove it from the list of overridden variables, so we can test
39692      # for unknown variables in the end.
39693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39694
39695      # Check if we try to supply an empty value
39696      if test "x$STRIP" = x; then
39697        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39698$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39700$as_echo_n "checking for STRIP... " >&6; }
39701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39702$as_echo "disabled" >&6; }
39703      else
39704        # Check if the provided tool contains a complete path.
39705        tool_specified="$STRIP"
39706        tool_basename="${tool_specified##*/}"
39707        if test "x$tool_basename" = "x$tool_specified"; then
39708          # A command without a complete path is provided, search $PATH.
39709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39710$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39711          # Extract the first word of "$tool_basename", so it can be a program name with args.
39712set dummy $tool_basename; ac_word=$2
39713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39714$as_echo_n "checking for $ac_word... " >&6; }
39715if ${ac_cv_path_STRIP+:} false; then :
39716  $as_echo_n "(cached) " >&6
39717else
39718  case $STRIP in
39719  [\\/]* | ?:[\\/]*)
39720  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39721  ;;
39722  *)
39723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39724for as_dir in $PATH
39725do
39726  IFS=$as_save_IFS
39727  test -z "$as_dir" && as_dir=.
39728    for ac_exec_ext in '' $ac_executable_extensions; do
39729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39730    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39732    break 2
39733  fi
39734done
39735  done
39736IFS=$as_save_IFS
39737
39738  ;;
39739esac
39740fi
39741STRIP=$ac_cv_path_STRIP
39742if test -n "$STRIP"; then
39743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39744$as_echo "$STRIP" >&6; }
39745else
39746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39747$as_echo "no" >&6; }
39748fi
39749
39750
39751          if test "x$STRIP" = x; then
39752            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39753          fi
39754        else
39755          # Otherwise we believe it is a complete path. Use it as it is.
39756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39757$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39758          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39759$as_echo_n "checking for STRIP... " >&6; }
39760          if test ! -x "$tool_specified"; then
39761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39762$as_echo "not found" >&6; }
39763            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39764          fi
39765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39766$as_echo "$tool_specified" >&6; }
39767        fi
39768      fi
39769    fi
39770
39771  fi
39772
39773
39774
39775  # Only process if variable expands to non-empty
39776
39777  if test "x$STRIP" != x; then
39778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39779
39780  # First separate the path from the arguments. This will split at the first
39781  # space.
39782  complete="$STRIP"
39783  path="${complete%% *}"
39784  tmp="$complete EOL"
39785  arguments="${tmp#* }"
39786
39787  # Input might be given as Windows format, start by converting to
39788  # unix format.
39789  new_path=`$CYGPATH -u "$path"`
39790
39791  # Now try to locate executable using which
39792  new_path=`$WHICH "$new_path" 2> /dev/null`
39793  # bat and cmd files are not always considered executable in cygwin causing which
39794  # to not find them
39795  if test "x$new_path" = x \
39796      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39797      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39798    new_path=`$CYGPATH -u "$path"`
39799  fi
39800  if test "x$new_path" = x; then
39801    # Oops. Which didn't find the executable.
39802    # The splitting of arguments from the executable at a space might have been incorrect,
39803    # since paths with space are more likely in Windows. Give it another try with the whole
39804    # argument.
39805    path="$complete"
39806    arguments="EOL"
39807    new_path=`$CYGPATH -u "$path"`
39808    new_path=`$WHICH "$new_path" 2> /dev/null`
39809    # bat and cmd files are not always considered executable in cygwin causing which
39810    # to not find them
39811    if test "x$new_path" = x \
39812        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39813        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39814      new_path=`$CYGPATH -u "$path"`
39815    fi
39816    if test "x$new_path" = x; then
39817      # It's still not found. Now this is an unrecoverable error.
39818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39819$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39820      has_space=`$ECHO "$complete" | $GREP " "`
39821      if test "x$has_space" != x; then
39822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39824      fi
39825      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39826    fi
39827  fi
39828
39829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39832  # "foo.exe" is OK but "foo" is an error.
39833  #
39834  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39835  # It is also a way to make sure we got the proper file name for the real test later on.
39836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39837  if test "x$test_shortpath" = x; then
39838    # Short path failed, file does not exist as specified.
39839    # Try adding .exe or .cmd
39840    if test -f "${new_path}.exe"; then
39841      input_to_shortpath="${new_path}.exe"
39842    elif test -f "${new_path}.cmd"; then
39843      input_to_shortpath="${new_path}.cmd"
39844    else
39845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39846$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39847      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39848$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39849      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39850    fi
39851  else
39852    input_to_shortpath="$new_path"
39853  fi
39854
39855  # Call helper function which possibly converts this using DOS-style short mode.
39856  # If so, the updated path is stored in $new_path.
39857  new_path="$input_to_shortpath"
39858
39859  input_path="$input_to_shortpath"
39860  # Check if we need to convert this using DOS-style short mode. If the path
39861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39862  # take no chances and rewrite it.
39863  # Note: m4 eats our [], so we need to use [ and ] instead.
39864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39865  if test "x$has_forbidden_chars" != x; then
39866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39870      # Going to short mode and back again did indeed matter. Since short mode is
39871      # case insensitive, let's make it lowercase to improve readability.
39872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39873      # Now convert it back to Unix-style (cygpath)
39874      input_path=`$CYGPATH -u "$shortmode_path"`
39875      new_path="$input_path"
39876    fi
39877  fi
39878
39879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39880  if test "x$test_cygdrive_prefix" = x; then
39881    # As a simple fix, exclude /usr/bin since it's not a real path.
39882    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39884      # a path prefixed by /cygdrive for fixpath to work.
39885      new_path="$CYGWIN_ROOT_PATH$input_path"
39886    fi
39887  fi
39888
39889  # remove trailing .exe if any
39890  new_path="${new_path/%.exe/}"
39891
39892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39893
39894  # First separate the path from the arguments. This will split at the first
39895  # space.
39896  complete="$STRIP"
39897  path="${complete%% *}"
39898  tmp="$complete EOL"
39899  arguments="${tmp#* }"
39900
39901  # Input might be given as Windows format, start by converting to
39902  # unix format.
39903  new_path="$path"
39904
39905  windows_path="$new_path"
39906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39907    unix_path=`$CYGPATH -u "$windows_path"`
39908    new_path="$unix_path"
39909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39911    new_path="$unix_path"
39912  fi
39913
39914
39915  # Now try to locate executable using which
39916  new_path=`$WHICH "$new_path" 2> /dev/null`
39917
39918  if test "x$new_path" = x; then
39919    # Oops. Which didn't find the executable.
39920    # The splitting of arguments from the executable at a space might have been incorrect,
39921    # since paths with space are more likely in Windows. Give it another try with the whole
39922    # argument.
39923    path="$complete"
39924    arguments="EOL"
39925    new_path="$path"
39926
39927  windows_path="$new_path"
39928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39929    unix_path=`$CYGPATH -u "$windows_path"`
39930    new_path="$unix_path"
39931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39933    new_path="$unix_path"
39934  fi
39935
39936
39937    new_path=`$WHICH "$new_path" 2> /dev/null`
39938    # bat and cmd files are not always considered executable in MSYS causing which
39939    # to not find them
39940    if test "x$new_path" = x \
39941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39943      new_path="$path"
39944
39945  windows_path="$new_path"
39946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39947    unix_path=`$CYGPATH -u "$windows_path"`
39948    new_path="$unix_path"
39949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39951    new_path="$unix_path"
39952  fi
39953
39954    fi
39955
39956    if test "x$new_path" = x; then
39957      # It's still not found. Now this is an unrecoverable error.
39958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39959$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39960      has_space=`$ECHO "$complete" | $GREP " "`
39961      if test "x$has_space" != x; then
39962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39964      fi
39965      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39966    fi
39967  fi
39968
39969  # Now new_path has a complete unix path to the binary
39970  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39971    # Keep paths in /bin as-is, but remove trailing .exe if any
39972    new_path="${new_path/%.exe/}"
39973    # Do not save /bin paths to all_fixpath_prefixes!
39974  else
39975    # Not in mixed or Windows style, start by that.
39976    new_path=`cmd //c echo $new_path`
39977
39978  input_path="$new_path"
39979  # Check if we need to convert this using DOS-style short mode. If the path
39980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39981  # take no chances and rewrite it.
39982  # Note: m4 eats our [], so we need to use [ and ] instead.
39983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39984  if test "x$has_forbidden_chars" != x; then
39985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39987  fi
39988
39989    # Output is in $new_path
39990
39991  windows_path="$new_path"
39992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39993    unix_path=`$CYGPATH -u "$windows_path"`
39994    new_path="$unix_path"
39995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39997    new_path="$unix_path"
39998  fi
39999
40000    # remove trailing .exe if any
40001    new_path="${new_path/%.exe/}"
40002
40003    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40004    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40005  fi
40006
40007    else
40008      # We're on a unix platform. Hooray! :)
40009      # First separate the path from the arguments. This will split at the first
40010      # space.
40011      complete="$STRIP"
40012      path="${complete%% *}"
40013      tmp="$complete EOL"
40014      arguments="${tmp#* }"
40015
40016      # Cannot rely on the command "which" here since it doesn't always work.
40017      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40018      if test -z "$is_absolute_path"; then
40019        # Path to executable is not absolute. Find it.
40020        IFS_save="$IFS"
40021        IFS=:
40022        for p in $PATH; do
40023          if test -f "$p/$path" && test -x "$p/$path"; then
40024            new_path="$p/$path"
40025            break
40026          fi
40027        done
40028        IFS="$IFS_save"
40029      else
40030        # This is an absolute path, we can use it without further modifications.
40031        new_path="$path"
40032      fi
40033
40034      if test "x$new_path" = x; then
40035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40036$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40037        has_space=`$ECHO "$complete" | $GREP " "`
40038        if test "x$has_space" != x; then
40039          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40040$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40041        fi
40042        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40043      fi
40044    fi
40045
40046    # Now join together the path and the arguments once again
40047    if test "x$arguments" != xEOL; then
40048      new_complete="$new_path ${arguments% *}"
40049    else
40050      new_complete="$new_path"
40051    fi
40052
40053    if test "x$complete" != "x$new_complete"; then
40054      STRIP="$new_complete"
40055      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40056$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40057    fi
40058  fi
40059
40060
40061
40062  # Publish this variable in the help.
40063
40064
40065  if [ -z "${NM+x}" ]; then
40066    # The variable is not set by user, try to locate tool using the code snippet
40067    for ac_prog in nm
40068do
40069  # Extract the first word of "$ac_prog", so it can be a program name with args.
40070set dummy $ac_prog; ac_word=$2
40071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40072$as_echo_n "checking for $ac_word... " >&6; }
40073if ${ac_cv_path_NM+:} false; then :
40074  $as_echo_n "(cached) " >&6
40075else
40076  case $NM in
40077  [\\/]* | ?:[\\/]*)
40078  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40079  ;;
40080  *)
40081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40082for as_dir in $PATH
40083do
40084  IFS=$as_save_IFS
40085  test -z "$as_dir" && as_dir=.
40086    for ac_exec_ext in '' $ac_executable_extensions; do
40087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40088    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40090    break 2
40091  fi
40092done
40093  done
40094IFS=$as_save_IFS
40095
40096  ;;
40097esac
40098fi
40099NM=$ac_cv_path_NM
40100if test -n "$NM"; then
40101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40102$as_echo "$NM" >&6; }
40103else
40104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40105$as_echo "no" >&6; }
40106fi
40107
40108
40109  test -n "$NM" && break
40110done
40111
40112  else
40113    # The variable is set, but is it from the command line or the environment?
40114
40115    # Try to remove the string !NM! from our list.
40116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40118      # If it failed, the variable was not from the command line. Ignore it,
40119      # but warn the user (except for BASH, which is always set by the calling BASH).
40120      if test "xNM" != xBASH; then
40121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40122$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40123      fi
40124      # Try to locate tool using the code snippet
40125      for ac_prog in nm
40126do
40127  # Extract the first word of "$ac_prog", so it can be a program name with args.
40128set dummy $ac_prog; ac_word=$2
40129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40130$as_echo_n "checking for $ac_word... " >&6; }
40131if ${ac_cv_path_NM+:} false; then :
40132  $as_echo_n "(cached) " >&6
40133else
40134  case $NM in
40135  [\\/]* | ?:[\\/]*)
40136  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40137  ;;
40138  *)
40139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40140for as_dir in $PATH
40141do
40142  IFS=$as_save_IFS
40143  test -z "$as_dir" && as_dir=.
40144    for ac_exec_ext in '' $ac_executable_extensions; do
40145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40146    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40148    break 2
40149  fi
40150done
40151  done
40152IFS=$as_save_IFS
40153
40154  ;;
40155esac
40156fi
40157NM=$ac_cv_path_NM
40158if test -n "$NM"; then
40159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40160$as_echo "$NM" >&6; }
40161else
40162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40163$as_echo "no" >&6; }
40164fi
40165
40166
40167  test -n "$NM" && break
40168done
40169
40170    else
40171      # If it succeeded, then it was overridden by the user. We will use it
40172      # for the tool.
40173
40174      # First remove it from the list of overridden variables, so we can test
40175      # for unknown variables in the end.
40176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40177
40178      # Check if we try to supply an empty value
40179      if test "x$NM" = x; then
40180        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40181$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40183$as_echo_n "checking for NM... " >&6; }
40184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40185$as_echo "disabled" >&6; }
40186      else
40187        # Check if the provided tool contains a complete path.
40188        tool_specified="$NM"
40189        tool_basename="${tool_specified##*/}"
40190        if test "x$tool_basename" = "x$tool_specified"; then
40191          # A command without a complete path is provided, search $PATH.
40192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40193$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40194          # Extract the first word of "$tool_basename", so it can be a program name with args.
40195set dummy $tool_basename; ac_word=$2
40196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40197$as_echo_n "checking for $ac_word... " >&6; }
40198if ${ac_cv_path_NM+:} false; then :
40199  $as_echo_n "(cached) " >&6
40200else
40201  case $NM in
40202  [\\/]* | ?:[\\/]*)
40203  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40204  ;;
40205  *)
40206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40207for as_dir in $PATH
40208do
40209  IFS=$as_save_IFS
40210  test -z "$as_dir" && as_dir=.
40211    for ac_exec_ext in '' $ac_executable_extensions; do
40212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40213    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40215    break 2
40216  fi
40217done
40218  done
40219IFS=$as_save_IFS
40220
40221  ;;
40222esac
40223fi
40224NM=$ac_cv_path_NM
40225if test -n "$NM"; then
40226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40227$as_echo "$NM" >&6; }
40228else
40229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40230$as_echo "no" >&6; }
40231fi
40232
40233
40234          if test "x$NM" = x; then
40235            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40236          fi
40237        else
40238          # Otherwise we believe it is a complete path. Use it as it is.
40239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40240$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40241          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40242$as_echo_n "checking for NM... " >&6; }
40243          if test ! -x "$tool_specified"; then
40244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40245$as_echo "not found" >&6; }
40246            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40247          fi
40248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40249$as_echo "$tool_specified" >&6; }
40250        fi
40251      fi
40252    fi
40253
40254  fi
40255
40256
40257
40258  # Only process if variable expands to non-empty
40259
40260  if test "x$NM" != x; then
40261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40262
40263  # First separate the path from the arguments. This will split at the first
40264  # space.
40265  complete="$NM"
40266  path="${complete%% *}"
40267  tmp="$complete EOL"
40268  arguments="${tmp#* }"
40269
40270  # Input might be given as Windows format, start by converting to
40271  # unix format.
40272  new_path=`$CYGPATH -u "$path"`
40273
40274  # Now try to locate executable using which
40275  new_path=`$WHICH "$new_path" 2> /dev/null`
40276  # bat and cmd files are not always considered executable in cygwin causing which
40277  # to not find them
40278  if test "x$new_path" = x \
40279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40281    new_path=`$CYGPATH -u "$path"`
40282  fi
40283  if test "x$new_path" = x; then
40284    # Oops. Which didn't find the executable.
40285    # The splitting of arguments from the executable at a space might have been incorrect,
40286    # since paths with space are more likely in Windows. Give it another try with the whole
40287    # argument.
40288    path="$complete"
40289    arguments="EOL"
40290    new_path=`$CYGPATH -u "$path"`
40291    new_path=`$WHICH "$new_path" 2> /dev/null`
40292    # bat and cmd files are not always considered executable in cygwin causing which
40293    # to not find them
40294    if test "x$new_path" = x \
40295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40297      new_path=`$CYGPATH -u "$path"`
40298    fi
40299    if test "x$new_path" = x; then
40300      # It's still not found. Now this is an unrecoverable error.
40301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40302$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40303      has_space=`$ECHO "$complete" | $GREP " "`
40304      if test "x$has_space" != x; then
40305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40307      fi
40308      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40309    fi
40310  fi
40311
40312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40315  # "foo.exe" is OK but "foo" is an error.
40316  #
40317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40318  # It is also a way to make sure we got the proper file name for the real test later on.
40319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40320  if test "x$test_shortpath" = x; then
40321    # Short path failed, file does not exist as specified.
40322    # Try adding .exe or .cmd
40323    if test -f "${new_path}.exe"; then
40324      input_to_shortpath="${new_path}.exe"
40325    elif test -f "${new_path}.cmd"; then
40326      input_to_shortpath="${new_path}.cmd"
40327    else
40328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40329$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40332      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40333    fi
40334  else
40335    input_to_shortpath="$new_path"
40336  fi
40337
40338  # Call helper function which possibly converts this using DOS-style short mode.
40339  # If so, the updated path is stored in $new_path.
40340  new_path="$input_to_shortpath"
40341
40342  input_path="$input_to_shortpath"
40343  # Check if we need to convert this using DOS-style short mode. If the path
40344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40345  # take no chances and rewrite it.
40346  # Note: m4 eats our [], so we need to use [ and ] instead.
40347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40348  if test "x$has_forbidden_chars" != x; then
40349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40353      # Going to short mode and back again did indeed matter. Since short mode is
40354      # case insensitive, let's make it lowercase to improve readability.
40355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40356      # Now convert it back to Unix-style (cygpath)
40357      input_path=`$CYGPATH -u "$shortmode_path"`
40358      new_path="$input_path"
40359    fi
40360  fi
40361
40362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40363  if test "x$test_cygdrive_prefix" = x; then
40364    # As a simple fix, exclude /usr/bin since it's not a real path.
40365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40367      # a path prefixed by /cygdrive for fixpath to work.
40368      new_path="$CYGWIN_ROOT_PATH$input_path"
40369    fi
40370  fi
40371
40372  # remove trailing .exe if any
40373  new_path="${new_path/%.exe/}"
40374
40375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40376
40377  # First separate the path from the arguments. This will split at the first
40378  # space.
40379  complete="$NM"
40380  path="${complete%% *}"
40381  tmp="$complete EOL"
40382  arguments="${tmp#* }"
40383
40384  # Input might be given as Windows format, start by converting to
40385  # unix format.
40386  new_path="$path"
40387
40388  windows_path="$new_path"
40389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40390    unix_path=`$CYGPATH -u "$windows_path"`
40391    new_path="$unix_path"
40392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40394    new_path="$unix_path"
40395  fi
40396
40397
40398  # Now try to locate executable using which
40399  new_path=`$WHICH "$new_path" 2> /dev/null`
40400
40401  if test "x$new_path" = x; then
40402    # Oops. Which didn't find the executable.
40403    # The splitting of arguments from the executable at a space might have been incorrect,
40404    # since paths with space are more likely in Windows. Give it another try with the whole
40405    # argument.
40406    path="$complete"
40407    arguments="EOL"
40408    new_path="$path"
40409
40410  windows_path="$new_path"
40411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40412    unix_path=`$CYGPATH -u "$windows_path"`
40413    new_path="$unix_path"
40414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40416    new_path="$unix_path"
40417  fi
40418
40419
40420    new_path=`$WHICH "$new_path" 2> /dev/null`
40421    # bat and cmd files are not always considered executable in MSYS causing which
40422    # to not find them
40423    if test "x$new_path" = x \
40424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40426      new_path="$path"
40427
40428  windows_path="$new_path"
40429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40430    unix_path=`$CYGPATH -u "$windows_path"`
40431    new_path="$unix_path"
40432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40434    new_path="$unix_path"
40435  fi
40436
40437    fi
40438
40439    if test "x$new_path" = x; then
40440      # It's still not found. Now this is an unrecoverable error.
40441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40442$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40443      has_space=`$ECHO "$complete" | $GREP " "`
40444      if test "x$has_space" != x; then
40445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40447      fi
40448      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40449    fi
40450  fi
40451
40452  # Now new_path has a complete unix path to the binary
40453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40454    # Keep paths in /bin as-is, but remove trailing .exe if any
40455    new_path="${new_path/%.exe/}"
40456    # Do not save /bin paths to all_fixpath_prefixes!
40457  else
40458    # Not in mixed or Windows style, start by that.
40459    new_path=`cmd //c echo $new_path`
40460
40461  input_path="$new_path"
40462  # Check if we need to convert this using DOS-style short mode. If the path
40463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40464  # take no chances and rewrite it.
40465  # Note: m4 eats our [], so we need to use [ and ] instead.
40466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40467  if test "x$has_forbidden_chars" != x; then
40468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40470  fi
40471
40472    # Output is in $new_path
40473
40474  windows_path="$new_path"
40475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40476    unix_path=`$CYGPATH -u "$windows_path"`
40477    new_path="$unix_path"
40478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40480    new_path="$unix_path"
40481  fi
40482
40483    # remove trailing .exe if any
40484    new_path="${new_path/%.exe/}"
40485
40486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40488  fi
40489
40490    else
40491      # We're on a unix platform. Hooray! :)
40492      # First separate the path from the arguments. This will split at the first
40493      # space.
40494      complete="$NM"
40495      path="${complete%% *}"
40496      tmp="$complete EOL"
40497      arguments="${tmp#* }"
40498
40499      # Cannot rely on the command "which" here since it doesn't always work.
40500      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40501      if test -z "$is_absolute_path"; then
40502        # Path to executable is not absolute. Find it.
40503        IFS_save="$IFS"
40504        IFS=:
40505        for p in $PATH; do
40506          if test -f "$p/$path" && test -x "$p/$path"; then
40507            new_path="$p/$path"
40508            break
40509          fi
40510        done
40511        IFS="$IFS_save"
40512      else
40513        # This is an absolute path, we can use it without further modifications.
40514        new_path="$path"
40515      fi
40516
40517      if test "x$new_path" = x; then
40518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40519$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40520        has_space=`$ECHO "$complete" | $GREP " "`
40521        if test "x$has_space" != x; then
40522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40524        fi
40525        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40526      fi
40527    fi
40528
40529    # Now join together the path and the arguments once again
40530    if test "x$arguments" != xEOL; then
40531      new_complete="$new_path ${arguments% *}"
40532    else
40533      new_complete="$new_path"
40534    fi
40535
40536    if test "x$complete" != "x$new_complete"; then
40537      NM="$new_complete"
40538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40539$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40540    fi
40541  fi
40542
40543
40544
40545  # Publish this variable in the help.
40546
40547
40548  if [ -z "${GNM+x}" ]; then
40549    # The variable is not set by user, try to locate tool using the code snippet
40550    for ac_prog in gnm
40551do
40552  # Extract the first word of "$ac_prog", so it can be a program name with args.
40553set dummy $ac_prog; ac_word=$2
40554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40555$as_echo_n "checking for $ac_word... " >&6; }
40556if ${ac_cv_path_GNM+:} false; then :
40557  $as_echo_n "(cached) " >&6
40558else
40559  case $GNM in
40560  [\\/]* | ?:[\\/]*)
40561  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40562  ;;
40563  *)
40564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40565for as_dir in $PATH
40566do
40567  IFS=$as_save_IFS
40568  test -z "$as_dir" && as_dir=.
40569    for ac_exec_ext in '' $ac_executable_extensions; do
40570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40571    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40573    break 2
40574  fi
40575done
40576  done
40577IFS=$as_save_IFS
40578
40579  ;;
40580esac
40581fi
40582GNM=$ac_cv_path_GNM
40583if test -n "$GNM"; then
40584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40585$as_echo "$GNM" >&6; }
40586else
40587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40588$as_echo "no" >&6; }
40589fi
40590
40591
40592  test -n "$GNM" && break
40593done
40594
40595  else
40596    # The variable is set, but is it from the command line or the environment?
40597
40598    # Try to remove the string !GNM! from our list.
40599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40601      # If it failed, the variable was not from the command line. Ignore it,
40602      # but warn the user (except for BASH, which is always set by the calling BASH).
40603      if test "xGNM" != xBASH; then
40604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40605$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40606      fi
40607      # Try to locate tool using the code snippet
40608      for ac_prog in gnm
40609do
40610  # Extract the first word of "$ac_prog", so it can be a program name with args.
40611set dummy $ac_prog; ac_word=$2
40612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40613$as_echo_n "checking for $ac_word... " >&6; }
40614if ${ac_cv_path_GNM+:} false; then :
40615  $as_echo_n "(cached) " >&6
40616else
40617  case $GNM in
40618  [\\/]* | ?:[\\/]*)
40619  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40620  ;;
40621  *)
40622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40623for as_dir in $PATH
40624do
40625  IFS=$as_save_IFS
40626  test -z "$as_dir" && as_dir=.
40627    for ac_exec_ext in '' $ac_executable_extensions; do
40628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40629    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40631    break 2
40632  fi
40633done
40634  done
40635IFS=$as_save_IFS
40636
40637  ;;
40638esac
40639fi
40640GNM=$ac_cv_path_GNM
40641if test -n "$GNM"; then
40642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40643$as_echo "$GNM" >&6; }
40644else
40645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40646$as_echo "no" >&6; }
40647fi
40648
40649
40650  test -n "$GNM" && break
40651done
40652
40653    else
40654      # If it succeeded, then it was overridden by the user. We will use it
40655      # for the tool.
40656
40657      # First remove it from the list of overridden variables, so we can test
40658      # for unknown variables in the end.
40659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40660
40661      # Check if we try to supply an empty value
40662      if test "x$GNM" = x; then
40663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40664$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40666$as_echo_n "checking for GNM... " >&6; }
40667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40668$as_echo "disabled" >&6; }
40669      else
40670        # Check if the provided tool contains a complete path.
40671        tool_specified="$GNM"
40672        tool_basename="${tool_specified##*/}"
40673        if test "x$tool_basename" = "x$tool_specified"; then
40674          # A command without a complete path is provided, search $PATH.
40675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40676$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40677          # Extract the first word of "$tool_basename", so it can be a program name with args.
40678set dummy $tool_basename; ac_word=$2
40679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40680$as_echo_n "checking for $ac_word... " >&6; }
40681if ${ac_cv_path_GNM+:} false; then :
40682  $as_echo_n "(cached) " >&6
40683else
40684  case $GNM in
40685  [\\/]* | ?:[\\/]*)
40686  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40687  ;;
40688  *)
40689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40690for as_dir in $PATH
40691do
40692  IFS=$as_save_IFS
40693  test -z "$as_dir" && as_dir=.
40694    for ac_exec_ext in '' $ac_executable_extensions; do
40695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40696    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40698    break 2
40699  fi
40700done
40701  done
40702IFS=$as_save_IFS
40703
40704  ;;
40705esac
40706fi
40707GNM=$ac_cv_path_GNM
40708if test -n "$GNM"; then
40709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40710$as_echo "$GNM" >&6; }
40711else
40712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40713$as_echo "no" >&6; }
40714fi
40715
40716
40717          if test "x$GNM" = x; then
40718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40719          fi
40720        else
40721          # Otherwise we believe it is a complete path. Use it as it is.
40722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40723$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40725$as_echo_n "checking for GNM... " >&6; }
40726          if test ! -x "$tool_specified"; then
40727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40728$as_echo "not found" >&6; }
40729            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40730          fi
40731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40732$as_echo "$tool_specified" >&6; }
40733        fi
40734      fi
40735    fi
40736
40737  fi
40738
40739
40740
40741  # Only process if variable expands to non-empty
40742
40743  if test "x$GNM" != x; then
40744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40745
40746  # First separate the path from the arguments. This will split at the first
40747  # space.
40748  complete="$GNM"
40749  path="${complete%% *}"
40750  tmp="$complete EOL"
40751  arguments="${tmp#* }"
40752
40753  # Input might be given as Windows format, start by converting to
40754  # unix format.
40755  new_path=`$CYGPATH -u "$path"`
40756
40757  # Now try to locate executable using which
40758  new_path=`$WHICH "$new_path" 2> /dev/null`
40759  # bat and cmd files are not always considered executable in cygwin causing which
40760  # to not find them
40761  if test "x$new_path" = x \
40762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40764    new_path=`$CYGPATH -u "$path"`
40765  fi
40766  if test "x$new_path" = x; then
40767    # Oops. Which didn't find the executable.
40768    # The splitting of arguments from the executable at a space might have been incorrect,
40769    # since paths with space are more likely in Windows. Give it another try with the whole
40770    # argument.
40771    path="$complete"
40772    arguments="EOL"
40773    new_path=`$CYGPATH -u "$path"`
40774    new_path=`$WHICH "$new_path" 2> /dev/null`
40775    # bat and cmd files are not always considered executable in cygwin causing which
40776    # to not find them
40777    if test "x$new_path" = x \
40778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40780      new_path=`$CYGPATH -u "$path"`
40781    fi
40782    if test "x$new_path" = x; then
40783      # It's still not found. Now this is an unrecoverable error.
40784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40785$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40786      has_space=`$ECHO "$complete" | $GREP " "`
40787      if test "x$has_space" != x; then
40788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40790      fi
40791      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40792    fi
40793  fi
40794
40795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40798  # "foo.exe" is OK but "foo" is an error.
40799  #
40800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40801  # It is also a way to make sure we got the proper file name for the real test later on.
40802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40803  if test "x$test_shortpath" = x; then
40804    # Short path failed, file does not exist as specified.
40805    # Try adding .exe or .cmd
40806    if test -f "${new_path}.exe"; then
40807      input_to_shortpath="${new_path}.exe"
40808    elif test -f "${new_path}.cmd"; then
40809      input_to_shortpath="${new_path}.cmd"
40810    else
40811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40812$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40815      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40816    fi
40817  else
40818    input_to_shortpath="$new_path"
40819  fi
40820
40821  # Call helper function which possibly converts this using DOS-style short mode.
40822  # If so, the updated path is stored in $new_path.
40823  new_path="$input_to_shortpath"
40824
40825  input_path="$input_to_shortpath"
40826  # Check if we need to convert this using DOS-style short mode. If the path
40827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40828  # take no chances and rewrite it.
40829  # Note: m4 eats our [], so we need to use [ and ] instead.
40830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40831  if test "x$has_forbidden_chars" != x; then
40832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40836      # Going to short mode and back again did indeed matter. Since short mode is
40837      # case insensitive, let's make it lowercase to improve readability.
40838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40839      # Now convert it back to Unix-style (cygpath)
40840      input_path=`$CYGPATH -u "$shortmode_path"`
40841      new_path="$input_path"
40842    fi
40843  fi
40844
40845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40846  if test "x$test_cygdrive_prefix" = x; then
40847    # As a simple fix, exclude /usr/bin since it's not a real path.
40848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40850      # a path prefixed by /cygdrive for fixpath to work.
40851      new_path="$CYGWIN_ROOT_PATH$input_path"
40852    fi
40853  fi
40854
40855  # remove trailing .exe if any
40856  new_path="${new_path/%.exe/}"
40857
40858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40859
40860  # First separate the path from the arguments. This will split at the first
40861  # space.
40862  complete="$GNM"
40863  path="${complete%% *}"
40864  tmp="$complete EOL"
40865  arguments="${tmp#* }"
40866
40867  # Input might be given as Windows format, start by converting to
40868  # unix format.
40869  new_path="$path"
40870
40871  windows_path="$new_path"
40872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40873    unix_path=`$CYGPATH -u "$windows_path"`
40874    new_path="$unix_path"
40875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40877    new_path="$unix_path"
40878  fi
40879
40880
40881  # Now try to locate executable using which
40882  new_path=`$WHICH "$new_path" 2> /dev/null`
40883
40884  if test "x$new_path" = x; then
40885    # Oops. Which didn't find the executable.
40886    # The splitting of arguments from the executable at a space might have been incorrect,
40887    # since paths with space are more likely in Windows. Give it another try with the whole
40888    # argument.
40889    path="$complete"
40890    arguments="EOL"
40891    new_path="$path"
40892
40893  windows_path="$new_path"
40894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40895    unix_path=`$CYGPATH -u "$windows_path"`
40896    new_path="$unix_path"
40897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40899    new_path="$unix_path"
40900  fi
40901
40902
40903    new_path=`$WHICH "$new_path" 2> /dev/null`
40904    # bat and cmd files are not always considered executable in MSYS causing which
40905    # to not find them
40906    if test "x$new_path" = x \
40907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40909      new_path="$path"
40910
40911  windows_path="$new_path"
40912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40913    unix_path=`$CYGPATH -u "$windows_path"`
40914    new_path="$unix_path"
40915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40917    new_path="$unix_path"
40918  fi
40919
40920    fi
40921
40922    if test "x$new_path" = x; then
40923      # It's still not found. Now this is an unrecoverable error.
40924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40925$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40926      has_space=`$ECHO "$complete" | $GREP " "`
40927      if test "x$has_space" != x; then
40928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40930      fi
40931      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40932    fi
40933  fi
40934
40935  # Now new_path has a complete unix path to the binary
40936  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40937    # Keep paths in /bin as-is, but remove trailing .exe if any
40938    new_path="${new_path/%.exe/}"
40939    # Do not save /bin paths to all_fixpath_prefixes!
40940  else
40941    # Not in mixed or Windows style, start by that.
40942    new_path=`cmd //c echo $new_path`
40943
40944  input_path="$new_path"
40945  # Check if we need to convert this using DOS-style short mode. If the path
40946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40947  # take no chances and rewrite it.
40948  # Note: m4 eats our [], so we need to use [ and ] instead.
40949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40950  if test "x$has_forbidden_chars" != x; then
40951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40953  fi
40954
40955    # Output is in $new_path
40956
40957  windows_path="$new_path"
40958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40959    unix_path=`$CYGPATH -u "$windows_path"`
40960    new_path="$unix_path"
40961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40963    new_path="$unix_path"
40964  fi
40965
40966    # remove trailing .exe if any
40967    new_path="${new_path/%.exe/}"
40968
40969    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40970    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40971  fi
40972
40973    else
40974      # We're on a unix platform. Hooray! :)
40975      # First separate the path from the arguments. This will split at the first
40976      # space.
40977      complete="$GNM"
40978      path="${complete%% *}"
40979      tmp="$complete EOL"
40980      arguments="${tmp#* }"
40981
40982      # Cannot rely on the command "which" here since it doesn't always work.
40983      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40984      if test -z "$is_absolute_path"; then
40985        # Path to executable is not absolute. Find it.
40986        IFS_save="$IFS"
40987        IFS=:
40988        for p in $PATH; do
40989          if test -f "$p/$path" && test -x "$p/$path"; then
40990            new_path="$p/$path"
40991            break
40992          fi
40993        done
40994        IFS="$IFS_save"
40995      else
40996        # This is an absolute path, we can use it without further modifications.
40997        new_path="$path"
40998      fi
40999
41000      if test "x$new_path" = x; then
41001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41002$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41003        has_space=`$ECHO "$complete" | $GREP " "`
41004        if test "x$has_space" != x; then
41005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41007        fi
41008        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41009      fi
41010    fi
41011
41012    # Now join together the path and the arguments once again
41013    if test "x$arguments" != xEOL; then
41014      new_complete="$new_path ${arguments% *}"
41015    else
41016      new_complete="$new_path"
41017    fi
41018
41019    if test "x$complete" != "x$new_complete"; then
41020      GNM="$new_complete"
41021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41022$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41023    fi
41024  fi
41025
41026  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41027    # FIXME: we should unify this with the solaris case above.
41028
41029
41030  # Publish this variable in the help.
41031
41032
41033  if [ -z "${STRIP+x}" ]; then
41034    # The variable is not set by user, try to locate tool using the code snippet
41035    if test -n "$ac_tool_prefix"; then
41036  for ac_prog in strip
41037  do
41038    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41039set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41041$as_echo_n "checking for $ac_word... " >&6; }
41042if ${ac_cv_prog_STRIP+:} false; then :
41043  $as_echo_n "(cached) " >&6
41044else
41045  if test -n "$STRIP"; then
41046  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41047else
41048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41049for as_dir in $PATH
41050do
41051  IFS=$as_save_IFS
41052  test -z "$as_dir" && as_dir=.
41053    for ac_exec_ext in '' $ac_executable_extensions; do
41054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41055    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41057    break 2
41058  fi
41059done
41060  done
41061IFS=$as_save_IFS
41062
41063fi
41064fi
41065STRIP=$ac_cv_prog_STRIP
41066if test -n "$STRIP"; then
41067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41068$as_echo "$STRIP" >&6; }
41069else
41070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41071$as_echo "no" >&6; }
41072fi
41073
41074
41075    test -n "$STRIP" && break
41076  done
41077fi
41078if test -z "$STRIP"; then
41079  ac_ct_STRIP=$STRIP
41080  for ac_prog in strip
41081do
41082  # Extract the first word of "$ac_prog", so it can be a program name with args.
41083set dummy $ac_prog; ac_word=$2
41084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41085$as_echo_n "checking for $ac_word... " >&6; }
41086if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41087  $as_echo_n "(cached) " >&6
41088else
41089  if test -n "$ac_ct_STRIP"; then
41090  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41091else
41092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41093for as_dir in $PATH
41094do
41095  IFS=$as_save_IFS
41096  test -z "$as_dir" && as_dir=.
41097    for ac_exec_ext in '' $ac_executable_extensions; do
41098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41099    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41101    break 2
41102  fi
41103done
41104  done
41105IFS=$as_save_IFS
41106
41107fi
41108fi
41109ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41110if test -n "$ac_ct_STRIP"; then
41111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41112$as_echo "$ac_ct_STRIP" >&6; }
41113else
41114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41115$as_echo "no" >&6; }
41116fi
41117
41118
41119  test -n "$ac_ct_STRIP" && break
41120done
41121
41122  if test "x$ac_ct_STRIP" = x; then
41123    STRIP=""
41124  else
41125    case $cross_compiling:$ac_tool_warned in
41126yes:)
41127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41129ac_tool_warned=yes ;;
41130esac
41131    STRIP=$ac_ct_STRIP
41132  fi
41133fi
41134
41135  else
41136    # The variable is set, but is it from the command line or the environment?
41137
41138    # Try to remove the string !STRIP! from our list.
41139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41141      # If it failed, the variable was not from the command line. Ignore it,
41142      # but warn the user (except for BASH, which is always set by the calling BASH).
41143      if test "xSTRIP" != xBASH; then
41144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41145$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41146      fi
41147      # Try to locate tool using the code snippet
41148      if test -n "$ac_tool_prefix"; then
41149  for ac_prog in strip
41150  do
41151    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41152set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41154$as_echo_n "checking for $ac_word... " >&6; }
41155if ${ac_cv_prog_STRIP+:} false; then :
41156  $as_echo_n "(cached) " >&6
41157else
41158  if test -n "$STRIP"; then
41159  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41160else
41161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41162for as_dir in $PATH
41163do
41164  IFS=$as_save_IFS
41165  test -z "$as_dir" && as_dir=.
41166    for ac_exec_ext in '' $ac_executable_extensions; do
41167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41168    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41170    break 2
41171  fi
41172done
41173  done
41174IFS=$as_save_IFS
41175
41176fi
41177fi
41178STRIP=$ac_cv_prog_STRIP
41179if test -n "$STRIP"; then
41180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41181$as_echo "$STRIP" >&6; }
41182else
41183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41184$as_echo "no" >&6; }
41185fi
41186
41187
41188    test -n "$STRIP" && break
41189  done
41190fi
41191if test -z "$STRIP"; then
41192  ac_ct_STRIP=$STRIP
41193  for ac_prog in strip
41194do
41195  # Extract the first word of "$ac_prog", so it can be a program name with args.
41196set dummy $ac_prog; ac_word=$2
41197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41198$as_echo_n "checking for $ac_word... " >&6; }
41199if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41200  $as_echo_n "(cached) " >&6
41201else
41202  if test -n "$ac_ct_STRIP"; then
41203  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41204else
41205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41206for as_dir in $PATH
41207do
41208  IFS=$as_save_IFS
41209  test -z "$as_dir" && as_dir=.
41210    for ac_exec_ext in '' $ac_executable_extensions; do
41211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41212    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41214    break 2
41215  fi
41216done
41217  done
41218IFS=$as_save_IFS
41219
41220fi
41221fi
41222ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41223if test -n "$ac_ct_STRIP"; then
41224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41225$as_echo "$ac_ct_STRIP" >&6; }
41226else
41227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41228$as_echo "no" >&6; }
41229fi
41230
41231
41232  test -n "$ac_ct_STRIP" && break
41233done
41234
41235  if test "x$ac_ct_STRIP" = x; then
41236    STRIP=""
41237  else
41238    case $cross_compiling:$ac_tool_warned in
41239yes:)
41240{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41241$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41242ac_tool_warned=yes ;;
41243esac
41244    STRIP=$ac_ct_STRIP
41245  fi
41246fi
41247
41248    else
41249      # If it succeeded, then it was overridden by the user. We will use it
41250      # for the tool.
41251
41252      # First remove it from the list of overridden variables, so we can test
41253      # for unknown variables in the end.
41254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41255
41256      # Check if we try to supply an empty value
41257      if test "x$STRIP" = x; then
41258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41259$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41261$as_echo_n "checking for STRIP... " >&6; }
41262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41263$as_echo "disabled" >&6; }
41264      else
41265        # Check if the provided tool contains a complete path.
41266        tool_specified="$STRIP"
41267        tool_basename="${tool_specified##*/}"
41268        if test "x$tool_basename" = "x$tool_specified"; then
41269          # A command without a complete path is provided, search $PATH.
41270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41271$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41272          # Extract the first word of "$tool_basename", so it can be a program name with args.
41273set dummy $tool_basename; ac_word=$2
41274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41275$as_echo_n "checking for $ac_word... " >&6; }
41276if ${ac_cv_path_STRIP+:} false; then :
41277  $as_echo_n "(cached) " >&6
41278else
41279  case $STRIP in
41280  [\\/]* | ?:[\\/]*)
41281  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41282  ;;
41283  *)
41284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41285for as_dir in $PATH
41286do
41287  IFS=$as_save_IFS
41288  test -z "$as_dir" && as_dir=.
41289    for ac_exec_ext in '' $ac_executable_extensions; do
41290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41291    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41293    break 2
41294  fi
41295done
41296  done
41297IFS=$as_save_IFS
41298
41299  ;;
41300esac
41301fi
41302STRIP=$ac_cv_path_STRIP
41303if test -n "$STRIP"; then
41304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41305$as_echo "$STRIP" >&6; }
41306else
41307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41308$as_echo "no" >&6; }
41309fi
41310
41311
41312          if test "x$STRIP" = x; then
41313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41314          fi
41315        else
41316          # Otherwise we believe it is a complete path. Use it as it is.
41317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41318$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41320$as_echo_n "checking for STRIP... " >&6; }
41321          if test ! -x "$tool_specified"; then
41322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41323$as_echo "not found" >&6; }
41324            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41325          fi
41326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41327$as_echo "$tool_specified" >&6; }
41328        fi
41329      fi
41330    fi
41331
41332  fi
41333
41334
41335
41336  # Only process if variable expands to non-empty
41337
41338  if test "x$STRIP" != x; then
41339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41340
41341  # First separate the path from the arguments. This will split at the first
41342  # space.
41343  complete="$STRIP"
41344  path="${complete%% *}"
41345  tmp="$complete EOL"
41346  arguments="${tmp#* }"
41347
41348  # Input might be given as Windows format, start by converting to
41349  # unix format.
41350  new_path=`$CYGPATH -u "$path"`
41351
41352  # Now try to locate executable using which
41353  new_path=`$WHICH "$new_path" 2> /dev/null`
41354  # bat and cmd files are not always considered executable in cygwin causing which
41355  # to not find them
41356  if test "x$new_path" = x \
41357      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41358      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41359    new_path=`$CYGPATH -u "$path"`
41360  fi
41361  if test "x$new_path" = x; then
41362    # Oops. Which didn't find the executable.
41363    # The splitting of arguments from the executable at a space might have been incorrect,
41364    # since paths with space are more likely in Windows. Give it another try with the whole
41365    # argument.
41366    path="$complete"
41367    arguments="EOL"
41368    new_path=`$CYGPATH -u "$path"`
41369    new_path=`$WHICH "$new_path" 2> /dev/null`
41370    # bat and cmd files are not always considered executable in cygwin causing which
41371    # to not find them
41372    if test "x$new_path" = x \
41373        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41374        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41375      new_path=`$CYGPATH -u "$path"`
41376    fi
41377    if test "x$new_path" = x; then
41378      # It's still not found. Now this is an unrecoverable error.
41379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41380$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41381      has_space=`$ECHO "$complete" | $GREP " "`
41382      if test "x$has_space" != x; then
41383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41385      fi
41386      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41387    fi
41388  fi
41389
41390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41393  # "foo.exe" is OK but "foo" is an error.
41394  #
41395  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41396  # It is also a way to make sure we got the proper file name for the real test later on.
41397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41398  if test "x$test_shortpath" = x; then
41399    # Short path failed, file does not exist as specified.
41400    # Try adding .exe or .cmd
41401    if test -f "${new_path}.exe"; then
41402      input_to_shortpath="${new_path}.exe"
41403    elif test -f "${new_path}.cmd"; then
41404      input_to_shortpath="${new_path}.cmd"
41405    else
41406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41407$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41408      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41409$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41410      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41411    fi
41412  else
41413    input_to_shortpath="$new_path"
41414  fi
41415
41416  # Call helper function which possibly converts this using DOS-style short mode.
41417  # If so, the updated path is stored in $new_path.
41418  new_path="$input_to_shortpath"
41419
41420  input_path="$input_to_shortpath"
41421  # Check if we need to convert this using DOS-style short mode. If the path
41422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41423  # take no chances and rewrite it.
41424  # Note: m4 eats our [], so we need to use [ and ] instead.
41425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41426  if test "x$has_forbidden_chars" != x; then
41427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41431      # Going to short mode and back again did indeed matter. Since short mode is
41432      # case insensitive, let's make it lowercase to improve readability.
41433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41434      # Now convert it back to Unix-style (cygpath)
41435      input_path=`$CYGPATH -u "$shortmode_path"`
41436      new_path="$input_path"
41437    fi
41438  fi
41439
41440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41441  if test "x$test_cygdrive_prefix" = x; then
41442    # As a simple fix, exclude /usr/bin since it's not a real path.
41443    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41445      # a path prefixed by /cygdrive for fixpath to work.
41446      new_path="$CYGWIN_ROOT_PATH$input_path"
41447    fi
41448  fi
41449
41450  # remove trailing .exe if any
41451  new_path="${new_path/%.exe/}"
41452
41453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41454
41455  # First separate the path from the arguments. This will split at the first
41456  # space.
41457  complete="$STRIP"
41458  path="${complete%% *}"
41459  tmp="$complete EOL"
41460  arguments="${tmp#* }"
41461
41462  # Input might be given as Windows format, start by converting to
41463  # unix format.
41464  new_path="$path"
41465
41466  windows_path="$new_path"
41467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41468    unix_path=`$CYGPATH -u "$windows_path"`
41469    new_path="$unix_path"
41470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41472    new_path="$unix_path"
41473  fi
41474
41475
41476  # Now try to locate executable using which
41477  new_path=`$WHICH "$new_path" 2> /dev/null`
41478
41479  if test "x$new_path" = x; then
41480    # Oops. Which didn't find the executable.
41481    # The splitting of arguments from the executable at a space might have been incorrect,
41482    # since paths with space are more likely in Windows. Give it another try with the whole
41483    # argument.
41484    path="$complete"
41485    arguments="EOL"
41486    new_path="$path"
41487
41488  windows_path="$new_path"
41489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41490    unix_path=`$CYGPATH -u "$windows_path"`
41491    new_path="$unix_path"
41492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41494    new_path="$unix_path"
41495  fi
41496
41497
41498    new_path=`$WHICH "$new_path" 2> /dev/null`
41499    # bat and cmd files are not always considered executable in MSYS causing which
41500    # to not find them
41501    if test "x$new_path" = x \
41502        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41503        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41504      new_path="$path"
41505
41506  windows_path="$new_path"
41507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41508    unix_path=`$CYGPATH -u "$windows_path"`
41509    new_path="$unix_path"
41510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41512    new_path="$unix_path"
41513  fi
41514
41515    fi
41516
41517    if test "x$new_path" = x; then
41518      # It's still not found. Now this is an unrecoverable error.
41519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41520$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41521      has_space=`$ECHO "$complete" | $GREP " "`
41522      if test "x$has_space" != x; then
41523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41525      fi
41526      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41527    fi
41528  fi
41529
41530  # Now new_path has a complete unix path to the binary
41531  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41532    # Keep paths in /bin as-is, but remove trailing .exe if any
41533    new_path="${new_path/%.exe/}"
41534    # Do not save /bin paths to all_fixpath_prefixes!
41535  else
41536    # Not in mixed or Windows style, start by that.
41537    new_path=`cmd //c echo $new_path`
41538
41539  input_path="$new_path"
41540  # Check if we need to convert this using DOS-style short mode. If the path
41541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41542  # take no chances and rewrite it.
41543  # Note: m4 eats our [], so we need to use [ and ] instead.
41544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41545  if test "x$has_forbidden_chars" != x; then
41546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41548  fi
41549
41550    # Output is in $new_path
41551
41552  windows_path="$new_path"
41553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41554    unix_path=`$CYGPATH -u "$windows_path"`
41555    new_path="$unix_path"
41556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41558    new_path="$unix_path"
41559  fi
41560
41561    # remove trailing .exe if any
41562    new_path="${new_path/%.exe/}"
41563
41564    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41565    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41566  fi
41567
41568    else
41569      # We're on a unix platform. Hooray! :)
41570      # First separate the path from the arguments. This will split at the first
41571      # space.
41572      complete="$STRIP"
41573      path="${complete%% *}"
41574      tmp="$complete EOL"
41575      arguments="${tmp#* }"
41576
41577      # Cannot rely on the command "which" here since it doesn't always work.
41578      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41579      if test -z "$is_absolute_path"; then
41580        # Path to executable is not absolute. Find it.
41581        IFS_save="$IFS"
41582        IFS=:
41583        for p in $PATH; do
41584          if test -f "$p/$path" && test -x "$p/$path"; then
41585            new_path="$p/$path"
41586            break
41587          fi
41588        done
41589        IFS="$IFS_save"
41590      else
41591        # This is an absolute path, we can use it without further modifications.
41592        new_path="$path"
41593      fi
41594
41595      if test "x$new_path" = x; then
41596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41597$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41598        has_space=`$ECHO "$complete" | $GREP " "`
41599        if test "x$has_space" != x; then
41600          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41601$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41602        fi
41603        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41604      fi
41605    fi
41606
41607    # Now join together the path and the arguments once again
41608    if test "x$arguments" != xEOL; then
41609      new_complete="$new_path ${arguments% *}"
41610    else
41611      new_complete="$new_path"
41612    fi
41613
41614    if test "x$complete" != "x$new_complete"; then
41615      STRIP="$new_complete"
41616      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41617$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41618    fi
41619  fi
41620
41621    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41622
41623
41624  # Publish this variable in the help.
41625
41626
41627  if [ -z "${NM+x}" ]; then
41628    # The variable is not set by user, try to locate tool using the code snippet
41629    if test -n "$ac_tool_prefix"; then
41630  for ac_prog in nm gcc-nm
41631  do
41632    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41633set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41635$as_echo_n "checking for $ac_word... " >&6; }
41636if ${ac_cv_prog_NM+:} false; then :
41637  $as_echo_n "(cached) " >&6
41638else
41639  if test -n "$NM"; then
41640  ac_cv_prog_NM="$NM" # Let the user override the test.
41641else
41642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41643for as_dir in $PATH
41644do
41645  IFS=$as_save_IFS
41646  test -z "$as_dir" && as_dir=.
41647    for ac_exec_ext in '' $ac_executable_extensions; do
41648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41649    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41651    break 2
41652  fi
41653done
41654  done
41655IFS=$as_save_IFS
41656
41657fi
41658fi
41659NM=$ac_cv_prog_NM
41660if test -n "$NM"; then
41661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41662$as_echo "$NM" >&6; }
41663else
41664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41665$as_echo "no" >&6; }
41666fi
41667
41668
41669    test -n "$NM" && break
41670  done
41671fi
41672if test -z "$NM"; then
41673  ac_ct_NM=$NM
41674  for ac_prog in nm gcc-nm
41675do
41676  # Extract the first word of "$ac_prog", so it can be a program name with args.
41677set dummy $ac_prog; ac_word=$2
41678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41679$as_echo_n "checking for $ac_word... " >&6; }
41680if ${ac_cv_prog_ac_ct_NM+:} false; then :
41681  $as_echo_n "(cached) " >&6
41682else
41683  if test -n "$ac_ct_NM"; then
41684  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41685else
41686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41687for as_dir in $PATH
41688do
41689  IFS=$as_save_IFS
41690  test -z "$as_dir" && as_dir=.
41691    for ac_exec_ext in '' $ac_executable_extensions; do
41692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41693    ac_cv_prog_ac_ct_NM="$ac_prog"
41694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41695    break 2
41696  fi
41697done
41698  done
41699IFS=$as_save_IFS
41700
41701fi
41702fi
41703ac_ct_NM=$ac_cv_prog_ac_ct_NM
41704if test -n "$ac_ct_NM"; then
41705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41706$as_echo "$ac_ct_NM" >&6; }
41707else
41708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41709$as_echo "no" >&6; }
41710fi
41711
41712
41713  test -n "$ac_ct_NM" && break
41714done
41715
41716  if test "x$ac_ct_NM" = x; then
41717    NM=""
41718  else
41719    case $cross_compiling:$ac_tool_warned in
41720yes:)
41721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41723ac_tool_warned=yes ;;
41724esac
41725    NM=$ac_ct_NM
41726  fi
41727fi
41728
41729  else
41730    # The variable is set, but is it from the command line or the environment?
41731
41732    # Try to remove the string !NM! from our list.
41733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41735      # If it failed, the variable was not from the command line. Ignore it,
41736      # but warn the user (except for BASH, which is always set by the calling BASH).
41737      if test "xNM" != xBASH; then
41738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41739$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41740      fi
41741      # Try to locate tool using the code snippet
41742      if test -n "$ac_tool_prefix"; then
41743  for ac_prog in nm gcc-nm
41744  do
41745    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41746set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41748$as_echo_n "checking for $ac_word... " >&6; }
41749if ${ac_cv_prog_NM+:} false; then :
41750  $as_echo_n "(cached) " >&6
41751else
41752  if test -n "$NM"; then
41753  ac_cv_prog_NM="$NM" # Let the user override the test.
41754else
41755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41756for as_dir in $PATH
41757do
41758  IFS=$as_save_IFS
41759  test -z "$as_dir" && as_dir=.
41760    for ac_exec_ext in '' $ac_executable_extensions; do
41761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41762    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41764    break 2
41765  fi
41766done
41767  done
41768IFS=$as_save_IFS
41769
41770fi
41771fi
41772NM=$ac_cv_prog_NM
41773if test -n "$NM"; then
41774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41775$as_echo "$NM" >&6; }
41776else
41777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41778$as_echo "no" >&6; }
41779fi
41780
41781
41782    test -n "$NM" && break
41783  done
41784fi
41785if test -z "$NM"; then
41786  ac_ct_NM=$NM
41787  for ac_prog in nm gcc-nm
41788do
41789  # Extract the first word of "$ac_prog", so it can be a program name with args.
41790set dummy $ac_prog; ac_word=$2
41791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41792$as_echo_n "checking for $ac_word... " >&6; }
41793if ${ac_cv_prog_ac_ct_NM+:} false; then :
41794  $as_echo_n "(cached) " >&6
41795else
41796  if test -n "$ac_ct_NM"; then
41797  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41798else
41799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41800for as_dir in $PATH
41801do
41802  IFS=$as_save_IFS
41803  test -z "$as_dir" && as_dir=.
41804    for ac_exec_ext in '' $ac_executable_extensions; do
41805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41806    ac_cv_prog_ac_ct_NM="$ac_prog"
41807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41808    break 2
41809  fi
41810done
41811  done
41812IFS=$as_save_IFS
41813
41814fi
41815fi
41816ac_ct_NM=$ac_cv_prog_ac_ct_NM
41817if test -n "$ac_ct_NM"; then
41818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41819$as_echo "$ac_ct_NM" >&6; }
41820else
41821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41822$as_echo "no" >&6; }
41823fi
41824
41825
41826  test -n "$ac_ct_NM" && break
41827done
41828
41829  if test "x$ac_ct_NM" = x; then
41830    NM=""
41831  else
41832    case $cross_compiling:$ac_tool_warned in
41833yes:)
41834{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41835$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41836ac_tool_warned=yes ;;
41837esac
41838    NM=$ac_ct_NM
41839  fi
41840fi
41841
41842    else
41843      # If it succeeded, then it was overridden by the user. We will use it
41844      # for the tool.
41845
41846      # First remove it from the list of overridden variables, so we can test
41847      # for unknown variables in the end.
41848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41849
41850      # Check if we try to supply an empty value
41851      if test "x$NM" = x; then
41852        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41853$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41855$as_echo_n "checking for NM... " >&6; }
41856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41857$as_echo "disabled" >&6; }
41858      else
41859        # Check if the provided tool contains a complete path.
41860        tool_specified="$NM"
41861        tool_basename="${tool_specified##*/}"
41862        if test "x$tool_basename" = "x$tool_specified"; then
41863          # A command without a complete path is provided, search $PATH.
41864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41865$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41866          # Extract the first word of "$tool_basename", so it can be a program name with args.
41867set dummy $tool_basename; ac_word=$2
41868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41869$as_echo_n "checking for $ac_word... " >&6; }
41870if ${ac_cv_path_NM+:} false; then :
41871  $as_echo_n "(cached) " >&6
41872else
41873  case $NM in
41874  [\\/]* | ?:[\\/]*)
41875  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41876  ;;
41877  *)
41878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41879for as_dir in $PATH
41880do
41881  IFS=$as_save_IFS
41882  test -z "$as_dir" && as_dir=.
41883    for ac_exec_ext in '' $ac_executable_extensions; do
41884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41885    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41887    break 2
41888  fi
41889done
41890  done
41891IFS=$as_save_IFS
41892
41893  ;;
41894esac
41895fi
41896NM=$ac_cv_path_NM
41897if test -n "$NM"; then
41898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41899$as_echo "$NM" >&6; }
41900else
41901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41902$as_echo "no" >&6; }
41903fi
41904
41905
41906          if test "x$NM" = x; then
41907            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41908          fi
41909        else
41910          # Otherwise we believe it is a complete path. Use it as it is.
41911          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41912$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41913          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41914$as_echo_n "checking for NM... " >&6; }
41915          if test ! -x "$tool_specified"; then
41916            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41917$as_echo "not found" >&6; }
41918            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41919          fi
41920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41921$as_echo "$tool_specified" >&6; }
41922        fi
41923      fi
41924    fi
41925
41926  fi
41927
41928
41929    else
41930
41931
41932  # Publish this variable in the help.
41933
41934
41935  if [ -z "${NM+x}" ]; then
41936    # The variable is not set by user, try to locate tool using the code snippet
41937    if test -n "$ac_tool_prefix"; then
41938  for ac_prog in nm
41939  do
41940    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41941set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41943$as_echo_n "checking for $ac_word... " >&6; }
41944if ${ac_cv_prog_NM+:} false; then :
41945  $as_echo_n "(cached) " >&6
41946else
41947  if test -n "$NM"; then
41948  ac_cv_prog_NM="$NM" # Let the user override the test.
41949else
41950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41951for as_dir in $PATH
41952do
41953  IFS=$as_save_IFS
41954  test -z "$as_dir" && as_dir=.
41955    for ac_exec_ext in '' $ac_executable_extensions; do
41956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41957    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41959    break 2
41960  fi
41961done
41962  done
41963IFS=$as_save_IFS
41964
41965fi
41966fi
41967NM=$ac_cv_prog_NM
41968if test -n "$NM"; then
41969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41970$as_echo "$NM" >&6; }
41971else
41972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41973$as_echo "no" >&6; }
41974fi
41975
41976
41977    test -n "$NM" && break
41978  done
41979fi
41980if test -z "$NM"; then
41981  ac_ct_NM=$NM
41982  for ac_prog in nm
41983do
41984  # Extract the first word of "$ac_prog", so it can be a program name with args.
41985set dummy $ac_prog; ac_word=$2
41986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41987$as_echo_n "checking for $ac_word... " >&6; }
41988if ${ac_cv_prog_ac_ct_NM+:} false; then :
41989  $as_echo_n "(cached) " >&6
41990else
41991  if test -n "$ac_ct_NM"; then
41992  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41993else
41994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41995for as_dir in $PATH
41996do
41997  IFS=$as_save_IFS
41998  test -z "$as_dir" && as_dir=.
41999    for ac_exec_ext in '' $ac_executable_extensions; do
42000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42001    ac_cv_prog_ac_ct_NM="$ac_prog"
42002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42003    break 2
42004  fi
42005done
42006  done
42007IFS=$as_save_IFS
42008
42009fi
42010fi
42011ac_ct_NM=$ac_cv_prog_ac_ct_NM
42012if test -n "$ac_ct_NM"; then
42013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42014$as_echo "$ac_ct_NM" >&6; }
42015else
42016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42017$as_echo "no" >&6; }
42018fi
42019
42020
42021  test -n "$ac_ct_NM" && break
42022done
42023
42024  if test "x$ac_ct_NM" = x; then
42025    NM=""
42026  else
42027    case $cross_compiling:$ac_tool_warned in
42028yes:)
42029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42031ac_tool_warned=yes ;;
42032esac
42033    NM=$ac_ct_NM
42034  fi
42035fi
42036
42037  else
42038    # The variable is set, but is it from the command line or the environment?
42039
42040    # Try to remove the string !NM! from our list.
42041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42043      # If it failed, the variable was not from the command line. Ignore it,
42044      # but warn the user (except for BASH, which is always set by the calling BASH).
42045      if test "xNM" != xBASH; then
42046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42047$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42048      fi
42049      # Try to locate tool using the code snippet
42050      if test -n "$ac_tool_prefix"; then
42051  for ac_prog in nm
42052  do
42053    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42054set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42056$as_echo_n "checking for $ac_word... " >&6; }
42057if ${ac_cv_prog_NM+:} false; then :
42058  $as_echo_n "(cached) " >&6
42059else
42060  if test -n "$NM"; then
42061  ac_cv_prog_NM="$NM" # Let the user override the test.
42062else
42063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42064for as_dir in $PATH
42065do
42066  IFS=$as_save_IFS
42067  test -z "$as_dir" && as_dir=.
42068    for ac_exec_ext in '' $ac_executable_extensions; do
42069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42070    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42072    break 2
42073  fi
42074done
42075  done
42076IFS=$as_save_IFS
42077
42078fi
42079fi
42080NM=$ac_cv_prog_NM
42081if test -n "$NM"; then
42082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42083$as_echo "$NM" >&6; }
42084else
42085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42086$as_echo "no" >&6; }
42087fi
42088
42089
42090    test -n "$NM" && break
42091  done
42092fi
42093if test -z "$NM"; then
42094  ac_ct_NM=$NM
42095  for ac_prog in nm
42096do
42097  # Extract the first word of "$ac_prog", so it can be a program name with args.
42098set dummy $ac_prog; ac_word=$2
42099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42100$as_echo_n "checking for $ac_word... " >&6; }
42101if ${ac_cv_prog_ac_ct_NM+:} false; then :
42102  $as_echo_n "(cached) " >&6
42103else
42104  if test -n "$ac_ct_NM"; then
42105  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42106else
42107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42108for as_dir in $PATH
42109do
42110  IFS=$as_save_IFS
42111  test -z "$as_dir" && as_dir=.
42112    for ac_exec_ext in '' $ac_executable_extensions; do
42113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42114    ac_cv_prog_ac_ct_NM="$ac_prog"
42115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42116    break 2
42117  fi
42118done
42119  done
42120IFS=$as_save_IFS
42121
42122fi
42123fi
42124ac_ct_NM=$ac_cv_prog_ac_ct_NM
42125if test -n "$ac_ct_NM"; then
42126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42127$as_echo "$ac_ct_NM" >&6; }
42128else
42129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42130$as_echo "no" >&6; }
42131fi
42132
42133
42134  test -n "$ac_ct_NM" && break
42135done
42136
42137  if test "x$ac_ct_NM" = x; then
42138    NM=""
42139  else
42140    case $cross_compiling:$ac_tool_warned in
42141yes:)
42142{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42143$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42144ac_tool_warned=yes ;;
42145esac
42146    NM=$ac_ct_NM
42147  fi
42148fi
42149
42150    else
42151      # If it succeeded, then it was overridden by the user. We will use it
42152      # for the tool.
42153
42154      # First remove it from the list of overridden variables, so we can test
42155      # for unknown variables in the end.
42156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42157
42158      # Check if we try to supply an empty value
42159      if test "x$NM" = x; then
42160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42161$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42163$as_echo_n "checking for NM... " >&6; }
42164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42165$as_echo "disabled" >&6; }
42166      else
42167        # Check if the provided tool contains a complete path.
42168        tool_specified="$NM"
42169        tool_basename="${tool_specified##*/}"
42170        if test "x$tool_basename" = "x$tool_specified"; then
42171          # A command without a complete path is provided, search $PATH.
42172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42173$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42174          # Extract the first word of "$tool_basename", so it can be a program name with args.
42175set dummy $tool_basename; ac_word=$2
42176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42177$as_echo_n "checking for $ac_word... " >&6; }
42178if ${ac_cv_path_NM+:} false; then :
42179  $as_echo_n "(cached) " >&6
42180else
42181  case $NM in
42182  [\\/]* | ?:[\\/]*)
42183  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42184  ;;
42185  *)
42186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42187for as_dir in $PATH
42188do
42189  IFS=$as_save_IFS
42190  test -z "$as_dir" && as_dir=.
42191    for ac_exec_ext in '' $ac_executable_extensions; do
42192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42193    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42195    break 2
42196  fi
42197done
42198  done
42199IFS=$as_save_IFS
42200
42201  ;;
42202esac
42203fi
42204NM=$ac_cv_path_NM
42205if test -n "$NM"; then
42206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42207$as_echo "$NM" >&6; }
42208else
42209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42210$as_echo "no" >&6; }
42211fi
42212
42213
42214          if test "x$NM" = x; then
42215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42216          fi
42217        else
42218          # Otherwise we believe it is a complete path. Use it as it is.
42219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42220$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42222$as_echo_n "checking for NM... " >&6; }
42223          if test ! -x "$tool_specified"; then
42224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42225$as_echo "not found" >&6; }
42226            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42227          fi
42228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42229$as_echo "$tool_specified" >&6; }
42230        fi
42231      fi
42232    fi
42233
42234  fi
42235
42236
42237    fi
42238
42239  # Only process if variable expands to non-empty
42240
42241  if test "x$NM" != x; then
42242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42243
42244  # First separate the path from the arguments. This will split at the first
42245  # space.
42246  complete="$NM"
42247  path="${complete%% *}"
42248  tmp="$complete EOL"
42249  arguments="${tmp#* }"
42250
42251  # Input might be given as Windows format, start by converting to
42252  # unix format.
42253  new_path=`$CYGPATH -u "$path"`
42254
42255  # Now try to locate executable using which
42256  new_path=`$WHICH "$new_path" 2> /dev/null`
42257  # bat and cmd files are not always considered executable in cygwin causing which
42258  # to not find them
42259  if test "x$new_path" = x \
42260      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42261      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42262    new_path=`$CYGPATH -u "$path"`
42263  fi
42264  if test "x$new_path" = x; then
42265    # Oops. Which didn't find the executable.
42266    # The splitting of arguments from the executable at a space might have been incorrect,
42267    # since paths with space are more likely in Windows. Give it another try with the whole
42268    # argument.
42269    path="$complete"
42270    arguments="EOL"
42271    new_path=`$CYGPATH -u "$path"`
42272    new_path=`$WHICH "$new_path" 2> /dev/null`
42273    # bat and cmd files are not always considered executable in cygwin causing which
42274    # to not find them
42275    if test "x$new_path" = x \
42276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42278      new_path=`$CYGPATH -u "$path"`
42279    fi
42280    if test "x$new_path" = x; then
42281      # It's still not found. Now this is an unrecoverable error.
42282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42283$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42284      has_space=`$ECHO "$complete" | $GREP " "`
42285      if test "x$has_space" != x; then
42286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42288      fi
42289      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42290    fi
42291  fi
42292
42293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42296  # "foo.exe" is OK but "foo" is an error.
42297  #
42298  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42299  # It is also a way to make sure we got the proper file name for the real test later on.
42300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42301  if test "x$test_shortpath" = x; then
42302    # Short path failed, file does not exist as specified.
42303    # Try adding .exe or .cmd
42304    if test -f "${new_path}.exe"; then
42305      input_to_shortpath="${new_path}.exe"
42306    elif test -f "${new_path}.cmd"; then
42307      input_to_shortpath="${new_path}.cmd"
42308    else
42309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42310$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42313      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42314    fi
42315  else
42316    input_to_shortpath="$new_path"
42317  fi
42318
42319  # Call helper function which possibly converts this using DOS-style short mode.
42320  # If so, the updated path is stored in $new_path.
42321  new_path="$input_to_shortpath"
42322
42323  input_path="$input_to_shortpath"
42324  # Check if we need to convert this using DOS-style short mode. If the path
42325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42326  # take no chances and rewrite it.
42327  # Note: m4 eats our [], so we need to use [ and ] instead.
42328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42329  if test "x$has_forbidden_chars" != x; then
42330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42334      # Going to short mode and back again did indeed matter. Since short mode is
42335      # case insensitive, let's make it lowercase to improve readability.
42336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42337      # Now convert it back to Unix-style (cygpath)
42338      input_path=`$CYGPATH -u "$shortmode_path"`
42339      new_path="$input_path"
42340    fi
42341  fi
42342
42343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42344  if test "x$test_cygdrive_prefix" = x; then
42345    # As a simple fix, exclude /usr/bin since it's not a real path.
42346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42348      # a path prefixed by /cygdrive for fixpath to work.
42349      new_path="$CYGWIN_ROOT_PATH$input_path"
42350    fi
42351  fi
42352
42353  # remove trailing .exe if any
42354  new_path="${new_path/%.exe/}"
42355
42356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42357
42358  # First separate the path from the arguments. This will split at the first
42359  # space.
42360  complete="$NM"
42361  path="${complete%% *}"
42362  tmp="$complete EOL"
42363  arguments="${tmp#* }"
42364
42365  # Input might be given as Windows format, start by converting to
42366  # unix format.
42367  new_path="$path"
42368
42369  windows_path="$new_path"
42370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42371    unix_path=`$CYGPATH -u "$windows_path"`
42372    new_path="$unix_path"
42373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42375    new_path="$unix_path"
42376  fi
42377
42378
42379  # Now try to locate executable using which
42380  new_path=`$WHICH "$new_path" 2> /dev/null`
42381
42382  if test "x$new_path" = x; then
42383    # Oops. Which didn't find the executable.
42384    # The splitting of arguments from the executable at a space might have been incorrect,
42385    # since paths with space are more likely in Windows. Give it another try with the whole
42386    # argument.
42387    path="$complete"
42388    arguments="EOL"
42389    new_path="$path"
42390
42391  windows_path="$new_path"
42392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42393    unix_path=`$CYGPATH -u "$windows_path"`
42394    new_path="$unix_path"
42395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42397    new_path="$unix_path"
42398  fi
42399
42400
42401    new_path=`$WHICH "$new_path" 2> /dev/null`
42402    # bat and cmd files are not always considered executable in MSYS causing which
42403    # to not find them
42404    if test "x$new_path" = x \
42405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42407      new_path="$path"
42408
42409  windows_path="$new_path"
42410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42411    unix_path=`$CYGPATH -u "$windows_path"`
42412    new_path="$unix_path"
42413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42415    new_path="$unix_path"
42416  fi
42417
42418    fi
42419
42420    if test "x$new_path" = x; then
42421      # It's still not found. Now this is an unrecoverable error.
42422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42423$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42424      has_space=`$ECHO "$complete" | $GREP " "`
42425      if test "x$has_space" != x; then
42426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42428      fi
42429      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42430    fi
42431  fi
42432
42433  # Now new_path has a complete unix path to the binary
42434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42435    # Keep paths in /bin as-is, but remove trailing .exe if any
42436    new_path="${new_path/%.exe/}"
42437    # Do not save /bin paths to all_fixpath_prefixes!
42438  else
42439    # Not in mixed or Windows style, start by that.
42440    new_path=`cmd //c echo $new_path`
42441
42442  input_path="$new_path"
42443  # Check if we need to convert this using DOS-style short mode. If the path
42444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42445  # take no chances and rewrite it.
42446  # Note: m4 eats our [], so we need to use [ and ] instead.
42447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42448  if test "x$has_forbidden_chars" != x; then
42449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42451  fi
42452
42453    # Output is in $new_path
42454
42455  windows_path="$new_path"
42456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42457    unix_path=`$CYGPATH -u "$windows_path"`
42458    new_path="$unix_path"
42459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42461    new_path="$unix_path"
42462  fi
42463
42464    # remove trailing .exe if any
42465    new_path="${new_path/%.exe/}"
42466
42467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42469  fi
42470
42471    else
42472      # We're on a unix platform. Hooray! :)
42473      # First separate the path from the arguments. This will split at the first
42474      # space.
42475      complete="$NM"
42476      path="${complete%% *}"
42477      tmp="$complete EOL"
42478      arguments="${tmp#* }"
42479
42480      # Cannot rely on the command "which" here since it doesn't always work.
42481      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42482      if test -z "$is_absolute_path"; then
42483        # Path to executable is not absolute. Find it.
42484        IFS_save="$IFS"
42485        IFS=:
42486        for p in $PATH; do
42487          if test -f "$p/$path" && test -x "$p/$path"; then
42488            new_path="$p/$path"
42489            break
42490          fi
42491        done
42492        IFS="$IFS_save"
42493      else
42494        # This is an absolute path, we can use it without further modifications.
42495        new_path="$path"
42496      fi
42497
42498      if test "x$new_path" = x; then
42499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42500$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42501        has_space=`$ECHO "$complete" | $GREP " "`
42502        if test "x$has_space" != x; then
42503          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42505        fi
42506        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42507      fi
42508    fi
42509
42510    # Now join together the path and the arguments once again
42511    if test "x$arguments" != xEOL; then
42512      new_complete="$new_path ${arguments% *}"
42513    else
42514      new_complete="$new_path"
42515    fi
42516
42517    if test "x$complete" != "x$new_complete"; then
42518      NM="$new_complete"
42519      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42520$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42521    fi
42522  fi
42523
42524    GNM="$NM"
42525
42526  fi
42527
42528  # objcopy is used for moving debug symbols to separate files when
42529  # full debug symbols are enabled.
42530  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42531
42532
42533  # Publish this variable in the help.
42534
42535
42536  if [ -z "${OBJCOPY+x}" ]; then
42537    # The variable is not set by user, try to locate tool using the code snippet
42538    if test -n "$ac_tool_prefix"; then
42539  for ac_prog in gobjcopy objcopy
42540  do
42541    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42542set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42544$as_echo_n "checking for $ac_word... " >&6; }
42545if ${ac_cv_prog_OBJCOPY+:} false; then :
42546  $as_echo_n "(cached) " >&6
42547else
42548  if test -n "$OBJCOPY"; then
42549  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42550else
42551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42552for as_dir in $PATH
42553do
42554  IFS=$as_save_IFS
42555  test -z "$as_dir" && as_dir=.
42556    for ac_exec_ext in '' $ac_executable_extensions; do
42557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42558    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42560    break 2
42561  fi
42562done
42563  done
42564IFS=$as_save_IFS
42565
42566fi
42567fi
42568OBJCOPY=$ac_cv_prog_OBJCOPY
42569if test -n "$OBJCOPY"; then
42570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42571$as_echo "$OBJCOPY" >&6; }
42572else
42573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42574$as_echo "no" >&6; }
42575fi
42576
42577
42578    test -n "$OBJCOPY" && break
42579  done
42580fi
42581if test -z "$OBJCOPY"; then
42582  ac_ct_OBJCOPY=$OBJCOPY
42583  for ac_prog in gobjcopy objcopy
42584do
42585  # Extract the first word of "$ac_prog", so it can be a program name with args.
42586set dummy $ac_prog; ac_word=$2
42587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42588$as_echo_n "checking for $ac_word... " >&6; }
42589if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42590  $as_echo_n "(cached) " >&6
42591else
42592  if test -n "$ac_ct_OBJCOPY"; then
42593  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42594else
42595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42596for as_dir in $PATH
42597do
42598  IFS=$as_save_IFS
42599  test -z "$as_dir" && as_dir=.
42600    for ac_exec_ext in '' $ac_executable_extensions; do
42601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42602    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42604    break 2
42605  fi
42606done
42607  done
42608IFS=$as_save_IFS
42609
42610fi
42611fi
42612ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42613if test -n "$ac_ct_OBJCOPY"; then
42614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42615$as_echo "$ac_ct_OBJCOPY" >&6; }
42616else
42617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42618$as_echo "no" >&6; }
42619fi
42620
42621
42622  test -n "$ac_ct_OBJCOPY" && break
42623done
42624
42625  if test "x$ac_ct_OBJCOPY" = x; then
42626    OBJCOPY=""
42627  else
42628    case $cross_compiling:$ac_tool_warned in
42629yes:)
42630{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42631$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42632ac_tool_warned=yes ;;
42633esac
42634    OBJCOPY=$ac_ct_OBJCOPY
42635  fi
42636fi
42637
42638  else
42639    # The variable is set, but is it from the command line or the environment?
42640
42641    # Try to remove the string !OBJCOPY! from our list.
42642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42644      # If it failed, the variable was not from the command line. Ignore it,
42645      # but warn the user (except for BASH, which is always set by the calling BASH).
42646      if test "xOBJCOPY" != xBASH; then
42647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42648$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42649      fi
42650      # Try to locate tool using the code snippet
42651      if test -n "$ac_tool_prefix"; then
42652  for ac_prog in gobjcopy objcopy
42653  do
42654    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42655set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42657$as_echo_n "checking for $ac_word... " >&6; }
42658if ${ac_cv_prog_OBJCOPY+:} false; then :
42659  $as_echo_n "(cached) " >&6
42660else
42661  if test -n "$OBJCOPY"; then
42662  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42663else
42664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42665for as_dir in $PATH
42666do
42667  IFS=$as_save_IFS
42668  test -z "$as_dir" && as_dir=.
42669    for ac_exec_ext in '' $ac_executable_extensions; do
42670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42671    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42673    break 2
42674  fi
42675done
42676  done
42677IFS=$as_save_IFS
42678
42679fi
42680fi
42681OBJCOPY=$ac_cv_prog_OBJCOPY
42682if test -n "$OBJCOPY"; then
42683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42684$as_echo "$OBJCOPY" >&6; }
42685else
42686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42687$as_echo "no" >&6; }
42688fi
42689
42690
42691    test -n "$OBJCOPY" && break
42692  done
42693fi
42694if test -z "$OBJCOPY"; then
42695  ac_ct_OBJCOPY=$OBJCOPY
42696  for ac_prog in gobjcopy objcopy
42697do
42698  # Extract the first word of "$ac_prog", so it can be a program name with args.
42699set dummy $ac_prog; ac_word=$2
42700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42701$as_echo_n "checking for $ac_word... " >&6; }
42702if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42703  $as_echo_n "(cached) " >&6
42704else
42705  if test -n "$ac_ct_OBJCOPY"; then
42706  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42707else
42708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42709for as_dir in $PATH
42710do
42711  IFS=$as_save_IFS
42712  test -z "$as_dir" && as_dir=.
42713    for ac_exec_ext in '' $ac_executable_extensions; do
42714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42715    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42717    break 2
42718  fi
42719done
42720  done
42721IFS=$as_save_IFS
42722
42723fi
42724fi
42725ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42726if test -n "$ac_ct_OBJCOPY"; then
42727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42728$as_echo "$ac_ct_OBJCOPY" >&6; }
42729else
42730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42731$as_echo "no" >&6; }
42732fi
42733
42734
42735  test -n "$ac_ct_OBJCOPY" && break
42736done
42737
42738  if test "x$ac_ct_OBJCOPY" = x; then
42739    OBJCOPY=""
42740  else
42741    case $cross_compiling:$ac_tool_warned in
42742yes:)
42743{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42744$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42745ac_tool_warned=yes ;;
42746esac
42747    OBJCOPY=$ac_ct_OBJCOPY
42748  fi
42749fi
42750
42751    else
42752      # If it succeeded, then it was overridden by the user. We will use it
42753      # for the tool.
42754
42755      # First remove it from the list of overridden variables, so we can test
42756      # for unknown variables in the end.
42757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42758
42759      # Check if we try to supply an empty value
42760      if test "x$OBJCOPY" = x; then
42761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42762$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42764$as_echo_n "checking for OBJCOPY... " >&6; }
42765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42766$as_echo "disabled" >&6; }
42767      else
42768        # Check if the provided tool contains a complete path.
42769        tool_specified="$OBJCOPY"
42770        tool_basename="${tool_specified##*/}"
42771        if test "x$tool_basename" = "x$tool_specified"; then
42772          # A command without a complete path is provided, search $PATH.
42773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42774$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42775          # Extract the first word of "$tool_basename", so it can be a program name with args.
42776set dummy $tool_basename; ac_word=$2
42777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42778$as_echo_n "checking for $ac_word... " >&6; }
42779if ${ac_cv_path_OBJCOPY+:} false; then :
42780  $as_echo_n "(cached) " >&6
42781else
42782  case $OBJCOPY in
42783  [\\/]* | ?:[\\/]*)
42784  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42785  ;;
42786  *)
42787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42788for as_dir in $PATH
42789do
42790  IFS=$as_save_IFS
42791  test -z "$as_dir" && as_dir=.
42792    for ac_exec_ext in '' $ac_executable_extensions; do
42793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42794    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42796    break 2
42797  fi
42798done
42799  done
42800IFS=$as_save_IFS
42801
42802  ;;
42803esac
42804fi
42805OBJCOPY=$ac_cv_path_OBJCOPY
42806if test -n "$OBJCOPY"; then
42807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42808$as_echo "$OBJCOPY" >&6; }
42809else
42810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42811$as_echo "no" >&6; }
42812fi
42813
42814
42815          if test "x$OBJCOPY" = x; then
42816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42817          fi
42818        else
42819          # Otherwise we believe it is a complete path. Use it as it is.
42820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42821$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42823$as_echo_n "checking for OBJCOPY... " >&6; }
42824          if test ! -x "$tool_specified"; then
42825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42826$as_echo "not found" >&6; }
42827            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42828          fi
42829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42830$as_echo "$tool_specified" >&6; }
42831        fi
42832      fi
42833    fi
42834
42835  fi
42836
42837
42838    # Only call fixup if objcopy was found.
42839    if test -n "$OBJCOPY"; then
42840
42841  # Only process if variable expands to non-empty
42842
42843  if test "x$OBJCOPY" != x; then
42844    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42845
42846  # First separate the path from the arguments. This will split at the first
42847  # space.
42848  complete="$OBJCOPY"
42849  path="${complete%% *}"
42850  tmp="$complete EOL"
42851  arguments="${tmp#* }"
42852
42853  # Input might be given as Windows format, start by converting to
42854  # unix format.
42855  new_path=`$CYGPATH -u "$path"`
42856
42857  # Now try to locate executable using which
42858  new_path=`$WHICH "$new_path" 2> /dev/null`
42859  # bat and cmd files are not always considered executable in cygwin causing which
42860  # to not find them
42861  if test "x$new_path" = x \
42862      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42863      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42864    new_path=`$CYGPATH -u "$path"`
42865  fi
42866  if test "x$new_path" = x; then
42867    # Oops. Which didn't find the executable.
42868    # The splitting of arguments from the executable at a space might have been incorrect,
42869    # since paths with space are more likely in Windows. Give it another try with the whole
42870    # argument.
42871    path="$complete"
42872    arguments="EOL"
42873    new_path=`$CYGPATH -u "$path"`
42874    new_path=`$WHICH "$new_path" 2> /dev/null`
42875    # bat and cmd files are not always considered executable in cygwin causing which
42876    # to not find them
42877    if test "x$new_path" = x \
42878        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42879        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42880      new_path=`$CYGPATH -u "$path"`
42881    fi
42882    if test "x$new_path" = x; then
42883      # It's still not found. Now this is an unrecoverable error.
42884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42885$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42886      has_space=`$ECHO "$complete" | $GREP " "`
42887      if test "x$has_space" != x; then
42888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42890      fi
42891      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42892    fi
42893  fi
42894
42895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42898  # "foo.exe" is OK but "foo" is an error.
42899  #
42900  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42901  # It is also a way to make sure we got the proper file name for the real test later on.
42902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42903  if test "x$test_shortpath" = x; then
42904    # Short path failed, file does not exist as specified.
42905    # Try adding .exe or .cmd
42906    if test -f "${new_path}.exe"; then
42907      input_to_shortpath="${new_path}.exe"
42908    elif test -f "${new_path}.cmd"; then
42909      input_to_shortpath="${new_path}.cmd"
42910    else
42911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42912$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42913      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42914$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42915      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42916    fi
42917  else
42918    input_to_shortpath="$new_path"
42919  fi
42920
42921  # Call helper function which possibly converts this using DOS-style short mode.
42922  # If so, the updated path is stored in $new_path.
42923  new_path="$input_to_shortpath"
42924
42925  input_path="$input_to_shortpath"
42926  # Check if we need to convert this using DOS-style short mode. If the path
42927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42928  # take no chances and rewrite it.
42929  # Note: m4 eats our [], so we need to use [ and ] instead.
42930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42931  if test "x$has_forbidden_chars" != x; then
42932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42936      # Going to short mode and back again did indeed matter. Since short mode is
42937      # case insensitive, let's make it lowercase to improve readability.
42938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42939      # Now convert it back to Unix-style (cygpath)
42940      input_path=`$CYGPATH -u "$shortmode_path"`
42941      new_path="$input_path"
42942    fi
42943  fi
42944
42945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42946  if test "x$test_cygdrive_prefix" = x; then
42947    # As a simple fix, exclude /usr/bin since it's not a real path.
42948    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42950      # a path prefixed by /cygdrive for fixpath to work.
42951      new_path="$CYGWIN_ROOT_PATH$input_path"
42952    fi
42953  fi
42954
42955  # remove trailing .exe if any
42956  new_path="${new_path/%.exe/}"
42957
42958    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42959
42960  # First separate the path from the arguments. This will split at the first
42961  # space.
42962  complete="$OBJCOPY"
42963  path="${complete%% *}"
42964  tmp="$complete EOL"
42965  arguments="${tmp#* }"
42966
42967  # Input might be given as Windows format, start by converting to
42968  # unix format.
42969  new_path="$path"
42970
42971  windows_path="$new_path"
42972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42973    unix_path=`$CYGPATH -u "$windows_path"`
42974    new_path="$unix_path"
42975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42977    new_path="$unix_path"
42978  fi
42979
42980
42981  # Now try to locate executable using which
42982  new_path=`$WHICH "$new_path" 2> /dev/null`
42983
42984  if test "x$new_path" = x; then
42985    # Oops. Which didn't find the executable.
42986    # The splitting of arguments from the executable at a space might have been incorrect,
42987    # since paths with space are more likely in Windows. Give it another try with the whole
42988    # argument.
42989    path="$complete"
42990    arguments="EOL"
42991    new_path="$path"
42992
42993  windows_path="$new_path"
42994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42995    unix_path=`$CYGPATH -u "$windows_path"`
42996    new_path="$unix_path"
42997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42999    new_path="$unix_path"
43000  fi
43001
43002
43003    new_path=`$WHICH "$new_path" 2> /dev/null`
43004    # bat and cmd files are not always considered executable in MSYS causing which
43005    # to not find them
43006    if test "x$new_path" = x \
43007        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43008        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43009      new_path="$path"
43010
43011  windows_path="$new_path"
43012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43013    unix_path=`$CYGPATH -u "$windows_path"`
43014    new_path="$unix_path"
43015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43017    new_path="$unix_path"
43018  fi
43019
43020    fi
43021
43022    if test "x$new_path" = x; then
43023      # It's still not found. Now this is an unrecoverable error.
43024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43025$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43026      has_space=`$ECHO "$complete" | $GREP " "`
43027      if test "x$has_space" != x; then
43028        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43029$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43030      fi
43031      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43032    fi
43033  fi
43034
43035  # Now new_path has a complete unix path to the binary
43036  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43037    # Keep paths in /bin as-is, but remove trailing .exe if any
43038    new_path="${new_path/%.exe/}"
43039    # Do not save /bin paths to all_fixpath_prefixes!
43040  else
43041    # Not in mixed or Windows style, start by that.
43042    new_path=`cmd //c echo $new_path`
43043
43044  input_path="$new_path"
43045  # Check if we need to convert this using DOS-style short mode. If the path
43046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43047  # take no chances and rewrite it.
43048  # Note: m4 eats our [], so we need to use [ and ] instead.
43049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43050  if test "x$has_forbidden_chars" != x; then
43051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43053  fi
43054
43055    # Output is in $new_path
43056
43057  windows_path="$new_path"
43058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43059    unix_path=`$CYGPATH -u "$windows_path"`
43060    new_path="$unix_path"
43061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43063    new_path="$unix_path"
43064  fi
43065
43066    # remove trailing .exe if any
43067    new_path="${new_path/%.exe/}"
43068
43069    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43070    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43071  fi
43072
43073    else
43074      # We're on a unix platform. Hooray! :)
43075      # First separate the path from the arguments. This will split at the first
43076      # space.
43077      complete="$OBJCOPY"
43078      path="${complete%% *}"
43079      tmp="$complete EOL"
43080      arguments="${tmp#* }"
43081
43082      # Cannot rely on the command "which" here since it doesn't always work.
43083      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43084      if test -z "$is_absolute_path"; then
43085        # Path to executable is not absolute. Find it.
43086        IFS_save="$IFS"
43087        IFS=:
43088        for p in $PATH; do
43089          if test -f "$p/$path" && test -x "$p/$path"; then
43090            new_path="$p/$path"
43091            break
43092          fi
43093        done
43094        IFS="$IFS_save"
43095      else
43096        # This is an absolute path, we can use it without further modifications.
43097        new_path="$path"
43098      fi
43099
43100      if test "x$new_path" = x; then
43101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43102$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43103        has_space=`$ECHO "$complete" | $GREP " "`
43104        if test "x$has_space" != x; then
43105          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43106$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43107        fi
43108        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43109      fi
43110    fi
43111
43112    # Now join together the path and the arguments once again
43113    if test "x$arguments" != xEOL; then
43114      new_complete="$new_path ${arguments% *}"
43115    else
43116      new_complete="$new_path"
43117    fi
43118
43119    if test "x$complete" != "x$new_complete"; then
43120      OBJCOPY="$new_complete"
43121      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43122$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43123    fi
43124  fi
43125
43126      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43127        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43128        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43129        # - version number is last blank separate word on first line
43130        # - version number formats that have been seen:
43131        #   - <major>.<minor>
43132        #   - <major>.<minor>.<micro>
43133        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43134        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43135         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43136              -e 's/.* //' \
43137              -e '/^[01]\./b bad' \
43138              -e '/^2\./{' \
43139              -e '  s/^2\.//' \
43140              -e '  /^[0-9]$/b bad' \
43141              -e '  /^[0-9]\./b bad' \
43142              -e '  /^1[0-9]$/b bad' \
43143              -e '  /^1[0-9]\./b bad' \
43144              -e '  /^20\./b bad' \
43145              -e '  /^21\.0$/b bad' \
43146              -e '  /^21\.0\./b bad' \
43147              -e '}' \
43148              -e ':good' \
43149              -e 's/.*/VALID_VERSION/p' \
43150              -e 'q' \
43151              -e ':bad' \
43152              -e 's/.*/BAD_VERSION/p' \
43153              -e 'q'`
43154        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43155          OBJCOPY=
43156          { $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
43157$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43158          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43159$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43160          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43161$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43162          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43163$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43164          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43165$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43166        fi
43167      fi
43168    fi
43169  fi
43170
43171
43172
43173  # Publish this variable in the help.
43174
43175
43176  if [ -z "${OBJDUMP+x}" ]; then
43177    # The variable is not set by user, try to locate tool using the code snippet
43178    if test -n "$ac_tool_prefix"; then
43179  for ac_prog in gobjdump objdump
43180  do
43181    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43182set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43184$as_echo_n "checking for $ac_word... " >&6; }
43185if ${ac_cv_prog_OBJDUMP+:} false; then :
43186  $as_echo_n "(cached) " >&6
43187else
43188  if test -n "$OBJDUMP"; then
43189  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43190else
43191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43192for as_dir in $PATH
43193do
43194  IFS=$as_save_IFS
43195  test -z "$as_dir" && as_dir=.
43196    for ac_exec_ext in '' $ac_executable_extensions; do
43197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43198    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43200    break 2
43201  fi
43202done
43203  done
43204IFS=$as_save_IFS
43205
43206fi
43207fi
43208OBJDUMP=$ac_cv_prog_OBJDUMP
43209if test -n "$OBJDUMP"; then
43210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43211$as_echo "$OBJDUMP" >&6; }
43212else
43213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43214$as_echo "no" >&6; }
43215fi
43216
43217
43218    test -n "$OBJDUMP" && break
43219  done
43220fi
43221if test -z "$OBJDUMP"; then
43222  ac_ct_OBJDUMP=$OBJDUMP
43223  for ac_prog in gobjdump objdump
43224do
43225  # Extract the first word of "$ac_prog", so it can be a program name with args.
43226set dummy $ac_prog; ac_word=$2
43227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43228$as_echo_n "checking for $ac_word... " >&6; }
43229if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43230  $as_echo_n "(cached) " >&6
43231else
43232  if test -n "$ac_ct_OBJDUMP"; then
43233  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43234else
43235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43236for as_dir in $PATH
43237do
43238  IFS=$as_save_IFS
43239  test -z "$as_dir" && as_dir=.
43240    for ac_exec_ext in '' $ac_executable_extensions; do
43241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43242    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43244    break 2
43245  fi
43246done
43247  done
43248IFS=$as_save_IFS
43249
43250fi
43251fi
43252ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43253if test -n "$ac_ct_OBJDUMP"; then
43254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43255$as_echo "$ac_ct_OBJDUMP" >&6; }
43256else
43257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43258$as_echo "no" >&6; }
43259fi
43260
43261
43262  test -n "$ac_ct_OBJDUMP" && break
43263done
43264
43265  if test "x$ac_ct_OBJDUMP" = x; then
43266    OBJDUMP=""
43267  else
43268    case $cross_compiling:$ac_tool_warned in
43269yes:)
43270{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43271$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43272ac_tool_warned=yes ;;
43273esac
43274    OBJDUMP=$ac_ct_OBJDUMP
43275  fi
43276fi
43277
43278  else
43279    # The variable is set, but is it from the command line or the environment?
43280
43281    # Try to remove the string !OBJDUMP! from our list.
43282    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43283    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43284      # If it failed, the variable was not from the command line. Ignore it,
43285      # but warn the user (except for BASH, which is always set by the calling BASH).
43286      if test "xOBJDUMP" != xBASH; then
43287        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43288$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43289      fi
43290      # Try to locate tool using the code snippet
43291      if test -n "$ac_tool_prefix"; then
43292  for ac_prog in gobjdump objdump
43293  do
43294    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43295set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43297$as_echo_n "checking for $ac_word... " >&6; }
43298if ${ac_cv_prog_OBJDUMP+:} false; then :
43299  $as_echo_n "(cached) " >&6
43300else
43301  if test -n "$OBJDUMP"; then
43302  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43303else
43304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43305for as_dir in $PATH
43306do
43307  IFS=$as_save_IFS
43308  test -z "$as_dir" && as_dir=.
43309    for ac_exec_ext in '' $ac_executable_extensions; do
43310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43311    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43313    break 2
43314  fi
43315done
43316  done
43317IFS=$as_save_IFS
43318
43319fi
43320fi
43321OBJDUMP=$ac_cv_prog_OBJDUMP
43322if test -n "$OBJDUMP"; then
43323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43324$as_echo "$OBJDUMP" >&6; }
43325else
43326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43327$as_echo "no" >&6; }
43328fi
43329
43330
43331    test -n "$OBJDUMP" && break
43332  done
43333fi
43334if test -z "$OBJDUMP"; then
43335  ac_ct_OBJDUMP=$OBJDUMP
43336  for ac_prog in gobjdump objdump
43337do
43338  # Extract the first word of "$ac_prog", so it can be a program name with args.
43339set dummy $ac_prog; ac_word=$2
43340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43341$as_echo_n "checking for $ac_word... " >&6; }
43342if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43343  $as_echo_n "(cached) " >&6
43344else
43345  if test -n "$ac_ct_OBJDUMP"; then
43346  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43347else
43348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43349for as_dir in $PATH
43350do
43351  IFS=$as_save_IFS
43352  test -z "$as_dir" && as_dir=.
43353    for ac_exec_ext in '' $ac_executable_extensions; do
43354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43355    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43357    break 2
43358  fi
43359done
43360  done
43361IFS=$as_save_IFS
43362
43363fi
43364fi
43365ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43366if test -n "$ac_ct_OBJDUMP"; then
43367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43368$as_echo "$ac_ct_OBJDUMP" >&6; }
43369else
43370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43371$as_echo "no" >&6; }
43372fi
43373
43374
43375  test -n "$ac_ct_OBJDUMP" && break
43376done
43377
43378  if test "x$ac_ct_OBJDUMP" = x; then
43379    OBJDUMP=""
43380  else
43381    case $cross_compiling:$ac_tool_warned in
43382yes:)
43383{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43384$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43385ac_tool_warned=yes ;;
43386esac
43387    OBJDUMP=$ac_ct_OBJDUMP
43388  fi
43389fi
43390
43391    else
43392      # If it succeeded, then it was overridden by the user. We will use it
43393      # for the tool.
43394
43395      # First remove it from the list of overridden variables, so we can test
43396      # for unknown variables in the end.
43397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43398
43399      # Check if we try to supply an empty value
43400      if test "x$OBJDUMP" = x; then
43401        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43402$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43404$as_echo_n "checking for OBJDUMP... " >&6; }
43405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43406$as_echo "disabled" >&6; }
43407      else
43408        # Check if the provided tool contains a complete path.
43409        tool_specified="$OBJDUMP"
43410        tool_basename="${tool_specified##*/}"
43411        if test "x$tool_basename" = "x$tool_specified"; then
43412          # A command without a complete path is provided, search $PATH.
43413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43414$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43415          # Extract the first word of "$tool_basename", so it can be a program name with args.
43416set dummy $tool_basename; ac_word=$2
43417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43418$as_echo_n "checking for $ac_word... " >&6; }
43419if ${ac_cv_path_OBJDUMP+:} false; then :
43420  $as_echo_n "(cached) " >&6
43421else
43422  case $OBJDUMP in
43423  [\\/]* | ?:[\\/]*)
43424  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43425  ;;
43426  *)
43427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43428for as_dir in $PATH
43429do
43430  IFS=$as_save_IFS
43431  test -z "$as_dir" && as_dir=.
43432    for ac_exec_ext in '' $ac_executable_extensions; do
43433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43434    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43436    break 2
43437  fi
43438done
43439  done
43440IFS=$as_save_IFS
43441
43442  ;;
43443esac
43444fi
43445OBJDUMP=$ac_cv_path_OBJDUMP
43446if test -n "$OBJDUMP"; then
43447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43448$as_echo "$OBJDUMP" >&6; }
43449else
43450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43451$as_echo "no" >&6; }
43452fi
43453
43454
43455          if test "x$OBJDUMP" = x; then
43456            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43457          fi
43458        else
43459          # Otherwise we believe it is a complete path. Use it as it is.
43460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43461$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43462          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43463$as_echo_n "checking for OBJDUMP... " >&6; }
43464          if test ! -x "$tool_specified"; then
43465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43466$as_echo "not found" >&6; }
43467            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43468          fi
43469          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43470$as_echo "$tool_specified" >&6; }
43471        fi
43472      fi
43473    fi
43474
43475  fi
43476
43477
43478  if test "x$OBJDUMP" != x; then
43479    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43480    # bails if argument is missing.
43481
43482  # Only process if variable expands to non-empty
43483
43484  if test "x$OBJDUMP" != x; then
43485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43486
43487  # First separate the path from the arguments. This will split at the first
43488  # space.
43489  complete="$OBJDUMP"
43490  path="${complete%% *}"
43491  tmp="$complete EOL"
43492  arguments="${tmp#* }"
43493
43494  # Input might be given as Windows format, start by converting to
43495  # unix format.
43496  new_path=`$CYGPATH -u "$path"`
43497
43498  # Now try to locate executable using which
43499  new_path=`$WHICH "$new_path" 2> /dev/null`
43500  # bat and cmd files are not always considered executable in cygwin causing which
43501  # to not find them
43502  if test "x$new_path" = x \
43503      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43504      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43505    new_path=`$CYGPATH -u "$path"`
43506  fi
43507  if test "x$new_path" = x; then
43508    # Oops. Which didn't find the executable.
43509    # The splitting of arguments from the executable at a space might have been incorrect,
43510    # since paths with space are more likely in Windows. Give it another try with the whole
43511    # argument.
43512    path="$complete"
43513    arguments="EOL"
43514    new_path=`$CYGPATH -u "$path"`
43515    new_path=`$WHICH "$new_path" 2> /dev/null`
43516    # bat and cmd files are not always considered executable in cygwin causing which
43517    # to not find them
43518    if test "x$new_path" = x \
43519        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43520        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43521      new_path=`$CYGPATH -u "$path"`
43522    fi
43523    if test "x$new_path" = x; then
43524      # It's still not found. Now this is an unrecoverable error.
43525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43526$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43527      has_space=`$ECHO "$complete" | $GREP " "`
43528      if test "x$has_space" != x; then
43529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43531      fi
43532      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43533    fi
43534  fi
43535
43536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43539  # "foo.exe" is OK but "foo" is an error.
43540  #
43541  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43542  # It is also a way to make sure we got the proper file name for the real test later on.
43543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43544  if test "x$test_shortpath" = x; then
43545    # Short path failed, file does not exist as specified.
43546    # Try adding .exe or .cmd
43547    if test -f "${new_path}.exe"; then
43548      input_to_shortpath="${new_path}.exe"
43549    elif test -f "${new_path}.cmd"; then
43550      input_to_shortpath="${new_path}.cmd"
43551    else
43552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43553$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43554      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43555$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43556      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43557    fi
43558  else
43559    input_to_shortpath="$new_path"
43560  fi
43561
43562  # Call helper function which possibly converts this using DOS-style short mode.
43563  # If so, the updated path is stored in $new_path.
43564  new_path="$input_to_shortpath"
43565
43566  input_path="$input_to_shortpath"
43567  # Check if we need to convert this using DOS-style short mode. If the path
43568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43569  # take no chances and rewrite it.
43570  # Note: m4 eats our [], so we need to use [ and ] instead.
43571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43572  if test "x$has_forbidden_chars" != x; then
43573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43577      # Going to short mode and back again did indeed matter. Since short mode is
43578      # case insensitive, let's make it lowercase to improve readability.
43579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43580      # Now convert it back to Unix-style (cygpath)
43581      input_path=`$CYGPATH -u "$shortmode_path"`
43582      new_path="$input_path"
43583    fi
43584  fi
43585
43586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43587  if test "x$test_cygdrive_prefix" = x; then
43588    # As a simple fix, exclude /usr/bin since it's not a real path.
43589    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43591      # a path prefixed by /cygdrive for fixpath to work.
43592      new_path="$CYGWIN_ROOT_PATH$input_path"
43593    fi
43594  fi
43595
43596  # remove trailing .exe if any
43597  new_path="${new_path/%.exe/}"
43598
43599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43600
43601  # First separate the path from the arguments. This will split at the first
43602  # space.
43603  complete="$OBJDUMP"
43604  path="${complete%% *}"
43605  tmp="$complete EOL"
43606  arguments="${tmp#* }"
43607
43608  # Input might be given as Windows format, start by converting to
43609  # unix format.
43610  new_path="$path"
43611
43612  windows_path="$new_path"
43613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43614    unix_path=`$CYGPATH -u "$windows_path"`
43615    new_path="$unix_path"
43616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43618    new_path="$unix_path"
43619  fi
43620
43621
43622  # Now try to locate executable using which
43623  new_path=`$WHICH "$new_path" 2> /dev/null`
43624
43625  if test "x$new_path" = x; then
43626    # Oops. Which didn't find the executable.
43627    # The splitting of arguments from the executable at a space might have been incorrect,
43628    # since paths with space are more likely in Windows. Give it another try with the whole
43629    # argument.
43630    path="$complete"
43631    arguments="EOL"
43632    new_path="$path"
43633
43634  windows_path="$new_path"
43635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43636    unix_path=`$CYGPATH -u "$windows_path"`
43637    new_path="$unix_path"
43638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43640    new_path="$unix_path"
43641  fi
43642
43643
43644    new_path=`$WHICH "$new_path" 2> /dev/null`
43645    # bat and cmd files are not always considered executable in MSYS causing which
43646    # to not find them
43647    if test "x$new_path" = x \
43648        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43649        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43650      new_path="$path"
43651
43652  windows_path="$new_path"
43653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43654    unix_path=`$CYGPATH -u "$windows_path"`
43655    new_path="$unix_path"
43656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43658    new_path="$unix_path"
43659  fi
43660
43661    fi
43662
43663    if test "x$new_path" = x; then
43664      # It's still not found. Now this is an unrecoverable error.
43665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43666$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43667      has_space=`$ECHO "$complete" | $GREP " "`
43668      if test "x$has_space" != x; then
43669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43671      fi
43672      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43673    fi
43674  fi
43675
43676  # Now new_path has a complete unix path to the binary
43677  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43678    # Keep paths in /bin as-is, but remove trailing .exe if any
43679    new_path="${new_path/%.exe/}"
43680    # Do not save /bin paths to all_fixpath_prefixes!
43681  else
43682    # Not in mixed or Windows style, start by that.
43683    new_path=`cmd //c echo $new_path`
43684
43685  input_path="$new_path"
43686  # Check if we need to convert this using DOS-style short mode. If the path
43687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43688  # take no chances and rewrite it.
43689  # Note: m4 eats our [], so we need to use [ and ] instead.
43690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43691  if test "x$has_forbidden_chars" != x; then
43692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43694  fi
43695
43696    # Output is in $new_path
43697
43698  windows_path="$new_path"
43699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43700    unix_path=`$CYGPATH -u "$windows_path"`
43701    new_path="$unix_path"
43702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43704    new_path="$unix_path"
43705  fi
43706
43707    # remove trailing .exe if any
43708    new_path="${new_path/%.exe/}"
43709
43710    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43711    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43712  fi
43713
43714    else
43715      # We're on a unix platform. Hooray! :)
43716      # First separate the path from the arguments. This will split at the first
43717      # space.
43718      complete="$OBJDUMP"
43719      path="${complete%% *}"
43720      tmp="$complete EOL"
43721      arguments="${tmp#* }"
43722
43723      # Cannot rely on the command "which" here since it doesn't always work.
43724      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43725      if test -z "$is_absolute_path"; then
43726        # Path to executable is not absolute. Find it.
43727        IFS_save="$IFS"
43728        IFS=:
43729        for p in $PATH; do
43730          if test -f "$p/$path" && test -x "$p/$path"; then
43731            new_path="$p/$path"
43732            break
43733          fi
43734        done
43735        IFS="$IFS_save"
43736      else
43737        # This is an absolute path, we can use it without further modifications.
43738        new_path="$path"
43739      fi
43740
43741      if test "x$new_path" = x; then
43742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43743$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43744        has_space=`$ECHO "$complete" | $GREP " "`
43745        if test "x$has_space" != x; then
43746          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43747$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43748        fi
43749        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43750      fi
43751    fi
43752
43753    # Now join together the path and the arguments once again
43754    if test "x$arguments" != xEOL; then
43755      new_complete="$new_path ${arguments% *}"
43756    else
43757      new_complete="$new_path"
43758    fi
43759
43760    if test "x$complete" != "x$new_complete"; then
43761      OBJDUMP="$new_complete"
43762      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43763$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43764    fi
43765  fi
43766
43767  fi
43768
43769
43770  # Restore old path.
43771  PATH="$OLD_PATH"
43772
43773  # Restore the flags to the user specified values.
43774  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43775  CFLAGS="$ORG_CFLAGS"
43776  CXXFLAGS="$ORG_CXXFLAGS"
43777
43778
43779# Finally do some processing after the detection phase
43780
43781  if test "x$COMPILE_TYPE" = "xcross"; then
43782    # Now we need to find a C/C++ compiler that can build executables for the
43783    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43784    # used once. Also, we need to do this without adding a tools dir to the
43785    # path, otherwise we might pick up cross-compilers which don't use standard
43786    # naming.
43787
43788    OLDPATH="$PATH"
43789
43790
43791# Check whether --with-build-devkit was given.
43792if test "${with_build_devkit+set}" = set; then :
43793  withval=$with_build_devkit;
43794fi
43795
43796    if test "x$with_build_devkit" = "xyes"; then
43797      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43798    elif test -n "$with_build_devkit"; then
43799      if test ! -d "$with_build_devkit"; then
43800        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43801      else
43802
43803  # Only process if variable expands to non-empty
43804
43805  if test "x$with_build_devkit" != x; then
43806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43807
43808  # Input might be given as Windows format, start by converting to
43809  # unix format.
43810  path="$with_build_devkit"
43811  new_path=`$CYGPATH -u "$path"`
43812
43813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43816  # "foo.exe" is OK but "foo" is an error.
43817  #
43818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43819  # It is also a way to make sure we got the proper file name for the real test later on.
43820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43821  if test "x$test_shortpath" = x; then
43822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43823$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43824    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43825  fi
43826
43827  # Call helper function which possibly converts this using DOS-style short mode.
43828  # If so, the updated path is stored in $new_path.
43829
43830  input_path="$new_path"
43831  # Check if we need to convert this using DOS-style short mode. If the path
43832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43833  # take no chances and rewrite it.
43834  # Note: m4 eats our [], so we need to use [ and ] instead.
43835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43836  if test "x$has_forbidden_chars" != x; then
43837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43841      # Going to short mode and back again did indeed matter. Since short mode is
43842      # case insensitive, let's make it lowercase to improve readability.
43843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43844      # Now convert it back to Unix-style (cygpath)
43845      input_path=`$CYGPATH -u "$shortmode_path"`
43846      new_path="$input_path"
43847    fi
43848  fi
43849
43850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43851  if test "x$test_cygdrive_prefix" = x; then
43852    # As a simple fix, exclude /usr/bin since it's not a real path.
43853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43855      # a path prefixed by /cygdrive for fixpath to work.
43856      new_path="$CYGWIN_ROOT_PATH$input_path"
43857    fi
43858  fi
43859
43860
43861  if test "x$path" != "x$new_path"; then
43862    with_build_devkit="$new_path"
43863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43864$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43865  fi
43866
43867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43868
43869  path="$with_build_devkit"
43870  has_colon=`$ECHO $path | $GREP ^.:`
43871  new_path="$path"
43872  if test "x$has_colon" = x; then
43873    # Not in mixed or Windows style, start by that.
43874    new_path=`cmd //c echo $path`
43875  fi
43876
43877
43878  input_path="$new_path"
43879  # Check if we need to convert this using DOS-style short mode. If the path
43880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43881  # take no chances and rewrite it.
43882  # Note: m4 eats our [], so we need to use [ and ] instead.
43883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43884  if test "x$has_forbidden_chars" != x; then
43885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43887  fi
43888
43889
43890  windows_path="$new_path"
43891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43892    unix_path=`$CYGPATH -u "$windows_path"`
43893    new_path="$unix_path"
43894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43896    new_path="$unix_path"
43897  fi
43898
43899  if test "x$path" != "x$new_path"; then
43900    with_build_devkit="$new_path"
43901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43902$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43903  fi
43904
43905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43907
43908    else
43909      # We're on a unix platform. Hooray! :)
43910      path="$with_build_devkit"
43911      has_space=`$ECHO "$path" | $GREP " "`
43912      if test "x$has_space" != x; then
43913        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43914$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43915        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43916      fi
43917
43918      # Use eval to expand a potential ~
43919      eval path="$path"
43920      if test ! -f "$path" && test ! -d "$path"; then
43921        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43922      fi
43923
43924      if test -d "$path"; then
43925        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43926      else
43927        dir="`$DIRNAME "$path"`"
43928        base="`$BASENAME "$path"`"
43929        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43930      fi
43931    fi
43932  fi
43933
43934        BUILD_DEVKIT_ROOT="$with_build_devkit"
43935        # Check for a meta data info file in the root of the devkit
43936        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43937          # Process devkit.info so that existing devkit variables are not
43938          # modified by this
43939          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43940              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43941              -e "s/\$host/\$build/g" \
43942              $BUILD_DEVKIT_ROOT/devkit.info \
43943              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43944          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43945          # This potentially sets the following:
43946          # A descriptive name of the devkit
43947
43948  if test "x$BUILD_DEVKIT_NAME" = x; then
43949    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43950  fi
43951
43952          # Corresponds to --with-extra-path
43953
43954  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43955    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43956  fi
43957
43958          # Corresponds to --with-toolchain-path
43959
43960  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43961    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43962  fi
43963
43964          # Corresponds to --with-sysroot
43965
43966  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43967    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43968  fi
43969
43970          # Skip the Window specific parts
43971        fi
43972
43973        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43974$as_echo_n "checking for build platform devkit... " >&6; }
43975        if test "x$BUILD_DEVKIT_NAME" != x; then
43976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43977$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43978        else
43979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43980$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43981        fi
43982
43983        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43984
43985  if test "x$BUILD_SYSROOT" != "x"; then
43986    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43987      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43988        # Solaris Studio does not have a concept of sysroot. Instead we must
43989        # make sure the default include and lib dirs are appended to each
43990        # compile and link command line. Must also add -I-xbuiltin to enable
43991        # inlining of system functions and intrinsics.
43992        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43993        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43994            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43995            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43996      fi
43997    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43998      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43999      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44000    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44001      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44002      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44003    fi
44004    # Propagate the sysroot args to hotspot
44005    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44006    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44007    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44008    # The global CFLAGS and LDFLAGS variables need these for configure to function
44009    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44010    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44011    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44012    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44013  fi
44014
44015  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44016    # We also need -iframework<path>/System/Library/Frameworks
44017    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44018    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44019    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44020    # set this here so it doesn't have to be peppered throughout the forest
44021    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44022    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44023  fi
44024
44025
44026
44027
44028
44029         # Fallback default of just /bin if DEVKIT_PATH is not defined
44030        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44031          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44032        fi
44033        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44034      fi
44035    fi
44036
44037    # FIXME: we should list the discovered compilers as an exclude pattern!
44038    # If we do that, we can do this detection before POST_DETECTION, and still
44039    # find the build compilers in the tools dir, if needed.
44040
44041
44042
44043  # Publish this variable in the help.
44044
44045
44046  if [ -z "${BUILD_CC+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 gcc
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_CC+:} false; then :
44055  $as_echo_n "(cached) " >&6
44056else
44057  case $BUILD_CC in
44058  [\\/]* | ?:[\\/]*)
44059  ac_cv_path_BUILD_CC="$BUILD_CC" # 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_CC="$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_CC=$ac_cv_path_BUILD_CC
44081if test -n "$BUILD_CC"; then
44082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44083$as_echo "$BUILD_CC" >&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_CC" && 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_CC! from our list.
44097    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
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_CC" != xBASH; then
44102        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44103$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC 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 gcc
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_CC+:} false; then :
44113  $as_echo_n "(cached) " >&6
44114else
44115  case $BUILD_CC in
44116  [\\/]* | ?:[\\/]*)
44117  ac_cv_path_BUILD_CC="$BUILD_CC" # 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_CC="$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_CC=$ac_cv_path_BUILD_CC
44139if test -n "$BUILD_CC"; then
44140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44141$as_echo "$BUILD_CC" >&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_CC" && 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_CC" = x; then
44161        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44162$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44163        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44164$as_echo_n "checking for BUILD_CC... " >&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_CC"
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_CC=$tool_basename" >&5
44174$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$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_CC+:} false; then :
44180  $as_echo_n "(cached) " >&6
44181else
44182  case $BUILD_CC in
44183  [\\/]* | ?:[\\/]*)
44184  ac_cv_path_BUILD_CC="$BUILD_CC" # 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_CC="$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_CC=$ac_cv_path_BUILD_CC
44206if test -n "$BUILD_CC"; then
44207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44208$as_echo "$BUILD_CC" >&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_CC" = 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_CC=$tool_specified" >&5
44221$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44222          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44223$as_echo_n "checking for BUILD_CC... " >&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_CC=$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_CC" = x; then
44240    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44241  fi
44242
44243
44244
44245  # Only process if variable expands to non-empty
44246
44247  if test "x$BUILD_CC" != 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_CC"
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_CC, which resolves as \"$complete\", is not found." >&5
44289$as_echo "$as_me: The path of BUILD_CC, 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_CC" "$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_CC, which resolves as \"$new_path\", is invalid." >&5
44316$as_echo "$as_me: The path of BUILD_CC, 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_CC" "$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_CC"
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_CC, which resolves as \"$complete\", is not found." >&5
44429$as_echo "$as_me: The path of BUILD_CC, 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_CC" "$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_CC"
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_CC, which resolves as \"$complete\", is not found." >&5
44506$as_echo "$as_me: The path of BUILD_CC, 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_CC" "$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_CC="$new_complete"
44525      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44526$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44527    fi
44528  fi
44529
44530
44531
44532
44533  # Publish this variable in the help.
44534
44535
44536  if [ -z "${BUILD_CXX+x}" ]; then
44537    # The variable is not set by user, try to locate tool using the code snippet
44538    for ac_prog in cl CC g++
44539do
44540  # Extract the first word of "$ac_prog", so it can be a program name with args.
44541set dummy $ac_prog; ac_word=$2
44542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44543$as_echo_n "checking for $ac_word... " >&6; }
44544if ${ac_cv_path_BUILD_CXX+:} false; then :
44545  $as_echo_n "(cached) " >&6
44546else
44547  case $BUILD_CXX in
44548  [\\/]* | ?:[\\/]*)
44549  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44550  ;;
44551  *)
44552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44553for as_dir in $PATH
44554do
44555  IFS=$as_save_IFS
44556  test -z "$as_dir" && as_dir=.
44557    for ac_exec_ext in '' $ac_executable_extensions; do
44558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44559    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44561    break 2
44562  fi
44563done
44564  done
44565IFS=$as_save_IFS
44566
44567  ;;
44568esac
44569fi
44570BUILD_CXX=$ac_cv_path_BUILD_CXX
44571if test -n "$BUILD_CXX"; then
44572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44573$as_echo "$BUILD_CXX" >&6; }
44574else
44575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44576$as_echo "no" >&6; }
44577fi
44578
44579
44580  test -n "$BUILD_CXX" && break
44581done
44582
44583  else
44584    # The variable is set, but is it from the command line or the environment?
44585
44586    # Try to remove the string !BUILD_CXX! from our list.
44587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44589      # If it failed, the variable was not from the command line. Ignore it,
44590      # but warn the user (except for BASH, which is always set by the calling BASH).
44591      if test "xBUILD_CXX" != xBASH; then
44592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44593$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44594      fi
44595      # Try to locate tool using the code snippet
44596      for ac_prog in cl CC g++
44597do
44598  # Extract the first word of "$ac_prog", so it can be a program name with args.
44599set dummy $ac_prog; ac_word=$2
44600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44601$as_echo_n "checking for $ac_word... " >&6; }
44602if ${ac_cv_path_BUILD_CXX+:} false; then :
44603  $as_echo_n "(cached) " >&6
44604else
44605  case $BUILD_CXX in
44606  [\\/]* | ?:[\\/]*)
44607  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44608  ;;
44609  *)
44610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44611for as_dir in $PATH
44612do
44613  IFS=$as_save_IFS
44614  test -z "$as_dir" && as_dir=.
44615    for ac_exec_ext in '' $ac_executable_extensions; do
44616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44617    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44619    break 2
44620  fi
44621done
44622  done
44623IFS=$as_save_IFS
44624
44625  ;;
44626esac
44627fi
44628BUILD_CXX=$ac_cv_path_BUILD_CXX
44629if test -n "$BUILD_CXX"; then
44630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44631$as_echo "$BUILD_CXX" >&6; }
44632else
44633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44634$as_echo "no" >&6; }
44635fi
44636
44637
44638  test -n "$BUILD_CXX" && break
44639done
44640
44641    else
44642      # If it succeeded, then it was overridden by the user. We will use it
44643      # for the tool.
44644
44645      # First remove it from the list of overridden variables, so we can test
44646      # for unknown variables in the end.
44647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44648
44649      # Check if we try to supply an empty value
44650      if test "x$BUILD_CXX" = x; then
44651        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44652$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44653        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44654$as_echo_n "checking for BUILD_CXX... " >&6; }
44655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44656$as_echo "disabled" >&6; }
44657      else
44658        # Check if the provided tool contains a complete path.
44659        tool_specified="$BUILD_CXX"
44660        tool_basename="${tool_specified##*/}"
44661        if test "x$tool_basename" = "x$tool_specified"; then
44662          # A command without a complete path is provided, search $PATH.
44663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44664$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44665          # Extract the first word of "$tool_basename", so it can be a program name with args.
44666set dummy $tool_basename; ac_word=$2
44667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44668$as_echo_n "checking for $ac_word... " >&6; }
44669if ${ac_cv_path_BUILD_CXX+:} false; then :
44670  $as_echo_n "(cached) " >&6
44671else
44672  case $BUILD_CXX in
44673  [\\/]* | ?:[\\/]*)
44674  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44675  ;;
44676  *)
44677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44678for as_dir in $PATH
44679do
44680  IFS=$as_save_IFS
44681  test -z "$as_dir" && as_dir=.
44682    for ac_exec_ext in '' $ac_executable_extensions; do
44683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44684    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44686    break 2
44687  fi
44688done
44689  done
44690IFS=$as_save_IFS
44691
44692  ;;
44693esac
44694fi
44695BUILD_CXX=$ac_cv_path_BUILD_CXX
44696if test -n "$BUILD_CXX"; then
44697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44698$as_echo "$BUILD_CXX" >&6; }
44699else
44700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44701$as_echo "no" >&6; }
44702fi
44703
44704
44705          if test "x$BUILD_CXX" = x; then
44706            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44707          fi
44708        else
44709          # Otherwise we believe it is a complete path. Use it as it is.
44710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44711$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44712          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44713$as_echo_n "checking for BUILD_CXX... " >&6; }
44714          if test ! -x "$tool_specified"; then
44715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44716$as_echo "not found" >&6; }
44717            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44718          fi
44719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44720$as_echo "$tool_specified" >&6; }
44721        fi
44722      fi
44723    fi
44724
44725  fi
44726
44727
44728
44729  if test "x$BUILD_CXX" = x; then
44730    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44731  fi
44732
44733
44734
44735  # Only process if variable expands to non-empty
44736
44737  if test "x$BUILD_CXX" != x; then
44738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44739
44740  # First separate the path from the arguments. This will split at the first
44741  # space.
44742  complete="$BUILD_CXX"
44743  path="${complete%% *}"
44744  tmp="$complete EOL"
44745  arguments="${tmp#* }"
44746
44747  # Input might be given as Windows format, start by converting to
44748  # unix format.
44749  new_path=`$CYGPATH -u "$path"`
44750
44751  # Now try to locate executable using which
44752  new_path=`$WHICH "$new_path" 2> /dev/null`
44753  # bat and cmd files are not always considered executable in cygwin causing which
44754  # to not find them
44755  if test "x$new_path" = x \
44756      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44757      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44758    new_path=`$CYGPATH -u "$path"`
44759  fi
44760  if test "x$new_path" = x; then
44761    # Oops. Which didn't find the executable.
44762    # The splitting of arguments from the executable at a space might have been incorrect,
44763    # since paths with space are more likely in Windows. Give it another try with the whole
44764    # argument.
44765    path="$complete"
44766    arguments="EOL"
44767    new_path=`$CYGPATH -u "$path"`
44768    new_path=`$WHICH "$new_path" 2> /dev/null`
44769    # bat and cmd files are not always considered executable in cygwin causing which
44770    # to not find them
44771    if test "x$new_path" = x \
44772        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44773        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44774      new_path=`$CYGPATH -u "$path"`
44775    fi
44776    if test "x$new_path" = x; then
44777      # It's still not found. Now this is an unrecoverable error.
44778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44779$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44780      has_space=`$ECHO "$complete" | $GREP " "`
44781      if test "x$has_space" != x; then
44782        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44783$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44784      fi
44785      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44786    fi
44787  fi
44788
44789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44792  # "foo.exe" is OK but "foo" is an error.
44793  #
44794  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44795  # It is also a way to make sure we got the proper file name for the real test later on.
44796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44797  if test "x$test_shortpath" = x; then
44798    # Short path failed, file does not exist as specified.
44799    # Try adding .exe or .cmd
44800    if test -f "${new_path}.exe"; then
44801      input_to_shortpath="${new_path}.exe"
44802    elif test -f "${new_path}.cmd"; then
44803      input_to_shortpath="${new_path}.cmd"
44804    else
44805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44806$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44807      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44808$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44809      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44810    fi
44811  else
44812    input_to_shortpath="$new_path"
44813  fi
44814
44815  # Call helper function which possibly converts this using DOS-style short mode.
44816  # If so, the updated path is stored in $new_path.
44817  new_path="$input_to_shortpath"
44818
44819  input_path="$input_to_shortpath"
44820  # Check if we need to convert this using DOS-style short mode. If the path
44821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44822  # take no chances and rewrite it.
44823  # Note: m4 eats our [], so we need to use [ and ] instead.
44824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44825  if test "x$has_forbidden_chars" != x; then
44826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44830      # Going to short mode and back again did indeed matter. Since short mode is
44831      # case insensitive, let's make it lowercase to improve readability.
44832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44833      # Now convert it back to Unix-style (cygpath)
44834      input_path=`$CYGPATH -u "$shortmode_path"`
44835      new_path="$input_path"
44836    fi
44837  fi
44838
44839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44840  if test "x$test_cygdrive_prefix" = x; then
44841    # As a simple fix, exclude /usr/bin since it's not a real path.
44842    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44844      # a path prefixed by /cygdrive for fixpath to work.
44845      new_path="$CYGWIN_ROOT_PATH$input_path"
44846    fi
44847  fi
44848
44849  # remove trailing .exe if any
44850  new_path="${new_path/%.exe/}"
44851
44852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44853
44854  # First separate the path from the arguments. This will split at the first
44855  # space.
44856  complete="$BUILD_CXX"
44857  path="${complete%% *}"
44858  tmp="$complete EOL"
44859  arguments="${tmp#* }"
44860
44861  # Input might be given as Windows format, start by converting to
44862  # unix format.
44863  new_path="$path"
44864
44865  windows_path="$new_path"
44866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44867    unix_path=`$CYGPATH -u "$windows_path"`
44868    new_path="$unix_path"
44869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44871    new_path="$unix_path"
44872  fi
44873
44874
44875  # Now try to locate executable using which
44876  new_path=`$WHICH "$new_path" 2> /dev/null`
44877
44878  if test "x$new_path" = x; then
44879    # Oops. Which didn't find the executable.
44880    # The splitting of arguments from the executable at a space might have been incorrect,
44881    # since paths with space are more likely in Windows. Give it another try with the whole
44882    # argument.
44883    path="$complete"
44884    arguments="EOL"
44885    new_path="$path"
44886
44887  windows_path="$new_path"
44888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44889    unix_path=`$CYGPATH -u "$windows_path"`
44890    new_path="$unix_path"
44891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44893    new_path="$unix_path"
44894  fi
44895
44896
44897    new_path=`$WHICH "$new_path" 2> /dev/null`
44898    # bat and cmd files are not always considered executable in MSYS causing which
44899    # to not find them
44900    if test "x$new_path" = x \
44901        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44902        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44903      new_path="$path"
44904
44905  windows_path="$new_path"
44906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44907    unix_path=`$CYGPATH -u "$windows_path"`
44908    new_path="$unix_path"
44909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44911    new_path="$unix_path"
44912  fi
44913
44914    fi
44915
44916    if test "x$new_path" = x; then
44917      # It's still not found. Now this is an unrecoverable error.
44918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44919$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44920      has_space=`$ECHO "$complete" | $GREP " "`
44921      if test "x$has_space" != x; then
44922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44924      fi
44925      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44926    fi
44927  fi
44928
44929  # Now new_path has a complete unix path to the binary
44930  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44931    # Keep paths in /bin as-is, but remove trailing .exe if any
44932    new_path="${new_path/%.exe/}"
44933    # Do not save /bin paths to all_fixpath_prefixes!
44934  else
44935    # Not in mixed or Windows style, start by that.
44936    new_path=`cmd //c echo $new_path`
44937
44938  input_path="$new_path"
44939  # Check if we need to convert this using DOS-style short mode. If the path
44940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44941  # take no chances and rewrite it.
44942  # Note: m4 eats our [], so we need to use [ and ] instead.
44943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44944  if test "x$has_forbidden_chars" != x; then
44945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44947  fi
44948
44949    # Output is in $new_path
44950
44951  windows_path="$new_path"
44952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44953    unix_path=`$CYGPATH -u "$windows_path"`
44954    new_path="$unix_path"
44955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44957    new_path="$unix_path"
44958  fi
44959
44960    # remove trailing .exe if any
44961    new_path="${new_path/%.exe/}"
44962
44963    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44964    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44965  fi
44966
44967    else
44968      # We're on a unix platform. Hooray! :)
44969      # First separate the path from the arguments. This will split at the first
44970      # space.
44971      complete="$BUILD_CXX"
44972      path="${complete%% *}"
44973      tmp="$complete EOL"
44974      arguments="${tmp#* }"
44975
44976      # Cannot rely on the command "which" here since it doesn't always work.
44977      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44978      if test -z "$is_absolute_path"; then
44979        # Path to executable is not absolute. Find it.
44980        IFS_save="$IFS"
44981        IFS=:
44982        for p in $PATH; do
44983          if test -f "$p/$path" && test -x "$p/$path"; then
44984            new_path="$p/$path"
44985            break
44986          fi
44987        done
44988        IFS="$IFS_save"
44989      else
44990        # This is an absolute path, we can use it without further modifications.
44991        new_path="$path"
44992      fi
44993
44994      if test "x$new_path" = x; then
44995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44996$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44997        has_space=`$ECHO "$complete" | $GREP " "`
44998        if test "x$has_space" != x; then
44999          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45000$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45001        fi
45002        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45003      fi
45004    fi
45005
45006    # Now join together the path and the arguments once again
45007    if test "x$arguments" != xEOL; then
45008      new_complete="$new_path ${arguments% *}"
45009    else
45010      new_complete="$new_path"
45011    fi
45012
45013    if test "x$complete" != "x$new_complete"; then
45014      BUILD_CXX="$new_complete"
45015      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45016$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45017    fi
45018  fi
45019
45020
45021
45022  # Publish this variable in the help.
45023
45024
45025  if [ -z "${BUILD_NM+x}" ]; then
45026    # The variable is not set by user, try to locate tool using the code snippet
45027    for ac_prog in nm gcc-nm
45028do
45029  # Extract the first word of "$ac_prog", so it can be a program name with args.
45030set dummy $ac_prog; ac_word=$2
45031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45032$as_echo_n "checking for $ac_word... " >&6; }
45033if ${ac_cv_path_BUILD_NM+:} false; then :
45034  $as_echo_n "(cached) " >&6
45035else
45036  case $BUILD_NM in
45037  [\\/]* | ?:[\\/]*)
45038  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45039  ;;
45040  *)
45041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45042for as_dir in $PATH
45043do
45044  IFS=$as_save_IFS
45045  test -z "$as_dir" && as_dir=.
45046    for ac_exec_ext in '' $ac_executable_extensions; do
45047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45048    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45050    break 2
45051  fi
45052done
45053  done
45054IFS=$as_save_IFS
45055
45056  ;;
45057esac
45058fi
45059BUILD_NM=$ac_cv_path_BUILD_NM
45060if test -n "$BUILD_NM"; then
45061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45062$as_echo "$BUILD_NM" >&6; }
45063else
45064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45065$as_echo "no" >&6; }
45066fi
45067
45068
45069  test -n "$BUILD_NM" && break
45070done
45071
45072  else
45073    # The variable is set, but is it from the command line or the environment?
45074
45075    # Try to remove the string !BUILD_NM! from our list.
45076    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45077    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45078      # If it failed, the variable was not from the command line. Ignore it,
45079      # but warn the user (except for BASH, which is always set by the calling BASH).
45080      if test "xBUILD_NM" != xBASH; then
45081        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45082$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45083      fi
45084      # Try to locate tool using the code snippet
45085      for ac_prog in nm gcc-nm
45086do
45087  # Extract the first word of "$ac_prog", so it can be a program name with args.
45088set dummy $ac_prog; ac_word=$2
45089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45090$as_echo_n "checking for $ac_word... " >&6; }
45091if ${ac_cv_path_BUILD_NM+:} false; then :
45092  $as_echo_n "(cached) " >&6
45093else
45094  case $BUILD_NM in
45095  [\\/]* | ?:[\\/]*)
45096  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45097  ;;
45098  *)
45099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45100for as_dir in $PATH
45101do
45102  IFS=$as_save_IFS
45103  test -z "$as_dir" && as_dir=.
45104    for ac_exec_ext in '' $ac_executable_extensions; do
45105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45106    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45108    break 2
45109  fi
45110done
45111  done
45112IFS=$as_save_IFS
45113
45114  ;;
45115esac
45116fi
45117BUILD_NM=$ac_cv_path_BUILD_NM
45118if test -n "$BUILD_NM"; then
45119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45120$as_echo "$BUILD_NM" >&6; }
45121else
45122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45123$as_echo "no" >&6; }
45124fi
45125
45126
45127  test -n "$BUILD_NM" && break
45128done
45129
45130    else
45131      # If it succeeded, then it was overridden by the user. We will use it
45132      # for the tool.
45133
45134      # First remove it from the list of overridden variables, so we can test
45135      # for unknown variables in the end.
45136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45137
45138      # Check if we try to supply an empty value
45139      if test "x$BUILD_NM" = x; then
45140        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45141$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45142        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45143$as_echo_n "checking for BUILD_NM... " >&6; }
45144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45145$as_echo "disabled" >&6; }
45146      else
45147        # Check if the provided tool contains a complete path.
45148        tool_specified="$BUILD_NM"
45149        tool_basename="${tool_specified##*/}"
45150        if test "x$tool_basename" = "x$tool_specified"; then
45151          # A command without a complete path is provided, search $PATH.
45152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45153$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45154          # Extract the first word of "$tool_basename", so it can be a program name with args.
45155set dummy $tool_basename; ac_word=$2
45156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45157$as_echo_n "checking for $ac_word... " >&6; }
45158if ${ac_cv_path_BUILD_NM+:} false; then :
45159  $as_echo_n "(cached) " >&6
45160else
45161  case $BUILD_NM in
45162  [\\/]* | ?:[\\/]*)
45163  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45164  ;;
45165  *)
45166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45167for as_dir in $PATH
45168do
45169  IFS=$as_save_IFS
45170  test -z "$as_dir" && as_dir=.
45171    for ac_exec_ext in '' $ac_executable_extensions; do
45172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45173    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45175    break 2
45176  fi
45177done
45178  done
45179IFS=$as_save_IFS
45180
45181  ;;
45182esac
45183fi
45184BUILD_NM=$ac_cv_path_BUILD_NM
45185if test -n "$BUILD_NM"; then
45186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45187$as_echo "$BUILD_NM" >&6; }
45188else
45189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45190$as_echo "no" >&6; }
45191fi
45192
45193
45194          if test "x$BUILD_NM" = x; then
45195            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45196          fi
45197        else
45198          # Otherwise we believe it is a complete path. Use it as it is.
45199          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45200$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45201          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45202$as_echo_n "checking for BUILD_NM... " >&6; }
45203          if test ! -x "$tool_specified"; then
45204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45205$as_echo "not found" >&6; }
45206            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45207          fi
45208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45209$as_echo "$tool_specified" >&6; }
45210        fi
45211      fi
45212    fi
45213
45214  fi
45215
45216
45217
45218  # Only process if variable expands to non-empty
45219
45220  if test "x$BUILD_NM" != x; then
45221    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45222
45223  # First separate the path from the arguments. This will split at the first
45224  # space.
45225  complete="$BUILD_NM"
45226  path="${complete%% *}"
45227  tmp="$complete EOL"
45228  arguments="${tmp#* }"
45229
45230  # Input might be given as Windows format, start by converting to
45231  # unix format.
45232  new_path=`$CYGPATH -u "$path"`
45233
45234  # Now try to locate executable using which
45235  new_path=`$WHICH "$new_path" 2> /dev/null`
45236  # bat and cmd files are not always considered executable in cygwin causing which
45237  # to not find them
45238  if test "x$new_path" = x \
45239      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45240      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45241    new_path=`$CYGPATH -u "$path"`
45242  fi
45243  if test "x$new_path" = x; then
45244    # Oops. Which didn't find the executable.
45245    # The splitting of arguments from the executable at a space might have been incorrect,
45246    # since paths with space are more likely in Windows. Give it another try with the whole
45247    # argument.
45248    path="$complete"
45249    arguments="EOL"
45250    new_path=`$CYGPATH -u "$path"`
45251    new_path=`$WHICH "$new_path" 2> /dev/null`
45252    # bat and cmd files are not always considered executable in cygwin causing which
45253    # to not find them
45254    if test "x$new_path" = x \
45255        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45256        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45257      new_path=`$CYGPATH -u "$path"`
45258    fi
45259    if test "x$new_path" = x; then
45260      # It's still not found. Now this is an unrecoverable error.
45261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45262$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45263      has_space=`$ECHO "$complete" | $GREP " "`
45264      if test "x$has_space" != x; then
45265        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45266$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45267      fi
45268      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45269    fi
45270  fi
45271
45272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45275  # "foo.exe" is OK but "foo" is an error.
45276  #
45277  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45278  # It is also a way to make sure we got the proper file name for the real test later on.
45279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45280  if test "x$test_shortpath" = x; then
45281    # Short path failed, file does not exist as specified.
45282    # Try adding .exe or .cmd
45283    if test -f "${new_path}.exe"; then
45284      input_to_shortpath="${new_path}.exe"
45285    elif test -f "${new_path}.cmd"; then
45286      input_to_shortpath="${new_path}.cmd"
45287    else
45288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45289$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45290      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45291$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45292      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45293    fi
45294  else
45295    input_to_shortpath="$new_path"
45296  fi
45297
45298  # Call helper function which possibly converts this using DOS-style short mode.
45299  # If so, the updated path is stored in $new_path.
45300  new_path="$input_to_shortpath"
45301
45302  input_path="$input_to_shortpath"
45303  # Check if we need to convert this using DOS-style short mode. If the path
45304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45305  # take no chances and rewrite it.
45306  # Note: m4 eats our [], so we need to use [ and ] instead.
45307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45308  if test "x$has_forbidden_chars" != x; then
45309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45313      # Going to short mode and back again did indeed matter. Since short mode is
45314      # case insensitive, let's make it lowercase to improve readability.
45315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45316      # Now convert it back to Unix-style (cygpath)
45317      input_path=`$CYGPATH -u "$shortmode_path"`
45318      new_path="$input_path"
45319    fi
45320  fi
45321
45322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45323  if test "x$test_cygdrive_prefix" = x; then
45324    # As a simple fix, exclude /usr/bin since it's not a real path.
45325    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45327      # a path prefixed by /cygdrive for fixpath to work.
45328      new_path="$CYGWIN_ROOT_PATH$input_path"
45329    fi
45330  fi
45331
45332  # remove trailing .exe if any
45333  new_path="${new_path/%.exe/}"
45334
45335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45336
45337  # First separate the path from the arguments. This will split at the first
45338  # space.
45339  complete="$BUILD_NM"
45340  path="${complete%% *}"
45341  tmp="$complete EOL"
45342  arguments="${tmp#* }"
45343
45344  # Input might be given as Windows format, start by converting to
45345  # unix format.
45346  new_path="$path"
45347
45348  windows_path="$new_path"
45349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45350    unix_path=`$CYGPATH -u "$windows_path"`
45351    new_path="$unix_path"
45352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45354    new_path="$unix_path"
45355  fi
45356
45357
45358  # Now try to locate executable using which
45359  new_path=`$WHICH "$new_path" 2> /dev/null`
45360
45361  if test "x$new_path" = x; then
45362    # Oops. Which didn't find the executable.
45363    # The splitting of arguments from the executable at a space might have been incorrect,
45364    # since paths with space are more likely in Windows. Give it another try with the whole
45365    # argument.
45366    path="$complete"
45367    arguments="EOL"
45368    new_path="$path"
45369
45370  windows_path="$new_path"
45371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45372    unix_path=`$CYGPATH -u "$windows_path"`
45373    new_path="$unix_path"
45374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45376    new_path="$unix_path"
45377  fi
45378
45379
45380    new_path=`$WHICH "$new_path" 2> /dev/null`
45381    # bat and cmd files are not always considered executable in MSYS causing which
45382    # to not find them
45383    if test "x$new_path" = x \
45384        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45385        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45386      new_path="$path"
45387
45388  windows_path="$new_path"
45389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45390    unix_path=`$CYGPATH -u "$windows_path"`
45391    new_path="$unix_path"
45392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45394    new_path="$unix_path"
45395  fi
45396
45397    fi
45398
45399    if test "x$new_path" = x; then
45400      # It's still not found. Now this is an unrecoverable error.
45401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45402$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45403      has_space=`$ECHO "$complete" | $GREP " "`
45404      if test "x$has_space" != x; then
45405        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45406$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45407      fi
45408      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45409    fi
45410  fi
45411
45412  # Now new_path has a complete unix path to the binary
45413  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45414    # Keep paths in /bin as-is, but remove trailing .exe if any
45415    new_path="${new_path/%.exe/}"
45416    # Do not save /bin paths to all_fixpath_prefixes!
45417  else
45418    # Not in mixed or Windows style, start by that.
45419    new_path=`cmd //c echo $new_path`
45420
45421  input_path="$new_path"
45422  # Check if we need to convert this using DOS-style short mode. If the path
45423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45424  # take no chances and rewrite it.
45425  # Note: m4 eats our [], so we need to use [ and ] instead.
45426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45427  if test "x$has_forbidden_chars" != x; then
45428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45430  fi
45431
45432    # Output is in $new_path
45433
45434  windows_path="$new_path"
45435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45436    unix_path=`$CYGPATH -u "$windows_path"`
45437    new_path="$unix_path"
45438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45440    new_path="$unix_path"
45441  fi
45442
45443    # remove trailing .exe if any
45444    new_path="${new_path/%.exe/}"
45445
45446    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45447    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45448  fi
45449
45450    else
45451      # We're on a unix platform. Hooray! :)
45452      # First separate the path from the arguments. This will split at the first
45453      # space.
45454      complete="$BUILD_NM"
45455      path="${complete%% *}"
45456      tmp="$complete EOL"
45457      arguments="${tmp#* }"
45458
45459      # Cannot rely on the command "which" here since it doesn't always work.
45460      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45461      if test -z "$is_absolute_path"; then
45462        # Path to executable is not absolute. Find it.
45463        IFS_save="$IFS"
45464        IFS=:
45465        for p in $PATH; do
45466          if test -f "$p/$path" && test -x "$p/$path"; then
45467            new_path="$p/$path"
45468            break
45469          fi
45470        done
45471        IFS="$IFS_save"
45472      else
45473        # This is an absolute path, we can use it without further modifications.
45474        new_path="$path"
45475      fi
45476
45477      if test "x$new_path" = x; then
45478        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45479$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45480        has_space=`$ECHO "$complete" | $GREP " "`
45481        if test "x$has_space" != x; then
45482          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45483$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45484        fi
45485        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45486      fi
45487    fi
45488
45489    # Now join together the path and the arguments once again
45490    if test "x$arguments" != xEOL; then
45491      new_complete="$new_path ${arguments% *}"
45492    else
45493      new_complete="$new_path"
45494    fi
45495
45496    if test "x$complete" != "x$new_complete"; then
45497      BUILD_NM="$new_complete"
45498      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45499$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45500    fi
45501  fi
45502
45503
45504
45505  # Publish this variable in the help.
45506
45507
45508  if [ -z "${BUILD_AR+x}" ]; then
45509    # The variable is not set by user, try to locate tool using the code snippet
45510    for ac_prog in ar gcc-ar
45511do
45512  # Extract the first word of "$ac_prog", so it can be a program name with args.
45513set dummy $ac_prog; ac_word=$2
45514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45515$as_echo_n "checking for $ac_word... " >&6; }
45516if ${ac_cv_path_BUILD_AR+:} false; then :
45517  $as_echo_n "(cached) " >&6
45518else
45519  case $BUILD_AR in
45520  [\\/]* | ?:[\\/]*)
45521  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45522  ;;
45523  *)
45524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45525for as_dir in $PATH
45526do
45527  IFS=$as_save_IFS
45528  test -z "$as_dir" && as_dir=.
45529    for ac_exec_ext in '' $ac_executable_extensions; do
45530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45531    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45533    break 2
45534  fi
45535done
45536  done
45537IFS=$as_save_IFS
45538
45539  ;;
45540esac
45541fi
45542BUILD_AR=$ac_cv_path_BUILD_AR
45543if test -n "$BUILD_AR"; then
45544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45545$as_echo "$BUILD_AR" >&6; }
45546else
45547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45548$as_echo "no" >&6; }
45549fi
45550
45551
45552  test -n "$BUILD_AR" && break
45553done
45554
45555  else
45556    # The variable is set, but is it from the command line or the environment?
45557
45558    # Try to remove the string !BUILD_AR! from our list.
45559    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45560    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45561      # If it failed, the variable was not from the command line. Ignore it,
45562      # but warn the user (except for BASH, which is always set by the calling BASH).
45563      if test "xBUILD_AR" != xBASH; then
45564        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45565$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45566      fi
45567      # Try to locate tool using the code snippet
45568      for ac_prog in ar gcc-ar
45569do
45570  # Extract the first word of "$ac_prog", so it can be a program name with args.
45571set dummy $ac_prog; ac_word=$2
45572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45573$as_echo_n "checking for $ac_word... " >&6; }
45574if ${ac_cv_path_BUILD_AR+:} false; then :
45575  $as_echo_n "(cached) " >&6
45576else
45577  case $BUILD_AR in
45578  [\\/]* | ?:[\\/]*)
45579  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45580  ;;
45581  *)
45582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45583for as_dir in $PATH
45584do
45585  IFS=$as_save_IFS
45586  test -z "$as_dir" && as_dir=.
45587    for ac_exec_ext in '' $ac_executable_extensions; do
45588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45589    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45591    break 2
45592  fi
45593done
45594  done
45595IFS=$as_save_IFS
45596
45597  ;;
45598esac
45599fi
45600BUILD_AR=$ac_cv_path_BUILD_AR
45601if test -n "$BUILD_AR"; then
45602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45603$as_echo "$BUILD_AR" >&6; }
45604else
45605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45606$as_echo "no" >&6; }
45607fi
45608
45609
45610  test -n "$BUILD_AR" && break
45611done
45612
45613    else
45614      # If it succeeded, then it was overridden by the user. We will use it
45615      # for the tool.
45616
45617      # First remove it from the list of overridden variables, so we can test
45618      # for unknown variables in the end.
45619      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45620
45621      # Check if we try to supply an empty value
45622      if test "x$BUILD_AR" = x; then
45623        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45624$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45626$as_echo_n "checking for BUILD_AR... " >&6; }
45627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45628$as_echo "disabled" >&6; }
45629      else
45630        # Check if the provided tool contains a complete path.
45631        tool_specified="$BUILD_AR"
45632        tool_basename="${tool_specified##*/}"
45633        if test "x$tool_basename" = "x$tool_specified"; then
45634          # A command without a complete path is provided, search $PATH.
45635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45636$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45637          # Extract the first word of "$tool_basename", so it can be a program name with args.
45638set dummy $tool_basename; ac_word=$2
45639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45640$as_echo_n "checking for $ac_word... " >&6; }
45641if ${ac_cv_path_BUILD_AR+:} false; then :
45642  $as_echo_n "(cached) " >&6
45643else
45644  case $BUILD_AR in
45645  [\\/]* | ?:[\\/]*)
45646  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45647  ;;
45648  *)
45649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45650for as_dir in $PATH
45651do
45652  IFS=$as_save_IFS
45653  test -z "$as_dir" && as_dir=.
45654    for ac_exec_ext in '' $ac_executable_extensions; do
45655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45656    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45658    break 2
45659  fi
45660done
45661  done
45662IFS=$as_save_IFS
45663
45664  ;;
45665esac
45666fi
45667BUILD_AR=$ac_cv_path_BUILD_AR
45668if test -n "$BUILD_AR"; then
45669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45670$as_echo "$BUILD_AR" >&6; }
45671else
45672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45673$as_echo "no" >&6; }
45674fi
45675
45676
45677          if test "x$BUILD_AR" = x; then
45678            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45679          fi
45680        else
45681          # Otherwise we believe it is a complete path. Use it as it is.
45682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45683$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45684          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45685$as_echo_n "checking for BUILD_AR... " >&6; }
45686          if test ! -x "$tool_specified"; then
45687            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45688$as_echo "not found" >&6; }
45689            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45690          fi
45691          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45692$as_echo "$tool_specified" >&6; }
45693        fi
45694      fi
45695    fi
45696
45697  fi
45698
45699
45700
45701  # Only process if variable expands to non-empty
45702
45703  if test "x$BUILD_AR" != x; then
45704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45705
45706  # First separate the path from the arguments. This will split at the first
45707  # space.
45708  complete="$BUILD_AR"
45709  path="${complete%% *}"
45710  tmp="$complete EOL"
45711  arguments="${tmp#* }"
45712
45713  # Input might be given as Windows format, start by converting to
45714  # unix format.
45715  new_path=`$CYGPATH -u "$path"`
45716
45717  # Now try to locate executable using which
45718  new_path=`$WHICH "$new_path" 2> /dev/null`
45719  # bat and cmd files are not always considered executable in cygwin causing which
45720  # to not find them
45721  if test "x$new_path" = x \
45722      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45723      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45724    new_path=`$CYGPATH -u "$path"`
45725  fi
45726  if test "x$new_path" = x; then
45727    # Oops. Which didn't find the executable.
45728    # The splitting of arguments from the executable at a space might have been incorrect,
45729    # since paths with space are more likely in Windows. Give it another try with the whole
45730    # argument.
45731    path="$complete"
45732    arguments="EOL"
45733    new_path=`$CYGPATH -u "$path"`
45734    new_path=`$WHICH "$new_path" 2> /dev/null`
45735    # bat and cmd files are not always considered executable in cygwin causing which
45736    # to not find them
45737    if test "x$new_path" = x \
45738        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45739        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45740      new_path=`$CYGPATH -u "$path"`
45741    fi
45742    if test "x$new_path" = x; then
45743      # It's still not found. Now this is an unrecoverable error.
45744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45745$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45746      has_space=`$ECHO "$complete" | $GREP " "`
45747      if test "x$has_space" != x; then
45748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45750      fi
45751      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45752    fi
45753  fi
45754
45755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45758  # "foo.exe" is OK but "foo" is an error.
45759  #
45760  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45761  # It is also a way to make sure we got the proper file name for the real test later on.
45762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45763  if test "x$test_shortpath" = x; then
45764    # Short path failed, file does not exist as specified.
45765    # Try adding .exe or .cmd
45766    if test -f "${new_path}.exe"; then
45767      input_to_shortpath="${new_path}.exe"
45768    elif test -f "${new_path}.cmd"; then
45769      input_to_shortpath="${new_path}.cmd"
45770    else
45771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45772$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45773      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45774$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45775      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45776    fi
45777  else
45778    input_to_shortpath="$new_path"
45779  fi
45780
45781  # Call helper function which possibly converts this using DOS-style short mode.
45782  # If so, the updated path is stored in $new_path.
45783  new_path="$input_to_shortpath"
45784
45785  input_path="$input_to_shortpath"
45786  # Check if we need to convert this using DOS-style short mode. If the path
45787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45788  # take no chances and rewrite it.
45789  # Note: m4 eats our [], so we need to use [ and ] instead.
45790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45791  if test "x$has_forbidden_chars" != x; then
45792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45796      # Going to short mode and back again did indeed matter. Since short mode is
45797      # case insensitive, let's make it lowercase to improve readability.
45798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45799      # Now convert it back to Unix-style (cygpath)
45800      input_path=`$CYGPATH -u "$shortmode_path"`
45801      new_path="$input_path"
45802    fi
45803  fi
45804
45805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45806  if test "x$test_cygdrive_prefix" = x; then
45807    # As a simple fix, exclude /usr/bin since it's not a real path.
45808    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45810      # a path prefixed by /cygdrive for fixpath to work.
45811      new_path="$CYGWIN_ROOT_PATH$input_path"
45812    fi
45813  fi
45814
45815  # remove trailing .exe if any
45816  new_path="${new_path/%.exe/}"
45817
45818    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45819
45820  # First separate the path from the arguments. This will split at the first
45821  # space.
45822  complete="$BUILD_AR"
45823  path="${complete%% *}"
45824  tmp="$complete EOL"
45825  arguments="${tmp#* }"
45826
45827  # Input might be given as Windows format, start by converting to
45828  # unix format.
45829  new_path="$path"
45830
45831  windows_path="$new_path"
45832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45833    unix_path=`$CYGPATH -u "$windows_path"`
45834    new_path="$unix_path"
45835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45837    new_path="$unix_path"
45838  fi
45839
45840
45841  # Now try to locate executable using which
45842  new_path=`$WHICH "$new_path" 2> /dev/null`
45843
45844  if test "x$new_path" = x; then
45845    # Oops. Which didn't find the executable.
45846    # The splitting of arguments from the executable at a space might have been incorrect,
45847    # since paths with space are more likely in Windows. Give it another try with the whole
45848    # argument.
45849    path="$complete"
45850    arguments="EOL"
45851    new_path="$path"
45852
45853  windows_path="$new_path"
45854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45855    unix_path=`$CYGPATH -u "$windows_path"`
45856    new_path="$unix_path"
45857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45859    new_path="$unix_path"
45860  fi
45861
45862
45863    new_path=`$WHICH "$new_path" 2> /dev/null`
45864    # bat and cmd files are not always considered executable in MSYS causing which
45865    # to not find them
45866    if test "x$new_path" = x \
45867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45869      new_path="$path"
45870
45871  windows_path="$new_path"
45872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45873    unix_path=`$CYGPATH -u "$windows_path"`
45874    new_path="$unix_path"
45875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45877    new_path="$unix_path"
45878  fi
45879
45880    fi
45881
45882    if test "x$new_path" = x; then
45883      # It's still not found. Now this is an unrecoverable error.
45884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45885$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45886      has_space=`$ECHO "$complete" | $GREP " "`
45887      if test "x$has_space" != x; then
45888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45890      fi
45891      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45892    fi
45893  fi
45894
45895  # Now new_path has a complete unix path to the binary
45896  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45897    # Keep paths in /bin as-is, but remove trailing .exe if any
45898    new_path="${new_path/%.exe/}"
45899    # Do not save /bin paths to all_fixpath_prefixes!
45900  else
45901    # Not in mixed or Windows style, start by that.
45902    new_path=`cmd //c echo $new_path`
45903
45904  input_path="$new_path"
45905  # Check if we need to convert this using DOS-style short mode. If the path
45906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45907  # take no chances and rewrite it.
45908  # Note: m4 eats our [], so we need to use [ and ] instead.
45909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45910  if test "x$has_forbidden_chars" != x; then
45911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45913  fi
45914
45915    # Output is in $new_path
45916
45917  windows_path="$new_path"
45918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45919    unix_path=`$CYGPATH -u "$windows_path"`
45920    new_path="$unix_path"
45921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45923    new_path="$unix_path"
45924  fi
45925
45926    # remove trailing .exe if any
45927    new_path="${new_path/%.exe/}"
45928
45929    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45930    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45931  fi
45932
45933    else
45934      # We're on a unix platform. Hooray! :)
45935      # First separate the path from the arguments. This will split at the first
45936      # space.
45937      complete="$BUILD_AR"
45938      path="${complete%% *}"
45939      tmp="$complete EOL"
45940      arguments="${tmp#* }"
45941
45942      # Cannot rely on the command "which" here since it doesn't always work.
45943      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45944      if test -z "$is_absolute_path"; then
45945        # Path to executable is not absolute. Find it.
45946        IFS_save="$IFS"
45947        IFS=:
45948        for p in $PATH; do
45949          if test -f "$p/$path" && test -x "$p/$path"; then
45950            new_path="$p/$path"
45951            break
45952          fi
45953        done
45954        IFS="$IFS_save"
45955      else
45956        # This is an absolute path, we can use it without further modifications.
45957        new_path="$path"
45958      fi
45959
45960      if test "x$new_path" = x; then
45961        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45962$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45963        has_space=`$ECHO "$complete" | $GREP " "`
45964        if test "x$has_space" != x; then
45965          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45966$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45967        fi
45968        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45969      fi
45970    fi
45971
45972    # Now join together the path and the arguments once again
45973    if test "x$arguments" != xEOL; then
45974      new_complete="$new_path ${arguments% *}"
45975    else
45976      new_complete="$new_path"
45977    fi
45978
45979    if test "x$complete" != "x$new_complete"; then
45980      BUILD_AR="$new_complete"
45981      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45982$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45983    fi
45984  fi
45985
45986
45987
45988  # Publish this variable in the help.
45989
45990
45991  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45992    # The variable is not set by user, try to locate tool using the code snippet
45993    for ac_prog in objcopy
45994do
45995  # Extract the first word of "$ac_prog", so it can be a program name with args.
45996set dummy $ac_prog; ac_word=$2
45997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45998$as_echo_n "checking for $ac_word... " >&6; }
45999if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46000  $as_echo_n "(cached) " >&6
46001else
46002  case $BUILD_OBJCOPY in
46003  [\\/]* | ?:[\\/]*)
46004  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46005  ;;
46006  *)
46007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46008for as_dir in $PATH
46009do
46010  IFS=$as_save_IFS
46011  test -z "$as_dir" && as_dir=.
46012    for ac_exec_ext in '' $ac_executable_extensions; do
46013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46014    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46016    break 2
46017  fi
46018done
46019  done
46020IFS=$as_save_IFS
46021
46022  ;;
46023esac
46024fi
46025BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46026if test -n "$BUILD_OBJCOPY"; then
46027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46028$as_echo "$BUILD_OBJCOPY" >&6; }
46029else
46030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46031$as_echo "no" >&6; }
46032fi
46033
46034
46035  test -n "$BUILD_OBJCOPY" && break
46036done
46037
46038  else
46039    # The variable is set, but is it from the command line or the environment?
46040
46041    # Try to remove the string !BUILD_OBJCOPY! from our list.
46042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46044      # If it failed, the variable was not from the command line. Ignore it,
46045      # but warn the user (except for BASH, which is always set by the calling BASH).
46046      if test "xBUILD_OBJCOPY" != xBASH; then
46047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46048$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46049      fi
46050      # Try to locate tool using the code snippet
46051      for ac_prog in objcopy
46052do
46053  # Extract the first word of "$ac_prog", so it can be a program name with args.
46054set dummy $ac_prog; ac_word=$2
46055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46056$as_echo_n "checking for $ac_word... " >&6; }
46057if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46058  $as_echo_n "(cached) " >&6
46059else
46060  case $BUILD_OBJCOPY in
46061  [\\/]* | ?:[\\/]*)
46062  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46063  ;;
46064  *)
46065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46066for as_dir in $PATH
46067do
46068  IFS=$as_save_IFS
46069  test -z "$as_dir" && as_dir=.
46070    for ac_exec_ext in '' $ac_executable_extensions; do
46071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46072    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46074    break 2
46075  fi
46076done
46077  done
46078IFS=$as_save_IFS
46079
46080  ;;
46081esac
46082fi
46083BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46084if test -n "$BUILD_OBJCOPY"; then
46085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46086$as_echo "$BUILD_OBJCOPY" >&6; }
46087else
46088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46089$as_echo "no" >&6; }
46090fi
46091
46092
46093  test -n "$BUILD_OBJCOPY" && break
46094done
46095
46096    else
46097      # If it succeeded, then it was overridden by the user. We will use it
46098      # for the tool.
46099
46100      # First remove it from the list of overridden variables, so we can test
46101      # for unknown variables in the end.
46102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46103
46104      # Check if we try to supply an empty value
46105      if test "x$BUILD_OBJCOPY" = x; then
46106        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46107$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46108        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46109$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46111$as_echo "disabled" >&6; }
46112      else
46113        # Check if the provided tool contains a complete path.
46114        tool_specified="$BUILD_OBJCOPY"
46115        tool_basename="${tool_specified##*/}"
46116        if test "x$tool_basename" = "x$tool_specified"; then
46117          # A command without a complete path is provided, search $PATH.
46118          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46119$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46120          # Extract the first word of "$tool_basename", so it can be a program name with args.
46121set dummy $tool_basename; ac_word=$2
46122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46123$as_echo_n "checking for $ac_word... " >&6; }
46124if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46125  $as_echo_n "(cached) " >&6
46126else
46127  case $BUILD_OBJCOPY in
46128  [\\/]* | ?:[\\/]*)
46129  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46130  ;;
46131  *)
46132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46133for as_dir in $PATH
46134do
46135  IFS=$as_save_IFS
46136  test -z "$as_dir" && as_dir=.
46137    for ac_exec_ext in '' $ac_executable_extensions; do
46138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46139    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46141    break 2
46142  fi
46143done
46144  done
46145IFS=$as_save_IFS
46146
46147  ;;
46148esac
46149fi
46150BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46151if test -n "$BUILD_OBJCOPY"; then
46152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46153$as_echo "$BUILD_OBJCOPY" >&6; }
46154else
46155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46156$as_echo "no" >&6; }
46157fi
46158
46159
46160          if test "x$BUILD_OBJCOPY" = x; then
46161            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46162          fi
46163        else
46164          # Otherwise we believe it is a complete path. Use it as it is.
46165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46166$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46167          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46168$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46169          if test ! -x "$tool_specified"; then
46170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46171$as_echo "not found" >&6; }
46172            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46173          fi
46174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46175$as_echo "$tool_specified" >&6; }
46176        fi
46177      fi
46178    fi
46179
46180  fi
46181
46182
46183
46184  # Only process if variable expands to non-empty
46185
46186  if test "x$BUILD_OBJCOPY" != x; then
46187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46188
46189  # First separate the path from the arguments. This will split at the first
46190  # space.
46191  complete="$BUILD_OBJCOPY"
46192  path="${complete%% *}"
46193  tmp="$complete EOL"
46194  arguments="${tmp#* }"
46195
46196  # Input might be given as Windows format, start by converting to
46197  # unix format.
46198  new_path=`$CYGPATH -u "$path"`
46199
46200  # Now try to locate executable using which
46201  new_path=`$WHICH "$new_path" 2> /dev/null`
46202  # bat and cmd files are not always considered executable in cygwin causing which
46203  # to not find them
46204  if test "x$new_path" = x \
46205      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46206      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46207    new_path=`$CYGPATH -u "$path"`
46208  fi
46209  if test "x$new_path" = x; then
46210    # Oops. Which didn't find the executable.
46211    # The splitting of arguments from the executable at a space might have been incorrect,
46212    # since paths with space are more likely in Windows. Give it another try with the whole
46213    # argument.
46214    path="$complete"
46215    arguments="EOL"
46216    new_path=`$CYGPATH -u "$path"`
46217    new_path=`$WHICH "$new_path" 2> /dev/null`
46218    # bat and cmd files are not always considered executable in cygwin causing which
46219    # to not find them
46220    if test "x$new_path" = x \
46221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46223      new_path=`$CYGPATH -u "$path"`
46224    fi
46225    if test "x$new_path" = x; then
46226      # It's still not found. Now this is an unrecoverable error.
46227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46228$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46229      has_space=`$ECHO "$complete" | $GREP " "`
46230      if test "x$has_space" != x; then
46231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46233      fi
46234      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46235    fi
46236  fi
46237
46238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46241  # "foo.exe" is OK but "foo" is an error.
46242  #
46243  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46244  # It is also a way to make sure we got the proper file name for the real test later on.
46245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46246  if test "x$test_shortpath" = x; then
46247    # Short path failed, file does not exist as specified.
46248    # Try adding .exe or .cmd
46249    if test -f "${new_path}.exe"; then
46250      input_to_shortpath="${new_path}.exe"
46251    elif test -f "${new_path}.cmd"; then
46252      input_to_shortpath="${new_path}.cmd"
46253    else
46254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46255$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46256      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46257$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46258      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46259    fi
46260  else
46261    input_to_shortpath="$new_path"
46262  fi
46263
46264  # Call helper function which possibly converts this using DOS-style short mode.
46265  # If so, the updated path is stored in $new_path.
46266  new_path="$input_to_shortpath"
46267
46268  input_path="$input_to_shortpath"
46269  # Check if we need to convert this using DOS-style short mode. If the path
46270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46271  # take no chances and rewrite it.
46272  # Note: m4 eats our [], so we need to use [ and ] instead.
46273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46274  if test "x$has_forbidden_chars" != x; then
46275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46279      # Going to short mode and back again did indeed matter. Since short mode is
46280      # case insensitive, let's make it lowercase to improve readability.
46281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46282      # Now convert it back to Unix-style (cygpath)
46283      input_path=`$CYGPATH -u "$shortmode_path"`
46284      new_path="$input_path"
46285    fi
46286  fi
46287
46288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46289  if test "x$test_cygdrive_prefix" = x; then
46290    # As a simple fix, exclude /usr/bin since it's not a real path.
46291    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46293      # a path prefixed by /cygdrive for fixpath to work.
46294      new_path="$CYGWIN_ROOT_PATH$input_path"
46295    fi
46296  fi
46297
46298  # remove trailing .exe if any
46299  new_path="${new_path/%.exe/}"
46300
46301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46302
46303  # First separate the path from the arguments. This will split at the first
46304  # space.
46305  complete="$BUILD_OBJCOPY"
46306  path="${complete%% *}"
46307  tmp="$complete EOL"
46308  arguments="${tmp#* }"
46309
46310  # Input might be given as Windows format, start by converting to
46311  # unix format.
46312  new_path="$path"
46313
46314  windows_path="$new_path"
46315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46316    unix_path=`$CYGPATH -u "$windows_path"`
46317    new_path="$unix_path"
46318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46320    new_path="$unix_path"
46321  fi
46322
46323
46324  # Now try to locate executable using which
46325  new_path=`$WHICH "$new_path" 2> /dev/null`
46326
46327  if test "x$new_path" = x; then
46328    # Oops. Which didn't find the executable.
46329    # The splitting of arguments from the executable at a space might have been incorrect,
46330    # since paths with space are more likely in Windows. Give it another try with the whole
46331    # argument.
46332    path="$complete"
46333    arguments="EOL"
46334    new_path="$path"
46335
46336  windows_path="$new_path"
46337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46338    unix_path=`$CYGPATH -u "$windows_path"`
46339    new_path="$unix_path"
46340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46342    new_path="$unix_path"
46343  fi
46344
46345
46346    new_path=`$WHICH "$new_path" 2> /dev/null`
46347    # bat and cmd files are not always considered executable in MSYS causing which
46348    # to not find them
46349    if test "x$new_path" = x \
46350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46352      new_path="$path"
46353
46354  windows_path="$new_path"
46355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46356    unix_path=`$CYGPATH -u "$windows_path"`
46357    new_path="$unix_path"
46358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46360    new_path="$unix_path"
46361  fi
46362
46363    fi
46364
46365    if test "x$new_path" = x; then
46366      # It's still not found. Now this is an unrecoverable error.
46367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46368$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46369      has_space=`$ECHO "$complete" | $GREP " "`
46370      if test "x$has_space" != x; then
46371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46373      fi
46374      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46375    fi
46376  fi
46377
46378  # Now new_path has a complete unix path to the binary
46379  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46380    # Keep paths in /bin as-is, but remove trailing .exe if any
46381    new_path="${new_path/%.exe/}"
46382    # Do not save /bin paths to all_fixpath_prefixes!
46383  else
46384    # Not in mixed or Windows style, start by that.
46385    new_path=`cmd //c echo $new_path`
46386
46387  input_path="$new_path"
46388  # Check if we need to convert this using DOS-style short mode. If the path
46389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46390  # take no chances and rewrite it.
46391  # Note: m4 eats our [], so we need to use [ and ] instead.
46392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46393  if test "x$has_forbidden_chars" != x; then
46394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46396  fi
46397
46398    # Output is in $new_path
46399
46400  windows_path="$new_path"
46401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46402    unix_path=`$CYGPATH -u "$windows_path"`
46403    new_path="$unix_path"
46404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46406    new_path="$unix_path"
46407  fi
46408
46409    # remove trailing .exe if any
46410    new_path="${new_path/%.exe/}"
46411
46412    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46413    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46414  fi
46415
46416    else
46417      # We're on a unix platform. Hooray! :)
46418      # First separate the path from the arguments. This will split at the first
46419      # space.
46420      complete="$BUILD_OBJCOPY"
46421      path="${complete%% *}"
46422      tmp="$complete EOL"
46423      arguments="${tmp#* }"
46424
46425      # Cannot rely on the command "which" here since it doesn't always work.
46426      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46427      if test -z "$is_absolute_path"; then
46428        # Path to executable is not absolute. Find it.
46429        IFS_save="$IFS"
46430        IFS=:
46431        for p in $PATH; do
46432          if test -f "$p/$path" && test -x "$p/$path"; then
46433            new_path="$p/$path"
46434            break
46435          fi
46436        done
46437        IFS="$IFS_save"
46438      else
46439        # This is an absolute path, we can use it without further modifications.
46440        new_path="$path"
46441      fi
46442
46443      if test "x$new_path" = x; then
46444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46445$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46446        has_space=`$ECHO "$complete" | $GREP " "`
46447        if test "x$has_space" != x; then
46448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46450        fi
46451        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46452      fi
46453    fi
46454
46455    # Now join together the path and the arguments once again
46456    if test "x$arguments" != xEOL; then
46457      new_complete="$new_path ${arguments% *}"
46458    else
46459      new_complete="$new_path"
46460    fi
46461
46462    if test "x$complete" != "x$new_complete"; then
46463      BUILD_OBJCOPY="$new_complete"
46464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46465$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46466    fi
46467  fi
46468
46469
46470
46471  # Publish this variable in the help.
46472
46473
46474  if [ -z "${BUILD_STRIP+x}" ]; then
46475    # The variable is not set by user, try to locate tool using the code snippet
46476    for ac_prog in strip
46477do
46478  # Extract the first word of "$ac_prog", so it can be a program name with args.
46479set dummy $ac_prog; ac_word=$2
46480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46481$as_echo_n "checking for $ac_word... " >&6; }
46482if ${ac_cv_path_BUILD_STRIP+:} false; then :
46483  $as_echo_n "(cached) " >&6
46484else
46485  case $BUILD_STRIP in
46486  [\\/]* | ?:[\\/]*)
46487  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46488  ;;
46489  *)
46490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46491for as_dir in $PATH
46492do
46493  IFS=$as_save_IFS
46494  test -z "$as_dir" && as_dir=.
46495    for ac_exec_ext in '' $ac_executable_extensions; do
46496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46497    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46499    break 2
46500  fi
46501done
46502  done
46503IFS=$as_save_IFS
46504
46505  ;;
46506esac
46507fi
46508BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46509if test -n "$BUILD_STRIP"; then
46510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46511$as_echo "$BUILD_STRIP" >&6; }
46512else
46513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46514$as_echo "no" >&6; }
46515fi
46516
46517
46518  test -n "$BUILD_STRIP" && break
46519done
46520
46521  else
46522    # The variable is set, but is it from the command line or the environment?
46523
46524    # Try to remove the string !BUILD_STRIP! from our list.
46525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46527      # If it failed, the variable was not from the command line. Ignore it,
46528      # but warn the user (except for BASH, which is always set by the calling BASH).
46529      if test "xBUILD_STRIP" != xBASH; then
46530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46531$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46532      fi
46533      # Try to locate tool using the code snippet
46534      for ac_prog in strip
46535do
46536  # Extract the first word of "$ac_prog", so it can be a program name with args.
46537set dummy $ac_prog; ac_word=$2
46538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46539$as_echo_n "checking for $ac_word... " >&6; }
46540if ${ac_cv_path_BUILD_STRIP+:} false; then :
46541  $as_echo_n "(cached) " >&6
46542else
46543  case $BUILD_STRIP in
46544  [\\/]* | ?:[\\/]*)
46545  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46546  ;;
46547  *)
46548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46549for as_dir in $PATH
46550do
46551  IFS=$as_save_IFS
46552  test -z "$as_dir" && as_dir=.
46553    for ac_exec_ext in '' $ac_executable_extensions; do
46554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46555    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46557    break 2
46558  fi
46559done
46560  done
46561IFS=$as_save_IFS
46562
46563  ;;
46564esac
46565fi
46566BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46567if test -n "$BUILD_STRIP"; then
46568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46569$as_echo "$BUILD_STRIP" >&6; }
46570else
46571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46572$as_echo "no" >&6; }
46573fi
46574
46575
46576  test -n "$BUILD_STRIP" && break
46577done
46578
46579    else
46580      # If it succeeded, then it was overridden by the user. We will use it
46581      # for the tool.
46582
46583      # First remove it from the list of overridden variables, so we can test
46584      # for unknown variables in the end.
46585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46586
46587      # Check if we try to supply an empty value
46588      if test "x$BUILD_STRIP" = x; then
46589        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46590$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46592$as_echo_n "checking for BUILD_STRIP... " >&6; }
46593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46594$as_echo "disabled" >&6; }
46595      else
46596        # Check if the provided tool contains a complete path.
46597        tool_specified="$BUILD_STRIP"
46598        tool_basename="${tool_specified##*/}"
46599        if test "x$tool_basename" = "x$tool_specified"; then
46600          # A command without a complete path is provided, search $PATH.
46601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46602$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46603          # Extract the first word of "$tool_basename", so it can be a program name with args.
46604set dummy $tool_basename; ac_word=$2
46605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46606$as_echo_n "checking for $ac_word... " >&6; }
46607if ${ac_cv_path_BUILD_STRIP+:} false; then :
46608  $as_echo_n "(cached) " >&6
46609else
46610  case $BUILD_STRIP in
46611  [\\/]* | ?:[\\/]*)
46612  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46613  ;;
46614  *)
46615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46616for as_dir in $PATH
46617do
46618  IFS=$as_save_IFS
46619  test -z "$as_dir" && as_dir=.
46620    for ac_exec_ext in '' $ac_executable_extensions; do
46621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46622    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46624    break 2
46625  fi
46626done
46627  done
46628IFS=$as_save_IFS
46629
46630  ;;
46631esac
46632fi
46633BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46634if test -n "$BUILD_STRIP"; then
46635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46636$as_echo "$BUILD_STRIP" >&6; }
46637else
46638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46639$as_echo "no" >&6; }
46640fi
46641
46642
46643          if test "x$BUILD_STRIP" = x; then
46644            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46645          fi
46646        else
46647          # Otherwise we believe it is a complete path. Use it as it is.
46648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46649$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46650          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46651$as_echo_n "checking for BUILD_STRIP... " >&6; }
46652          if test ! -x "$tool_specified"; then
46653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46654$as_echo "not found" >&6; }
46655            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46656          fi
46657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46658$as_echo "$tool_specified" >&6; }
46659        fi
46660      fi
46661    fi
46662
46663  fi
46664
46665
46666
46667  # Only process if variable expands to non-empty
46668
46669  if test "x$BUILD_STRIP" != x; then
46670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46671
46672  # First separate the path from the arguments. This will split at the first
46673  # space.
46674  complete="$BUILD_STRIP"
46675  path="${complete%% *}"
46676  tmp="$complete EOL"
46677  arguments="${tmp#* }"
46678
46679  # Input might be given as Windows format, start by converting to
46680  # unix format.
46681  new_path=`$CYGPATH -u "$path"`
46682
46683  # Now try to locate executable using which
46684  new_path=`$WHICH "$new_path" 2> /dev/null`
46685  # bat and cmd files are not always considered executable in cygwin causing which
46686  # to not find them
46687  if test "x$new_path" = x \
46688      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46689      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46690    new_path=`$CYGPATH -u "$path"`
46691  fi
46692  if test "x$new_path" = x; then
46693    # Oops. Which didn't find the executable.
46694    # The splitting of arguments from the executable at a space might have been incorrect,
46695    # since paths with space are more likely in Windows. Give it another try with the whole
46696    # argument.
46697    path="$complete"
46698    arguments="EOL"
46699    new_path=`$CYGPATH -u "$path"`
46700    new_path=`$WHICH "$new_path" 2> /dev/null`
46701    # bat and cmd files are not always considered executable in cygwin causing which
46702    # to not find them
46703    if test "x$new_path" = x \
46704        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46705        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46706      new_path=`$CYGPATH -u "$path"`
46707    fi
46708    if test "x$new_path" = x; then
46709      # It's still not found. Now this is an unrecoverable error.
46710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46711$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46712      has_space=`$ECHO "$complete" | $GREP " "`
46713      if test "x$has_space" != x; then
46714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46716      fi
46717      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46718    fi
46719  fi
46720
46721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46724  # "foo.exe" is OK but "foo" is an error.
46725  #
46726  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46727  # It is also a way to make sure we got the proper file name for the real test later on.
46728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46729  if test "x$test_shortpath" = x; then
46730    # Short path failed, file does not exist as specified.
46731    # Try adding .exe or .cmd
46732    if test -f "${new_path}.exe"; then
46733      input_to_shortpath="${new_path}.exe"
46734    elif test -f "${new_path}.cmd"; then
46735      input_to_shortpath="${new_path}.cmd"
46736    else
46737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46738$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46739      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46740$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46741      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46742    fi
46743  else
46744    input_to_shortpath="$new_path"
46745  fi
46746
46747  # Call helper function which possibly converts this using DOS-style short mode.
46748  # If so, the updated path is stored in $new_path.
46749  new_path="$input_to_shortpath"
46750
46751  input_path="$input_to_shortpath"
46752  # Check if we need to convert this using DOS-style short mode. If the path
46753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46754  # take no chances and rewrite it.
46755  # Note: m4 eats our [], so we need to use [ and ] instead.
46756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46757  if test "x$has_forbidden_chars" != x; then
46758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46762      # Going to short mode and back again did indeed matter. Since short mode is
46763      # case insensitive, let's make it lowercase to improve readability.
46764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46765      # Now convert it back to Unix-style (cygpath)
46766      input_path=`$CYGPATH -u "$shortmode_path"`
46767      new_path="$input_path"
46768    fi
46769  fi
46770
46771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46772  if test "x$test_cygdrive_prefix" = x; then
46773    # As a simple fix, exclude /usr/bin since it's not a real path.
46774    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46776      # a path prefixed by /cygdrive for fixpath to work.
46777      new_path="$CYGWIN_ROOT_PATH$input_path"
46778    fi
46779  fi
46780
46781  # remove trailing .exe if any
46782  new_path="${new_path/%.exe/}"
46783
46784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46785
46786  # First separate the path from the arguments. This will split at the first
46787  # space.
46788  complete="$BUILD_STRIP"
46789  path="${complete%% *}"
46790  tmp="$complete EOL"
46791  arguments="${tmp#* }"
46792
46793  # Input might be given as Windows format, start by converting to
46794  # unix format.
46795  new_path="$path"
46796
46797  windows_path="$new_path"
46798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46799    unix_path=`$CYGPATH -u "$windows_path"`
46800    new_path="$unix_path"
46801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46803    new_path="$unix_path"
46804  fi
46805
46806
46807  # Now try to locate executable using which
46808  new_path=`$WHICH "$new_path" 2> /dev/null`
46809
46810  if test "x$new_path" = x; then
46811    # Oops. Which didn't find the executable.
46812    # The splitting of arguments from the executable at a space might have been incorrect,
46813    # since paths with space are more likely in Windows. Give it another try with the whole
46814    # argument.
46815    path="$complete"
46816    arguments="EOL"
46817    new_path="$path"
46818
46819  windows_path="$new_path"
46820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46821    unix_path=`$CYGPATH -u "$windows_path"`
46822    new_path="$unix_path"
46823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46825    new_path="$unix_path"
46826  fi
46827
46828
46829    new_path=`$WHICH "$new_path" 2> /dev/null`
46830    # bat and cmd files are not always considered executable in MSYS causing which
46831    # to not find them
46832    if test "x$new_path" = x \
46833        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46834        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46835      new_path="$path"
46836
46837  windows_path="$new_path"
46838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46839    unix_path=`$CYGPATH -u "$windows_path"`
46840    new_path="$unix_path"
46841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46843    new_path="$unix_path"
46844  fi
46845
46846    fi
46847
46848    if test "x$new_path" = x; then
46849      # It's still not found. Now this is an unrecoverable error.
46850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46851$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46852      has_space=`$ECHO "$complete" | $GREP " "`
46853      if test "x$has_space" != x; then
46854        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46855$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46856      fi
46857      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46858    fi
46859  fi
46860
46861  # Now new_path has a complete unix path to the binary
46862  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46863    # Keep paths in /bin as-is, but remove trailing .exe if any
46864    new_path="${new_path/%.exe/}"
46865    # Do not save /bin paths to all_fixpath_prefixes!
46866  else
46867    # Not in mixed or Windows style, start by that.
46868    new_path=`cmd //c echo $new_path`
46869
46870  input_path="$new_path"
46871  # Check if we need to convert this using DOS-style short mode. If the path
46872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46873  # take no chances and rewrite it.
46874  # Note: m4 eats our [], so we need to use [ and ] instead.
46875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46876  if test "x$has_forbidden_chars" != x; then
46877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46879  fi
46880
46881    # Output is in $new_path
46882
46883  windows_path="$new_path"
46884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46885    unix_path=`$CYGPATH -u "$windows_path"`
46886    new_path="$unix_path"
46887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46889    new_path="$unix_path"
46890  fi
46891
46892    # remove trailing .exe if any
46893    new_path="${new_path/%.exe/}"
46894
46895    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46896    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46897  fi
46898
46899    else
46900      # We're on a unix platform. Hooray! :)
46901      # First separate the path from the arguments. This will split at the first
46902      # space.
46903      complete="$BUILD_STRIP"
46904      path="${complete%% *}"
46905      tmp="$complete EOL"
46906      arguments="${tmp#* }"
46907
46908      # Cannot rely on the command "which" here since it doesn't always work.
46909      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46910      if test -z "$is_absolute_path"; then
46911        # Path to executable is not absolute. Find it.
46912        IFS_save="$IFS"
46913        IFS=:
46914        for p in $PATH; do
46915          if test -f "$p/$path" && test -x "$p/$path"; then
46916            new_path="$p/$path"
46917            break
46918          fi
46919        done
46920        IFS="$IFS_save"
46921      else
46922        # This is an absolute path, we can use it without further modifications.
46923        new_path="$path"
46924      fi
46925
46926      if test "x$new_path" = x; then
46927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46928$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46929        has_space=`$ECHO "$complete" | $GREP " "`
46930        if test "x$has_space" != x; then
46931          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46932$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46933        fi
46934        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46935      fi
46936    fi
46937
46938    # Now join together the path and the arguments once again
46939    if test "x$arguments" != xEOL; then
46940      new_complete="$new_path ${arguments% *}"
46941    else
46942      new_complete="$new_path"
46943    fi
46944
46945    if test "x$complete" != "x$new_complete"; then
46946      BUILD_STRIP="$new_complete"
46947      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46948$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46949    fi
46950  fi
46951
46952    # Assume the C compiler is the assembler
46953    BUILD_AS="$BUILD_CC -c"
46954    # Just like for the target compiler, use the compiler as linker
46955    BUILD_LD="$BUILD_CC"
46956    BUILD_LDCXX="$BUILD_CXX"
46957
46958    PATH="$OLDPATH"
46959
46960
46961  COMPILER=$BUILD_CC
46962  COMPILER_NAME=BuildC
46963
46964  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46965    # cc -V output typically looks like
46966    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46967    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46968    # Check that this is likely to be the Solaris Studio cc.
46969    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46970    if test $? -ne 0; then
46971      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46972      { $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
46973$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46974      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46975$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46976      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46977$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46978      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46979    fi
46980    # Remove usage instructions (if present), and
46981    # collapse compiler output into a single line
46982    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46983        $SED -e 's/ *[Uu]sage:.*//'`
46984    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46985        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46986  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46987    # xlc -qversion output typically looks like
46988    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46989    #     Version: 11.01.0000.0015
46990    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46991    # Check that this is likely to be the IBM XL C compiler.
46992    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46993    if test $? -ne 0; then
46994      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46995      { $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
46996$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46997      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46998$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46999      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47000$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47001      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47002    fi
47003    # Collapse compiler output into a single line
47004    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47005    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47006        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47007  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47008    # There is no specific version flag, but all output starts with a version string.
47009    # First line typically looks something like:
47010    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47011    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47012    # Check that this is likely to be Microsoft CL.EXE.
47013    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47014    if test $? -ne 0; then
47015      { $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
47016$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47017      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47018$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47019      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47020    fi
47021    # Collapse compiler output into a single line
47022    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47023    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47024        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47025  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47026    # gcc --version output typically looks like
47027    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47028    #     Copyright (C) 2013 Free Software Foundation, Inc.
47029    #     This is free software; see the source for copying conditions.  There is NO
47030    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47031    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47032    # Check that this is likely to be GCC.
47033    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47034    if test $? -ne 0; then
47035      { $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
47036$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47037      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47038$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47039      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47040    fi
47041    # Remove Copyright and legalese from version string, and
47042    # collapse into a single line
47043    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47044        $SED -e 's/ *Copyright .*//'`
47045    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47046        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47047  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47048    # clang --version output typically looks like
47049    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47050    #    clang version 3.3 (tags/RELEASE_33/final)
47051    # or
47052    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47053    #    Target: x86_64-pc-linux-gnu
47054    #    Thread model: posix
47055    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47056    # Check that this is likely to be clang
47057    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47058    if test $? -ne 0; then
47059      { $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
47060$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47061      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47062$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47063      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47064    fi
47065    # Collapse compiler output into a single line
47066    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47067    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47068        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47069  else
47070      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47071  fi
47072  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47073  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47074  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47075  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47076
47077  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47078$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47079
47080
47081  COMPILER=$BUILD_CXX
47082  COMPILER_NAME=BuildC++
47083
47084  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47085    # cc -V output typically looks like
47086    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47087    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47088    # Check that this is likely to be the Solaris Studio cc.
47089    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47090    if test $? -ne 0; then
47091      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47092      { $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
47093$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47094      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47095$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47096      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47097$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47098      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47099    fi
47100    # Remove usage instructions (if present), and
47101    # collapse compiler output into a single line
47102    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47103        $SED -e 's/ *[Uu]sage:.*//'`
47104    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47105        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47106  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47107    # xlc -qversion output typically looks like
47108    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47109    #     Version: 11.01.0000.0015
47110    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47111    # Check that this is likely to be the IBM XL C compiler.
47112    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47113    if test $? -ne 0; then
47114      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47115      { $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
47116$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47117      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47118$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47119      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47120$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47121      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47122    fi
47123    # Collapse compiler output into a single line
47124    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47125    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47126        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47127  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47128    # There is no specific version flag, but all output starts with a version string.
47129    # First line typically looks something like:
47130    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47131    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47132    # Check that this is likely to be Microsoft CL.EXE.
47133    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47134    if test $? -ne 0; then
47135      { $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
47136$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47137      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47138$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47139      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47140    fi
47141    # Collapse compiler output into a single line
47142    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47143    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47144        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47145  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47146    # gcc --version output typically looks like
47147    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47148    #     Copyright (C) 2013 Free Software Foundation, Inc.
47149    #     This is free software; see the source for copying conditions.  There is NO
47150    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47151    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47152    # Check that this is likely to be GCC.
47153    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47154    if test $? -ne 0; then
47155      { $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
47156$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47157      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47158$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47159      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47160    fi
47161    # Remove Copyright and legalese from version string, and
47162    # collapse into a single line
47163    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47164        $SED -e 's/ *Copyright .*//'`
47165    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47166        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47167  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47168    # clang --version output typically looks like
47169    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47170    #    clang version 3.3 (tags/RELEASE_33/final)
47171    # or
47172    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47173    #    Target: x86_64-pc-linux-gnu
47174    #    Thread model: posix
47175    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47176    # Check that this is likely to be clang
47177    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47178    if test $? -ne 0; then
47179      { $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
47180$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47181      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47182$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47183      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47184    fi
47185    # Collapse compiler output into a single line
47186    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47187    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47188        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47189  else
47190      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47191  fi
47192  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47193  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47194  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47195  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47196
47197  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47198$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47199
47200
47201  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47202    { $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
47203$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47204    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47205$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47206  fi
47207
47208  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47209  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47210    { $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
47211$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;}
47212  fi
47213
47214  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47215    { $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
47216$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47217  fi
47218
47219  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47220
47221  else
47222    # If we are not cross compiling, use the normal target compilers for
47223    # building the build platform executables.
47224    BUILD_CC="$CC"
47225    BUILD_CXX="$CXX"
47226    BUILD_LD="$LD"
47227    BUILD_LDCXX="$LDCXX"
47228    BUILD_NM="$NM"
47229    BUILD_AS="$AS"
47230    BUILD_OBJCOPY="$OBJCOPY"
47231    BUILD_STRIP="$STRIP"
47232    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47233    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47234    BUILD_AR="$AR"
47235  fi
47236
47237
47238
47239
47240
47241
47242
47243
47244
47245
47246
47247
47248  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47249    # For hotspot, we need these in Windows mixed path,
47250    # so rewrite them all. Need added .exe suffix.
47251    HOTSPOT_CXX="$CXX.exe"
47252    HOTSPOT_LD="$LD.exe"
47253    HOTSPOT_MT="$MT.exe"
47254    HOTSPOT_RC="$RC.exe"
47255
47256  unix_path="$HOTSPOT_CXX"
47257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47258    windows_path=`$CYGPATH -m "$unix_path"`
47259    HOTSPOT_CXX="$windows_path"
47260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47261    windows_path=`cmd //c echo $unix_path`
47262    HOTSPOT_CXX="$windows_path"
47263  fi
47264
47265
47266  unix_path="$HOTSPOT_LD"
47267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47268    windows_path=`$CYGPATH -m "$unix_path"`
47269    HOTSPOT_LD="$windows_path"
47270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47271    windows_path=`cmd //c echo $unix_path`
47272    HOTSPOT_LD="$windows_path"
47273  fi
47274
47275
47276  unix_path="$HOTSPOT_MT"
47277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47278    windows_path=`$CYGPATH -m "$unix_path"`
47279    HOTSPOT_MT="$windows_path"
47280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47281    windows_path=`cmd //c echo $unix_path`
47282    HOTSPOT_MT="$windows_path"
47283  fi
47284
47285
47286  unix_path="$HOTSPOT_RC"
47287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47288    windows_path=`$CYGPATH -m "$unix_path"`
47289    HOTSPOT_RC="$windows_path"
47290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47291    windows_path=`cmd //c echo $unix_path`
47292    HOTSPOT_RC="$windows_path"
47293  fi
47294
47295
47296
47297  else
47298    HOTSPOT_CXX="$CXX"
47299    HOTSPOT_LD="$LD"
47300  fi
47301
47302
47303
47304  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47305    USE_CLANG=true
47306  fi
47307
47308
47309
47310
47311
47312  # The package path is used only on macosx?
47313  # FIXME: clean this up, and/or move it elsewhere.
47314  PACKAGE_PATH=/opt/local
47315
47316
47317  # Check for extra potential brokenness.
47318  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47319    # On Windows, double-check that we got the right compiler.
47320    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47321    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47322    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47323      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47324        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
47325      fi
47326    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47327      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47328        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47329      fi
47330    fi
47331  fi
47332
47333  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47334    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47335    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47336    # This is later checked when setting flags.
47337
47338    # "-Og" suppported for GCC 4.8 and later
47339    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387    # Execute function body
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436    # Execute function body
47437
47438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47439$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47440  supports=yes
47441
47442  saved_cflags="$CFLAGS"
47443  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47444  ac_ext=c
47445ac_cpp='$CPP $CPPFLAGS'
47446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47448ac_compiler_gnu=$ac_cv_c_compiler_gnu
47449
47450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47451/* end confdefs.h.  */
47452int i;
47453_ACEOF
47454if ac_fn_c_try_compile "$LINENO"; then :
47455
47456else
47457  supports=no
47458fi
47459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47460  ac_ext=cpp
47461ac_cpp='$CXXCPP $CPPFLAGS'
47462ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47463ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47464ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47465
47466  CFLAGS="$saved_cflags"
47467
47468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47469$as_echo "$supports" >&6; }
47470  if test "x$supports" = "xyes" ; then
47471    :
47472    C_COMP_SUPPORTS="yes"
47473  else
47474    :
47475    C_COMP_SUPPORTS="no"
47476  fi
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536    # Execute function body
47537
47538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47539$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47540  supports=yes
47541
47542  saved_cxxflags="$CXXFLAGS"
47543  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47544  ac_ext=cpp
47545ac_cpp='$CXXCPP $CPPFLAGS'
47546ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47547ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47548ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47549
47550  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47551/* end confdefs.h.  */
47552int i;
47553_ACEOF
47554if ac_fn_cxx_try_compile "$LINENO"; then :
47555
47556else
47557  supports=no
47558fi
47559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47560  ac_ext=cpp
47561ac_cpp='$CXXCPP $CPPFLAGS'
47562ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47563ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47564ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47565
47566  CXXFLAGS="$saved_cxxflags"
47567
47568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47569$as_echo "$supports" >&6; }
47570  if test "x$supports" = "xyes" ; then
47571    :
47572    CXX_COMP_SUPPORTS="yes"
47573  else
47574    :
47575    CXX_COMP_SUPPORTS="no"
47576  fi
47577
47578
47579
47580
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47591$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47592  supports=no
47593  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47594
47595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47596$as_echo "$supports" >&6; }
47597  if test "x$supports" = "xyes" ; then
47598    :
47599    HAS_CFLAG_OPTIMIZE_DEBUG=true
47600  else
47601    :
47602    HAS_CFLAG_OPTIMIZE_DEBUG=false
47603  fi
47604
47605
47606
47607
47608
47609
47610
47611    # "-z relro" supported in GNU binutils 2.17 and later
47612    LINKER_RELRO_FLAG="-Wl,-z,relro"
47613
47614
47615
47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660    # Execute function body
47661
47662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47663$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47664  supports=yes
47665
47666  saved_ldflags="$LDFLAGS"
47667  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47668  ac_ext=c
47669ac_cpp='$CPP $CPPFLAGS'
47670ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47671ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47672ac_compiler_gnu=$ac_cv_c_compiler_gnu
47673
47674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47675/* end confdefs.h.  */
47676
47677int
47678main ()
47679{
47680
47681  ;
47682  return 0;
47683}
47684_ACEOF
47685if ac_fn_c_try_link "$LINENO"; then :
47686
47687else
47688  supports=no
47689fi
47690rm -f core conftest.err conftest.$ac_objext \
47691    conftest$ac_exeext conftest.$ac_ext
47692  ac_ext=cpp
47693ac_cpp='$CXXCPP $CPPFLAGS'
47694ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47695ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47696ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47697
47698  LDFLAGS="$saved_ldflags"
47699
47700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47701$as_echo "$supports" >&6; }
47702  if test "x$supports" = "xyes" ; then
47703    :
47704    HAS_LINKER_RELRO=true
47705  else
47706    :
47707    HAS_LINKER_RELRO=false
47708  fi
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722    # "-z now" supported in GNU binutils 2.11 and later
47723    LINKER_NOW_FLAG="-Wl,-z,now"
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771    # Execute function body
47772
47773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47774$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47775  supports=yes
47776
47777  saved_ldflags="$LDFLAGS"
47778  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47779  ac_ext=c
47780ac_cpp='$CPP $CPPFLAGS'
47781ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47782ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47783ac_compiler_gnu=$ac_cv_c_compiler_gnu
47784
47785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47786/* end confdefs.h.  */
47787
47788int
47789main ()
47790{
47791
47792  ;
47793  return 0;
47794}
47795_ACEOF
47796if ac_fn_c_try_link "$LINENO"; then :
47797
47798else
47799  supports=no
47800fi
47801rm -f core conftest.err conftest.$ac_objext \
47802    conftest$ac_exeext conftest.$ac_ext
47803  ac_ext=cpp
47804ac_cpp='$CXXCPP $CPPFLAGS'
47805ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47806ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47807ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47808
47809  LDFLAGS="$saved_ldflags"
47810
47811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47812$as_echo "$supports" >&6; }
47813  if test "x$supports" = "xyes" ; then
47814    :
47815    HAS_LINKER_NOW=true
47816  else
47817    :
47818    HAS_LINKER_NOW=false
47819  fi
47820
47821
47822
47823
47824
47825
47826
47827
47828
47829
47830
47831
47832  fi
47833
47834  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47835  # in executable.'
47836  USING_BROKEN_SUSE_LD=no
47837  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47839$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47840    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47841    $ECHO "int main() { }" > main.c
47842    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47844$as_echo "no" >&6; }
47845      USING_BROKEN_SUSE_LD=no
47846    else
47847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47848$as_echo "yes" >&6; }
47849      USING_BROKEN_SUSE_LD=yes
47850    fi
47851    $RM version-script.map main.c a.out
47852  fi
47853
47854
47855  # Setup hotspot lecagy names for toolchains
47856  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47857  if test "x$TOOLCHAIN_TYPE" = xclang; then
47858    HOTSPOT_TOOLCHAIN_TYPE=gcc
47859  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47860    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47861  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47862    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47863  fi
47864
47865
47866
47867# Setup the JTReg Regression Test Harness.
47868
47869
47870# Check whether --with-jtreg was given.
47871if test "${with_jtreg+set}" = set; then :
47872  withval=$with_jtreg;
47873else
47874  with_jtreg=no
47875fi
47876
47877
47878  if test "x$with_jtreg" = xno; then
47879    # jtreg disabled
47880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47881$as_echo_n "checking for jtreg... " >&6; }
47882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47883$as_echo "no" >&6; }
47884  else
47885    if test "x$with_jtreg" != xyes; then
47886      # with path specified.
47887      JT_HOME="$with_jtreg"
47888    fi
47889
47890    if test "x$JT_HOME" != x; then
47891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47892$as_echo_n "checking for jtreg... " >&6; }
47893
47894      # use JT_HOME enviroment var.
47895
47896  # Only process if variable expands to non-empty
47897
47898  if test "x$JT_HOME" != x; then
47899    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47900
47901  # Input might be given as Windows format, start by converting to
47902  # unix format.
47903  path="$JT_HOME"
47904  new_path=`$CYGPATH -u "$path"`
47905
47906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47909  # "foo.exe" is OK but "foo" is an error.
47910  #
47911  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47912  # It is also a way to make sure we got the proper file name for the real test later on.
47913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47914  if test "x$test_shortpath" = x; then
47915    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47916$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47917    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47918  fi
47919
47920  # Call helper function which possibly converts this using DOS-style short mode.
47921  # If so, the updated path is stored in $new_path.
47922
47923  input_path="$new_path"
47924  # Check if we need to convert this using DOS-style short mode. If the path
47925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47926  # take no chances and rewrite it.
47927  # Note: m4 eats our [], so we need to use [ and ] instead.
47928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47929  if test "x$has_forbidden_chars" != x; then
47930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47934      # Going to short mode and back again did indeed matter. Since short mode is
47935      # case insensitive, let's make it lowercase to improve readability.
47936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47937      # Now convert it back to Unix-style (cygpath)
47938      input_path=`$CYGPATH -u "$shortmode_path"`
47939      new_path="$input_path"
47940    fi
47941  fi
47942
47943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47944  if test "x$test_cygdrive_prefix" = x; then
47945    # As a simple fix, exclude /usr/bin since it's not a real path.
47946    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47948      # a path prefixed by /cygdrive for fixpath to work.
47949      new_path="$CYGWIN_ROOT_PATH$input_path"
47950    fi
47951  fi
47952
47953
47954  if test "x$path" != "x$new_path"; then
47955    JT_HOME="$new_path"
47956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47957$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47958  fi
47959
47960    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47961
47962  path="$JT_HOME"
47963  has_colon=`$ECHO $path | $GREP ^.:`
47964  new_path="$path"
47965  if test "x$has_colon" = x; then
47966    # Not in mixed or Windows style, start by that.
47967    new_path=`cmd //c echo $path`
47968  fi
47969
47970
47971  input_path="$new_path"
47972  # Check if we need to convert this using DOS-style short mode. If the path
47973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47974  # take no chances and rewrite it.
47975  # Note: m4 eats our [], so we need to use [ and ] instead.
47976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47977  if test "x$has_forbidden_chars" != x; then
47978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47980  fi
47981
47982
47983  windows_path="$new_path"
47984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47985    unix_path=`$CYGPATH -u "$windows_path"`
47986    new_path="$unix_path"
47987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47989    new_path="$unix_path"
47990  fi
47991
47992  if test "x$path" != "x$new_path"; then
47993    JT_HOME="$new_path"
47994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47995$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47996  fi
47997
47998  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47999  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48000
48001    else
48002      # We're on a unix platform. Hooray! :)
48003      path="$JT_HOME"
48004      has_space=`$ECHO "$path" | $GREP " "`
48005      if test "x$has_space" != x; then
48006        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48007$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48008        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48009      fi
48010
48011      # Use eval to expand a potential ~
48012      eval path="$path"
48013      if test ! -f "$path" && test ! -d "$path"; then
48014        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48015      fi
48016
48017      if test -d "$path"; then
48018        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48019      else
48020        dir="`$DIRNAME "$path"`"
48021        base="`$BASENAME "$path"`"
48022        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48023      fi
48024    fi
48025  fi
48026
48027
48028      # jtreg win32 script works for everybody
48029      JTREGEXE="$JT_HOME/bin/jtreg"
48030
48031      if test ! -f "$JTREGEXE"; then
48032        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48033      fi
48034
48035      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48036$as_echo "$JTREGEXE" >&6; }
48037    else
48038      # try to find jtreg on path
48039
48040
48041
48042  # Publish this variable in the help.
48043
48044
48045  if [ -z "${JTREGEXE+x}" ]; then
48046    # The variable is not set by user, try to locate tool using the code snippet
48047    for ac_prog in jtreg
48048do
48049  # Extract the first word of "$ac_prog", so it can be a program name with args.
48050set dummy $ac_prog; ac_word=$2
48051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48052$as_echo_n "checking for $ac_word... " >&6; }
48053if ${ac_cv_path_JTREGEXE+:} false; then :
48054  $as_echo_n "(cached) " >&6
48055else
48056  case $JTREGEXE in
48057  [\\/]* | ?:[\\/]*)
48058  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48059  ;;
48060  *)
48061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48062for as_dir in $PATH
48063do
48064  IFS=$as_save_IFS
48065  test -z "$as_dir" && as_dir=.
48066    for ac_exec_ext in '' $ac_executable_extensions; do
48067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48068    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48070    break 2
48071  fi
48072done
48073  done
48074IFS=$as_save_IFS
48075
48076  ;;
48077esac
48078fi
48079JTREGEXE=$ac_cv_path_JTREGEXE
48080if test -n "$JTREGEXE"; then
48081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48082$as_echo "$JTREGEXE" >&6; }
48083else
48084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48085$as_echo "no" >&6; }
48086fi
48087
48088
48089  test -n "$JTREGEXE" && break
48090done
48091
48092  else
48093    # The variable is set, but is it from the command line or the environment?
48094
48095    # Try to remove the string !JTREGEXE! from our list.
48096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48098      # If it failed, the variable was not from the command line. Ignore it,
48099      # but warn the user (except for BASH, which is always set by the calling BASH).
48100      if test "xJTREGEXE" != xBASH; then
48101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48102$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48103      fi
48104      # Try to locate tool using the code snippet
48105      for ac_prog in jtreg
48106do
48107  # Extract the first word of "$ac_prog", so it can be a program name with args.
48108set dummy $ac_prog; ac_word=$2
48109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48110$as_echo_n "checking for $ac_word... " >&6; }
48111if ${ac_cv_path_JTREGEXE+:} false; then :
48112  $as_echo_n "(cached) " >&6
48113else
48114  case $JTREGEXE in
48115  [\\/]* | ?:[\\/]*)
48116  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48117  ;;
48118  *)
48119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48120for as_dir in $PATH
48121do
48122  IFS=$as_save_IFS
48123  test -z "$as_dir" && as_dir=.
48124    for ac_exec_ext in '' $ac_executable_extensions; do
48125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48126    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48128    break 2
48129  fi
48130done
48131  done
48132IFS=$as_save_IFS
48133
48134  ;;
48135esac
48136fi
48137JTREGEXE=$ac_cv_path_JTREGEXE
48138if test -n "$JTREGEXE"; then
48139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48140$as_echo "$JTREGEXE" >&6; }
48141else
48142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48143$as_echo "no" >&6; }
48144fi
48145
48146
48147  test -n "$JTREGEXE" && break
48148done
48149
48150    else
48151      # If it succeeded, then it was overridden by the user. We will use it
48152      # for the tool.
48153
48154      # First remove it from the list of overridden variables, so we can test
48155      # for unknown variables in the end.
48156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48157
48158      # Check if we try to supply an empty value
48159      if test "x$JTREGEXE" = x; then
48160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48161$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48163$as_echo_n "checking for JTREGEXE... " >&6; }
48164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48165$as_echo "disabled" >&6; }
48166      else
48167        # Check if the provided tool contains a complete path.
48168        tool_specified="$JTREGEXE"
48169        tool_basename="${tool_specified##*/}"
48170        if test "x$tool_basename" = "x$tool_specified"; then
48171          # A command without a complete path is provided, search $PATH.
48172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48173$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48174          # Extract the first word of "$tool_basename", so it can be a program name with args.
48175set dummy $tool_basename; ac_word=$2
48176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48177$as_echo_n "checking for $ac_word... " >&6; }
48178if ${ac_cv_path_JTREGEXE+:} false; then :
48179  $as_echo_n "(cached) " >&6
48180else
48181  case $JTREGEXE in
48182  [\\/]* | ?:[\\/]*)
48183  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48184  ;;
48185  *)
48186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48187for as_dir in $PATH
48188do
48189  IFS=$as_save_IFS
48190  test -z "$as_dir" && as_dir=.
48191    for ac_exec_ext in '' $ac_executable_extensions; do
48192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48193    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48195    break 2
48196  fi
48197done
48198  done
48199IFS=$as_save_IFS
48200
48201  ;;
48202esac
48203fi
48204JTREGEXE=$ac_cv_path_JTREGEXE
48205if test -n "$JTREGEXE"; then
48206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48207$as_echo "$JTREGEXE" >&6; }
48208else
48209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48210$as_echo "no" >&6; }
48211fi
48212
48213
48214          if test "x$JTREGEXE" = x; then
48215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48216          fi
48217        else
48218          # Otherwise we believe it is a complete path. Use it as it is.
48219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48220$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48222$as_echo_n "checking for JTREGEXE... " >&6; }
48223          if test ! -x "$tool_specified"; then
48224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48225$as_echo "not found" >&6; }
48226            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48227          fi
48228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48229$as_echo "$tool_specified" >&6; }
48230        fi
48231      fi
48232    fi
48233
48234  fi
48235
48236
48237
48238  if test "x$JTREGEXE" = x; then
48239    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48240  fi
48241
48242
48243      JT_HOME="`$DIRNAME $JTREGEXE`"
48244    fi
48245  fi
48246
48247
48248
48249
48250
48251
48252  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48253  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48254  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48255  #                              commands produced by the link step (currently AIX only)
48256  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48257    COMPILER_TARGET_BITS_FLAG="-q"
48258    COMPILER_COMMAND_FILE_FLAG="-f"
48259    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48260  else
48261    COMPILER_TARGET_BITS_FLAG="-m"
48262    COMPILER_COMMAND_FILE_FLAG="@"
48263    COMPILER_BINDCMD_FILE_FLAG=""
48264
48265    # The solstudio linker does not support @-files.
48266    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48267      COMPILER_COMMAND_FILE_FLAG=
48268    fi
48269
48270    # Check if @file is supported by gcc
48271    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48272      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48273$as_echo_n "checking if @file is supported by gcc... " >&6; }
48274      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48275      $ECHO "" "--version" > command.file
48276      if $CXX @command.file 2>&5 >&5; then
48277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48278$as_echo "yes" >&6; }
48279        COMPILER_COMMAND_FILE_FLAG="@"
48280      else
48281        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48282$as_echo "no" >&6; }
48283        COMPILER_COMMAND_FILE_FLAG=
48284      fi
48285      $RM command.file
48286    fi
48287  fi
48288
48289
48290
48291
48292  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48293  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48294    ARFLAGS="-r"
48295  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48296    ARFLAGS="-X64"
48297  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48298    # lib.exe is used as AR to create static libraries.
48299    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48300  else
48301    ARFLAGS=""
48302  fi
48303
48304
48305  ## Setup strip.
48306  # FIXME: should this really be per platform, or should it be per toolchain type?
48307  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48308  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48309  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48310    STRIPFLAGS="-g"
48311  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48312    STRIPFLAGS="-x"
48313  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48314    STRIPFLAGS="-S"
48315  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48316    STRIPFLAGS="-X32_64"
48317  fi
48318
48319
48320
48321  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48322    CC_OUT_OPTION=-Fo
48323    EXE_OUT_OPTION=-out:
48324    LD_OUT_OPTION=-out:
48325    AR_OUT_OPTION=-out:
48326  else
48327    # The option used to specify the target .o,.a or .so file.
48328    # When compiling, how to specify the to be created object file.
48329    CC_OUT_OPTION='-o$(SPACE)'
48330    # When linking, how to specify the to be created executable.
48331    EXE_OUT_OPTION='-o$(SPACE)'
48332    # When linking, how to specify the to be created dynamically linkable library.
48333    LD_OUT_OPTION='-o$(SPACE)'
48334    # When archiving, how to specify the to be create static archive for object files.
48335    AR_OUT_OPTION='rcs$(SPACE)'
48336  fi
48337
48338
48339
48340
48341
48342  # On Windows, we need to set RC flags.
48343  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48344    RC_FLAGS="-nologo -l0x409"
48345    JVM_RCFLAGS="-nologo"
48346    if test "x$DEBUG_LEVEL" = xrelease; then
48347      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48348      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48349    fi
48350
48351    # The version variables used to create RC_FLAGS may be overridden
48352    # in a custom configure script, or possibly the command line.
48353    # Let those variables be expanded at make time in spec.gmk.
48354    # The \$ are escaped to the shell, and the $(...) variables
48355    # are evaluated by make.
48356    RC_FLAGS="$RC_FLAGS \
48357        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48358        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48359        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48360        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48361        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48362        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48363        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48364
48365    JVM_RCFLAGS="$JVM_RCFLAGS \
48366        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48367        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48368        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48369        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48370        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48371        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48372        -D\"HS_FNAME=jvm.dll\" \
48373        -D\"HS_INTERNAL_NAME=jvm\""
48374  fi
48375
48376
48377
48378  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48379    # silence copyright notice and other headers.
48380    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48381  fi
48382
48383
48384# Now we can test some aspects on the target using configure macros.
48385
48386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48387$as_echo_n "checking for ANSI C header files... " >&6; }
48388if ${ac_cv_header_stdc+:} false; then :
48389  $as_echo_n "(cached) " >&6
48390else
48391  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48392/* end confdefs.h.  */
48393#include <stdlib.h>
48394#include <stdarg.h>
48395#include <string.h>
48396#include <float.h>
48397
48398int
48399main ()
48400{
48401
48402  ;
48403  return 0;
48404}
48405_ACEOF
48406if ac_fn_cxx_try_compile "$LINENO"; then :
48407  ac_cv_header_stdc=yes
48408else
48409  ac_cv_header_stdc=no
48410fi
48411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48412
48413if test $ac_cv_header_stdc = yes; then
48414  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48416/* end confdefs.h.  */
48417#include <string.h>
48418
48419_ACEOF
48420if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48421  $EGREP "memchr" >/dev/null 2>&1; then :
48422
48423else
48424  ac_cv_header_stdc=no
48425fi
48426rm -f conftest*
48427
48428fi
48429
48430if test $ac_cv_header_stdc = yes; then
48431  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48433/* end confdefs.h.  */
48434#include <stdlib.h>
48435
48436_ACEOF
48437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48438  $EGREP "free" >/dev/null 2>&1; then :
48439
48440else
48441  ac_cv_header_stdc=no
48442fi
48443rm -f conftest*
48444
48445fi
48446
48447if test $ac_cv_header_stdc = yes; then
48448  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48449  if test "$cross_compiling" = yes; then :
48450  :
48451else
48452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48453/* end confdefs.h.  */
48454#include <ctype.h>
48455#include <stdlib.h>
48456#if ((' ' & 0x0FF) == 0x020)
48457# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48458# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48459#else
48460# define ISLOWER(c) \
48461		   (('a' <= (c) && (c) <= 'i') \
48462		     || ('j' <= (c) && (c) <= 'r') \
48463		     || ('s' <= (c) && (c) <= 'z'))
48464# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48465#endif
48466
48467#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48468int
48469main ()
48470{
48471  int i;
48472  for (i = 0; i < 256; i++)
48473    if (XOR (islower (i), ISLOWER (i))
48474	|| toupper (i) != TOUPPER (i))
48475      return 2;
48476  return 0;
48477}
48478_ACEOF
48479if ac_fn_cxx_try_run "$LINENO"; then :
48480
48481else
48482  ac_cv_header_stdc=no
48483fi
48484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48485  conftest.$ac_objext conftest.beam conftest.$ac_ext
48486fi
48487
48488fi
48489fi
48490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48491$as_echo "$ac_cv_header_stdc" >&6; }
48492if test $ac_cv_header_stdc = yes; then
48493
48494$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48495
48496fi
48497
48498# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48499for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48500		  inttypes.h stdint.h unistd.h
48501do :
48502  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48503ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48504"
48505if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48506  cat >>confdefs.h <<_ACEOF
48507#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48508_ACEOF
48509
48510fi
48511
48512done
48513
48514
48515
48516  ###############################################################################
48517  #
48518  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48519  # (The JVM can use 32 or 64 bit Java pointers but that decision
48520  # is made at runtime.)
48521  #
48522
48523  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48524    # Always specify -m flag on Solaris
48525    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48526
48527  # When we add flags to the "official" CFLAGS etc, we need to
48528  # keep track of these additions in ADDED_CFLAGS etc. These
48529  # will later be checked to make sure only controlled additions
48530  # have been made to CFLAGS etc.
48531  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48532  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48533  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48534
48535  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48536  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48537  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48538
48539  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48540  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48541  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48542
48543  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48544  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48545  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48546
48547  elif test "x$COMPILE_TYPE" = xreduced; then
48548    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48549      # Specify -m if running reduced on unix platforms
48550
48551  # When we add flags to the "official" CFLAGS etc, we need to
48552  # keep track of these additions in ADDED_CFLAGS etc. These
48553  # will later be checked to make sure only controlled additions
48554  # have been made to CFLAGS etc.
48555  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48556  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48557  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48558
48559  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48560  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48561  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48562
48563  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48564  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48565  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48566
48567  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48568  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48569  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48570
48571    fi
48572  fi
48573  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48574    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48575    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48576    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48577  fi
48578
48579  # Make compilation sanity check
48580  for ac_header in stdio.h
48581do :
48582  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48583if test "x$ac_cv_header_stdio_h" = xyes; then :
48584  cat >>confdefs.h <<_ACEOF
48585#define HAVE_STDIO_H 1
48586_ACEOF
48587
48588else
48589
48590    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48591$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48592    if test "x$COMPILE_TYPE" = xreduced; then
48593
48594  # Print a helpful message on how to acquire the necessary build dependency.
48595  # reduced is the help tag: freetype, cups, alsa etc
48596  MISSING_DEPENDENCY=reduced
48597
48598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48599    cygwin_help $MISSING_DEPENDENCY
48600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48601    msys_help $MISSING_DEPENDENCY
48602  else
48603    PKGHANDLER_COMMAND=
48604
48605    case $PKGHANDLER in
48606      apt-get)
48607        apt_help     $MISSING_DEPENDENCY ;;
48608      yum)
48609        yum_help     $MISSING_DEPENDENCY ;;
48610      port)
48611        port_help    $MISSING_DEPENDENCY ;;
48612      pkgutil)
48613        pkgutil_help $MISSING_DEPENDENCY ;;
48614      pkgadd)
48615        pkgadd_help  $MISSING_DEPENDENCY ;;
48616    esac
48617
48618    if test "x$PKGHANDLER_COMMAND" != x; then
48619      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48620    fi
48621  fi
48622
48623      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48624$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48625    elif test "x$COMPILE_TYPE" = xcross; then
48626      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48627$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48628    fi
48629    as_fn_error $? "Cannot continue." "$LINENO" 5
48630
48631fi
48632
48633done
48634
48635
48636  # The cast to long int works around a bug in the HP C Compiler
48637# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48638# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48639# This bug is HP SR number 8606223364.
48640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48641$as_echo_n "checking size of int *... " >&6; }
48642if ${ac_cv_sizeof_int_p+:} false; then :
48643  $as_echo_n "(cached) " >&6
48644else
48645  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48646
48647else
48648  if test "$ac_cv_type_int_p" = yes; then
48649     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48651as_fn_error 77 "cannot compute sizeof (int *)
48652See \`config.log' for more details" "$LINENO" 5; }
48653   else
48654     ac_cv_sizeof_int_p=0
48655   fi
48656fi
48657
48658fi
48659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48660$as_echo "$ac_cv_sizeof_int_p" >&6; }
48661
48662
48663
48664cat >>confdefs.h <<_ACEOF
48665#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48666_ACEOF
48667
48668
48669
48670  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48671  if test "x$ac_cv_sizeof_int_p" = x; then
48672    # The test failed, lets stick to the assumed value.
48673    { $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
48674$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48675  else
48676    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48677
48678    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48679      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48680      # Let's try to implicitely set the compilers target architecture and retry the test
48681      { $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
48682$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;}
48683      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48684$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48685
48686  # When we add flags to the "official" CFLAGS etc, we need to
48687  # keep track of these additions in ADDED_CFLAGS etc. These
48688  # will later be checked to make sure only controlled additions
48689  # have been made to CFLAGS etc.
48690  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48691  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48692  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48693
48694  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48695  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48696  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48697
48698  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48699  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48700  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48701
48702  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48703  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48704  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48705
48706
48707      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48708      unset ac_cv_sizeof_int_p
48709      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48710      cat >>confdefs.h <<_ACEOF
48711#undef SIZEOF_INT_P
48712_ACEOF
48713
48714      # The cast to long int works around a bug in the HP C Compiler
48715# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48716# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48717# This bug is HP SR number 8606223364.
48718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48719$as_echo_n "checking size of int *... " >&6; }
48720if ${ac_cv_sizeof_int_p+:} false; then :
48721  $as_echo_n "(cached) " >&6
48722else
48723  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48724
48725else
48726  if test "$ac_cv_type_int_p" = yes; then
48727     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48729as_fn_error 77 "cannot compute sizeof (int *)
48730See \`config.log' for more details" "$LINENO" 5; }
48731   else
48732     ac_cv_sizeof_int_p=0
48733   fi
48734fi
48735
48736fi
48737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48738$as_echo "$ac_cv_sizeof_int_p" >&6; }
48739
48740
48741
48742cat >>confdefs.h <<_ACEOF
48743#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48744_ACEOF
48745
48746
48747
48748      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48749
48750      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48751        { $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
48752$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;}
48753        if test "x$COMPILE_TYPE" = xreduced; then
48754
48755  # Print a helpful message on how to acquire the necessary build dependency.
48756  # reduced is the help tag: freetype, cups, alsa etc
48757  MISSING_DEPENDENCY=reduced
48758
48759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48760    cygwin_help $MISSING_DEPENDENCY
48761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48762    msys_help $MISSING_DEPENDENCY
48763  else
48764    PKGHANDLER_COMMAND=
48765
48766    case $PKGHANDLER in
48767      apt-get)
48768        apt_help     $MISSING_DEPENDENCY ;;
48769      yum)
48770        yum_help     $MISSING_DEPENDENCY ;;
48771      port)
48772        port_help    $MISSING_DEPENDENCY ;;
48773      pkgutil)
48774        pkgutil_help $MISSING_DEPENDENCY ;;
48775      pkgadd)
48776        pkgadd_help  $MISSING_DEPENDENCY ;;
48777    esac
48778
48779    if test "x$PKGHANDLER_COMMAND" != x; then
48780      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48781    fi
48782  fi
48783
48784          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48785$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48786        elif test "x$COMPILE_TYPE" = xcross; then
48787          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48788$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48789        fi
48790        as_fn_error $? "Cannot continue." "$LINENO" 5
48791      fi
48792    fi
48793  fi
48794
48795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48796$as_echo_n "checking for target address size... " >&6; }
48797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48798$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48799
48800
48801  ###############################################################################
48802  #
48803  # Is the target little of big endian?
48804  #
48805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48806$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48807if ${ac_cv_c_bigendian+:} false; then :
48808  $as_echo_n "(cached) " >&6
48809else
48810  ac_cv_c_bigendian=unknown
48811    # See if we're dealing with a universal compiler.
48812    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48813/* end confdefs.h.  */
48814#ifndef __APPLE_CC__
48815	       not a universal capable compiler
48816	     #endif
48817	     typedef int dummy;
48818
48819_ACEOF
48820if ac_fn_cxx_try_compile "$LINENO"; then :
48821
48822	# Check for potential -arch flags.  It is not universal unless
48823	# there are at least two -arch flags with different values.
48824	ac_arch=
48825	ac_prev=
48826	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48827	 if test -n "$ac_prev"; then
48828	   case $ac_word in
48829	     i?86 | x86_64 | ppc | ppc64)
48830	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48831		 ac_arch=$ac_word
48832	       else
48833		 ac_cv_c_bigendian=universal
48834		 break
48835	       fi
48836	       ;;
48837	   esac
48838	   ac_prev=
48839	 elif test "x$ac_word" = "x-arch"; then
48840	   ac_prev=arch
48841	 fi
48842       done
48843fi
48844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48845    if test $ac_cv_c_bigendian = unknown; then
48846      # See if sys/param.h defines the BYTE_ORDER macro.
48847      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48848/* end confdefs.h.  */
48849#include <sys/types.h>
48850	     #include <sys/param.h>
48851
48852int
48853main ()
48854{
48855#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48856		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48857		     && LITTLE_ENDIAN)
48858	      bogus endian macros
48859	     #endif
48860
48861  ;
48862  return 0;
48863}
48864_ACEOF
48865if ac_fn_cxx_try_compile "$LINENO"; then :
48866  # It does; now see whether it defined to BIG_ENDIAN or not.
48867	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48868/* end confdefs.h.  */
48869#include <sys/types.h>
48870		#include <sys/param.h>
48871
48872int
48873main ()
48874{
48875#if BYTE_ORDER != BIG_ENDIAN
48876		 not big endian
48877		#endif
48878
48879  ;
48880  return 0;
48881}
48882_ACEOF
48883if ac_fn_cxx_try_compile "$LINENO"; then :
48884  ac_cv_c_bigendian=yes
48885else
48886  ac_cv_c_bigendian=no
48887fi
48888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48889fi
48890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48891    fi
48892    if test $ac_cv_c_bigendian = unknown; then
48893      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48894      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48895/* end confdefs.h.  */
48896#include <limits.h>
48897
48898int
48899main ()
48900{
48901#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48902	      bogus endian macros
48903	     #endif
48904
48905  ;
48906  return 0;
48907}
48908_ACEOF
48909if ac_fn_cxx_try_compile "$LINENO"; then :
48910  # It does; now see whether it defined to _BIG_ENDIAN or not.
48911	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48912/* end confdefs.h.  */
48913#include <limits.h>
48914
48915int
48916main ()
48917{
48918#ifndef _BIG_ENDIAN
48919		 not big endian
48920		#endif
48921
48922  ;
48923  return 0;
48924}
48925_ACEOF
48926if ac_fn_cxx_try_compile "$LINENO"; then :
48927  ac_cv_c_bigendian=yes
48928else
48929  ac_cv_c_bigendian=no
48930fi
48931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48932fi
48933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48934    fi
48935    if test $ac_cv_c_bigendian = unknown; then
48936      # Compile a test program.
48937      if test "$cross_compiling" = yes; then :
48938  # Try to guess by grepping values from an object file.
48939	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48940/* end confdefs.h.  */
48941short int ascii_mm[] =
48942		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48943		short int ascii_ii[] =
48944		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48945		int use_ascii (int i) {
48946		  return ascii_mm[i] + ascii_ii[i];
48947		}
48948		short int ebcdic_ii[] =
48949		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48950		short int ebcdic_mm[] =
48951		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48952		int use_ebcdic (int i) {
48953		  return ebcdic_mm[i] + ebcdic_ii[i];
48954		}
48955		extern int foo;
48956
48957int
48958main ()
48959{
48960return use_ascii (foo) == use_ebcdic (foo);
48961  ;
48962  return 0;
48963}
48964_ACEOF
48965if ac_fn_cxx_try_compile "$LINENO"; then :
48966  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48967	      ac_cv_c_bigendian=yes
48968	    fi
48969	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48970	      if test "$ac_cv_c_bigendian" = unknown; then
48971		ac_cv_c_bigendian=no
48972	      else
48973		# finding both strings is unlikely to happen, but who knows?
48974		ac_cv_c_bigendian=unknown
48975	      fi
48976	    fi
48977fi
48978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48979else
48980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48981/* end confdefs.h.  */
48982$ac_includes_default
48983int
48984main ()
48985{
48986
48987	     /* Are we little or big endian?  From Harbison&Steele.  */
48988	     union
48989	     {
48990	       long int l;
48991	       char c[sizeof (long int)];
48992	     } u;
48993	     u.l = 1;
48994	     return u.c[sizeof (long int) - 1] == 1;
48995
48996  ;
48997  return 0;
48998}
48999_ACEOF
49000if ac_fn_cxx_try_run "$LINENO"; then :
49001  ac_cv_c_bigendian=no
49002else
49003  ac_cv_c_bigendian=yes
49004fi
49005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49006  conftest.$ac_objext conftest.beam conftest.$ac_ext
49007fi
49008
49009    fi
49010fi
49011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49012$as_echo "$ac_cv_c_bigendian" >&6; }
49013 case $ac_cv_c_bigendian in #(
49014   yes)
49015     ENDIAN="big";; #(
49016   no)
49017     ENDIAN="little" ;; #(
49018   universal)
49019     ENDIAN="universal_endianness"
49020     ;; #(
49021   *)
49022     ENDIAN="unknown" ;;
49023 esac
49024
49025
49026  if test "x$ENDIAN" = xuniversal_endianness; then
49027    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49028  fi
49029  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49030    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
49031  fi
49032
49033
49034# Configure flags for the tools
49035
49036  ###############################################################################
49037  #
49038  # How to compile shared libraries.
49039  #
49040
49041  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49042    PICFLAG="-fPIC"
49043    C_FLAG_REORDER=''
49044    CXX_FLAG_REORDER=''
49045
49046    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49047      # Linking is different on MacOSX
49048      if test "x$STATIC_BUILD" = xtrue; then
49049        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49050      else
49051        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49052        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49053      fi
49054      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49055      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49056      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49057      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49058    else
49059      # Default works for linux, might work on other platforms as well.
49060      SHARED_LIBRARY_FLAGS='-shared'
49061      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49062      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49063      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49064      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49065    fi
49066  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49067    C_FLAG_REORDER=''
49068    CXX_FLAG_REORDER=''
49069
49070    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49071      # Linking is different on MacOSX
49072      PICFLAG=''
49073      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49074      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49075      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49076      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49077      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49078
49079      if test "x$STATIC_BUILD" = xfalse; then
49080        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49081      fi
49082    else
49083      # Default works for linux, might work on other platforms as well.
49084      PICFLAG='-fPIC'
49085      SHARED_LIBRARY_FLAGS='-shared'
49086      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49087      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49088      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49089      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49090    fi
49091  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49092    PICFLAG="-KPIC"
49093    C_FLAG_REORDER='-xF'
49094    CXX_FLAG_REORDER='-xF'
49095    SHARED_LIBRARY_FLAGS="-G"
49096    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49097    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49098    SET_SHARED_LIBRARY_NAME='-h $1'
49099    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49100  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49101    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49102    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49103    # will have to patch this single instruction with a call to some out-of-order code which
49104    # does the load from the TOC. This is of course slow. But in that case we also would have
49105    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49106    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49107    # can be patched directly by the linker and does not require a jump to out-of-order code.
49108    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49109    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49110    # loads for accessing a global variable). But there are rumors that this may be seen as a
49111    # 'performance feature' because of improved code locality of the symbols used in a
49112    # compilation unit.
49113    PICFLAG="-qpic"
49114    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49115    C_FLAG_REORDER=''
49116    CXX_FLAG_REORDER=''
49117    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49118    SET_EXECUTABLE_ORIGIN=""
49119    SET_SHARED_LIBRARY_ORIGIN=''
49120    SET_SHARED_LIBRARY_NAME=''
49121    SET_SHARED_LIBRARY_MAPFILE=''
49122  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49123    PICFLAG=""
49124    C_FLAG_REORDER=''
49125    CXX_FLAG_REORDER=''
49126    SHARED_LIBRARY_FLAGS="-dll"
49127    SET_EXECUTABLE_ORIGIN=''
49128    SET_SHARED_LIBRARY_ORIGIN=''
49129    SET_SHARED_LIBRARY_NAME=''
49130    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49131  fi
49132
49133
49134
49135
49136
49137
49138
49139
49140
49141  # The (cross) compiler is now configured, we can now test capabilities
49142  # of the target platform.
49143
49144
49145
49146  ###############################################################################
49147  #
49148  # Setup the opt flags for different compilers
49149  # and different operating systems.
49150  #
49151
49152  # FIXME: this was indirectly the old default, but just inherited.
49153  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49154  #   C_FLAG_DEPS="-MMD -MF"
49155  # fi
49156
49157  # Generate make dependency files
49158  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49159    C_FLAG_DEPS="-MMD -MF"
49160  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49161    C_FLAG_DEPS="-MMD -MF"
49162  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49163    C_FLAG_DEPS="-xMMD -xMF"
49164  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49165    C_FLAG_DEPS="-qmakedep=gcc -MF"
49166  fi
49167  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49168
49169
49170
49171  # Debug symbols
49172  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49173    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49174      # reduce from default "-g2" option to save space
49175      CFLAGS_DEBUG_SYMBOLS="-g1"
49176      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49177    else
49178      CFLAGS_DEBUG_SYMBOLS="-g"
49179      CXXFLAGS_DEBUG_SYMBOLS="-g"
49180    fi
49181  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49182    CFLAGS_DEBUG_SYMBOLS="-g"
49183    CXXFLAGS_DEBUG_SYMBOLS="-g"
49184  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49185    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49186    # -g0 enables debug symbols without disabling inlining.
49187    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49188  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49189    CFLAGS_DEBUG_SYMBOLS="-g"
49190    CXXFLAGS_DEBUG_SYMBOLS="-g"
49191  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49192    CFLAGS_DEBUG_SYMBOLS="-Zi"
49193    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49194  fi
49195
49196
49197
49198  # Debug symbols for JVM_CFLAGS
49199  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49200    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49201    if test "x$DEBUG_LEVEL" = xslowdebug; then
49202      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49203    else
49204      # -g0 does not disable inlining, which -g does.
49205      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49206    fi
49207  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49208    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49209  else
49210    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49211  fi
49212
49213
49214  # bounds, memory and behavior checking options
49215  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49216    case $DEBUG_LEVEL in
49217    release )
49218      # no adjustment
49219      ;;
49220    fastdebug )
49221      # no adjustment
49222      ;;
49223    slowdebug )
49224      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49225      # get's added conditionally on whether we produce debug symbols or not.
49226      # This is most likely not really correct.
49227
49228      # Add runtime stack smashing and undefined behavior checks.
49229      # Not all versions of gcc support -fstack-protector
49230      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273    # Execute function body
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322    # Execute function body
49323
49324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49325$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49326  supports=yes
49327
49328  saved_cflags="$CFLAGS"
49329  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49330  ac_ext=c
49331ac_cpp='$CPP $CPPFLAGS'
49332ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49333ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49334ac_compiler_gnu=$ac_cv_c_compiler_gnu
49335
49336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49337/* end confdefs.h.  */
49338int i;
49339_ACEOF
49340if ac_fn_c_try_compile "$LINENO"; then :
49341
49342else
49343  supports=no
49344fi
49345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49346  ac_ext=cpp
49347ac_cpp='$CXXCPP $CPPFLAGS'
49348ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49349ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49350ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49351
49352  CFLAGS="$saved_cflags"
49353
49354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49355$as_echo "$supports" >&6; }
49356  if test "x$supports" = "xyes" ; then
49357    :
49358    C_COMP_SUPPORTS="yes"
49359  else
49360    :
49361    C_COMP_SUPPORTS="no"
49362  fi
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
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422    # Execute function body
49423
49424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49425$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49426  supports=yes
49427
49428  saved_cxxflags="$CXXFLAGS"
49429  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49430  ac_ext=cpp
49431ac_cpp='$CXXCPP $CPPFLAGS'
49432ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49433ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49434ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49435
49436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49437/* end confdefs.h.  */
49438int i;
49439_ACEOF
49440if ac_fn_cxx_try_compile "$LINENO"; then :
49441
49442else
49443  supports=no
49444fi
49445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49446  ac_ext=cpp
49447ac_cpp='$CXXCPP $CPPFLAGS'
49448ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49449ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49450ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49451
49452  CXXFLAGS="$saved_cxxflags"
49453
49454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49455$as_echo "$supports" >&6; }
49456  if test "x$supports" = "xyes" ; then
49457    :
49458    CXX_COMP_SUPPORTS="yes"
49459  else
49460    :
49461    CXX_COMP_SUPPORTS="no"
49462  fi
49463
49464
49465
49466
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49477$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49478  supports=no
49479  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49480
49481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49482$as_echo "$supports" >&6; }
49483  if test "x$supports" = "xyes" ; then
49484    :
49485
49486  else
49487    :
49488    STACK_PROTECTOR_CFLAG=""
49489  fi
49490
49491
49492
49493
49494
49495
49496
49497      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49498      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49499      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49500        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49501      fi
49502      ;;
49503    esac
49504  fi
49505
49506  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49507    if test "x$DEBUG_LEVEL" != xrelease; then
49508      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49509        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49510      fi
49511    fi
49512  fi
49513
49514  # Optimization levels
49515  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49516    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49517
49518    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49519      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49520      C_O_FLAG_HIGHEST_JVM="-xO4"
49521      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49522      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49523      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49524      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49525      C_O_FLAG_DEBUG_JVM=""
49526      C_O_FLAG_NONE="-xregs=no%frameptr"
49527      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49528      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49529      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49530      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49531      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49532      CXX_O_FLAG_DEBUG_JVM=""
49533      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49534      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49535        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49536        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49537      fi
49538    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49539      C_O_FLAG_HIGHEST_JVM="-xO4"
49540      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49541      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49542      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49543      C_O_FLAG_DEBUG=""
49544      C_O_FLAG_DEBUG_JVM=""
49545      C_O_FLAG_NONE=""
49546      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49547      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49548      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49549      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49550      CXX_O_FLAG_DEBUG=""
49551      CXX_O_FLAG_DEBUG_JVM=""
49552      CXX_O_FLAG_NONE=""
49553    fi
49554  else
49555    # The remaining toolchains share opt flags between CC and CXX;
49556    # setup for C and duplicate afterwards.
49557    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49558      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49559        # On MacOSX we optimize for size, something
49560        # we should do for all platforms?
49561        C_O_FLAG_HIGHEST_JVM="-Os"
49562        C_O_FLAG_HIGHEST="-Os"
49563        C_O_FLAG_HI="-Os"
49564        C_O_FLAG_NORM="-Os"
49565        C_O_FLAG_SIZE="-Os"
49566      else
49567        C_O_FLAG_HIGHEST_JVM="-O3"
49568        C_O_FLAG_HIGHEST="-O3"
49569        C_O_FLAG_HI="-O3"
49570        C_O_FLAG_NORM="-O2"
49571        C_O_FLAG_SIZE="-Os"
49572      fi
49573      C_O_FLAG_DEBUG="-O0"
49574      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49575        C_O_FLAG_DEBUG_JVM=""
49576      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49577        C_O_FLAG_DEBUG_JVM="-O0"
49578      fi
49579      C_O_FLAG_NONE="-O0"
49580    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49581      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49582        # On MacOSX we optimize for size, something
49583        # we should do for all platforms?
49584        C_O_FLAG_HIGHEST_JVM="-Os"
49585        C_O_FLAG_HIGHEST="-Os"
49586        C_O_FLAG_HI="-Os"
49587        C_O_FLAG_NORM="-Os"
49588        C_O_FLAG_SIZE="-Os"
49589      else
49590        C_O_FLAG_HIGHEST_JVM="-O3"
49591        C_O_FLAG_HIGHEST="-O3"
49592        C_O_FLAG_HI="-O3"
49593        C_O_FLAG_NORM="-O2"
49594        C_O_FLAG_SIZE="-Os"
49595      fi
49596      C_O_FLAG_DEBUG="-O0"
49597      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49598        C_O_FLAG_DEBUG_JVM=""
49599      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49600        C_O_FLAG_DEBUG_JVM="-O0"
49601      fi
49602      C_O_FLAG_NONE="-O0"
49603    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49604      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49605      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49606      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49607      C_O_FLAG_NORM="-O2"
49608      C_O_FLAG_DEBUG="-qnoopt"
49609      # FIXME: Value below not verified.
49610      C_O_FLAG_DEBUG_JVM=""
49611      C_O_FLAG_NONE="-qnoopt"
49612    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49613      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49614      C_O_FLAG_HIGHEST="-O2"
49615      C_O_FLAG_HI="-O1"
49616      C_O_FLAG_NORM="-O1"
49617      C_O_FLAG_DEBUG="-Od"
49618      C_O_FLAG_DEBUG_JVM=""
49619      C_O_FLAG_NONE="-Od"
49620      C_O_FLAG_SIZE="-Os"
49621    fi
49622    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49623    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49624    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49625    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49626    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49627    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49628    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49629    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49630  fi
49631
49632  # Adjust optimization flags according to debug level.
49633  case $DEBUG_LEVEL in
49634    release )
49635      # no adjustment
49636      ;;
49637    fastdebug )
49638      # Not quite so much optimization
49639      C_O_FLAG_HI="$C_O_FLAG_NORM"
49640      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49641      ;;
49642    slowdebug )
49643      # Disable optimization
49644      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49645      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49646      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49647      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49648      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49649      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49650      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49651      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49652      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49653      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49654      ;;
49655  esac
49656
49657
49658
49659
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675  # Special extras...
49676  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49677    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49678      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49679      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49680    fi
49681    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49682    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49683  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49684    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49685    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49686  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49687    CXXSTD_CXXFLAG="-std=gnu++98"
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730    # Execute function body
49731
49732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49733$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49734  supports=yes
49735
49736  saved_cxxflags="$CXXFLAGS"
49737  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49738  ac_ext=cpp
49739ac_cpp='$CXXCPP $CPPFLAGS'
49740ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49741ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49742ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49743
49744  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49745/* end confdefs.h.  */
49746int i;
49747_ACEOF
49748if ac_fn_cxx_try_compile "$LINENO"; then :
49749
49750else
49751  supports=no
49752fi
49753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49754  ac_ext=cpp
49755ac_cpp='$CXXCPP $CPPFLAGS'
49756ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49757ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49758ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49759
49760  CXXFLAGS="$saved_cxxflags"
49761
49762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49763$as_echo "$supports" >&6; }
49764  if test "x$supports" = "xyes" ; then
49765    :
49766
49767  else
49768    :
49769    CXXSTD_CXXFLAG=""
49770  fi
49771
49772
49773
49774
49775
49776
49777
49778
49779
49780
49781
49782
49783    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49784
49785  fi
49786  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49787    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49788    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49789    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49790    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49791    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49792  fi
49793
49794  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49795    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49796    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49797    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49798  fi
49799
49800  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49801  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49802  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49803
49804  ###############################################################################
49805  #
49806  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49807  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49808  #
49809
49810  # Setup compiler/platform specific flags into
49811  #    CFLAGS_JDK    - C Compiler flags
49812  #    CXXFLAGS_JDK  - C++ Compiler flags
49813  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49814  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49815    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49816    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49817    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49818    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49819      # Force compatibility with i586 on 32 bit intel platforms.
49820      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49821      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49822    fi
49823    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49824        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49825    case $OPENJDK_TARGET_CPU_ARCH in
49826      arm )
49827        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49828        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49829        ;;
49830      ppc )
49831        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49832        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49833        ;;
49834      * )
49835        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49836        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49837        ;;
49838    esac
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
49886
49887
49888
49889
49890
49891
49892
49893    # Execute function body
49894
49895  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49896  REFERENCE_VERSION=6
49897
49898  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49899    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49900  fi
49901
49902  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49903    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49904  fi
49905
49906  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49907  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49908
49909  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49910    :
49911
49912  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49913  # runs afoul of the more aggressive versions of these optimisations.
49914  # Notably, value range propagation now assumes that the this pointer of C++
49915  # member functions is non-null.
49916  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49917
49918
49919
49920
49921
49922
49923
49924
49925
49926
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959    # Execute function body
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008    # Execute function body
50009
50010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50011$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50012  supports=yes
50013
50014  saved_cflags="$CFLAGS"
50015  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
50016  ac_ext=c
50017ac_cpp='$CPP $CPPFLAGS'
50018ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50019ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50020ac_compiler_gnu=$ac_cv_c_compiler_gnu
50021
50022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50023/* end confdefs.h.  */
50024int i;
50025_ACEOF
50026if ac_fn_c_try_compile "$LINENO"; then :
50027
50028else
50029  supports=no
50030fi
50031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50032  ac_ext=cpp
50033ac_cpp='$CXXCPP $CPPFLAGS'
50034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50037
50038  CFLAGS="$saved_cflags"
50039
50040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50041$as_echo "$supports" >&6; }
50042  if test "x$supports" = "xyes" ; then
50043    :
50044    C_COMP_SUPPORTS="yes"
50045  else
50046    :
50047    C_COMP_SUPPORTS="no"
50048  fi
50049
50050
50051
50052
50053
50054
50055
50056
50057
50058
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098
50099
50100
50101
50102
50103
50104
50105
50106
50107
50108    # Execute function body
50109
50110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50111$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50112  supports=yes
50113
50114  saved_cxxflags="$CXXFLAGS"
50115  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
50116  ac_ext=cpp
50117ac_cpp='$CXXCPP $CPPFLAGS'
50118ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50119ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50120ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50121
50122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50123/* end confdefs.h.  */
50124int i;
50125_ACEOF
50126if ac_fn_cxx_try_compile "$LINENO"; then :
50127
50128else
50129  supports=no
50130fi
50131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50132  ac_ext=cpp
50133ac_cpp='$CXXCPP $CPPFLAGS'
50134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50137
50138  CXXFLAGS="$saved_cxxflags"
50139
50140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50141$as_echo "$supports" >&6; }
50142  if test "x$supports" = "xyes" ; then
50143    :
50144    CXX_COMP_SUPPORTS="yes"
50145  else
50146    :
50147    CXX_COMP_SUPPORTS="no"
50148  fi
50149
50150
50151
50152
50153
50154
50155
50156
50157
50158
50159
50160
50161
50162  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50163$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50164  supports=no
50165  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50166
50167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50168$as_echo "$supports" >&6; }
50169  if test "x$supports" = "xyes" ; then
50170    :
50171
50172  else
50173    :
50174    NO_NULL_POINTER_CHECK_CFLAG=""
50175  fi
50176
50177
50178
50179
50180
50181
50182
50183  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
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    # Execute function body
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275    # Execute function body
50276
50277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50278$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50279  supports=yes
50280
50281  saved_cflags="$CFLAGS"
50282  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
50283  ac_ext=c
50284ac_cpp='$CPP $CPPFLAGS'
50285ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50286ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50287ac_compiler_gnu=$ac_cv_c_compiler_gnu
50288
50289  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50290/* end confdefs.h.  */
50291int i;
50292_ACEOF
50293if ac_fn_c_try_compile "$LINENO"; then :
50294
50295else
50296  supports=no
50297fi
50298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50299  ac_ext=cpp
50300ac_cpp='$CXXCPP $CPPFLAGS'
50301ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50302ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50303ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50304
50305  CFLAGS="$saved_cflags"
50306
50307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50308$as_echo "$supports" >&6; }
50309  if test "x$supports" = "xyes" ; then
50310    :
50311    C_COMP_SUPPORTS="yes"
50312  else
50313    :
50314    C_COMP_SUPPORTS="no"
50315  fi
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367
50368
50369
50370
50371
50372
50373
50374
50375    # Execute function body
50376
50377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50378$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50379  supports=yes
50380
50381  saved_cxxflags="$CXXFLAGS"
50382  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
50383  ac_ext=cpp
50384ac_cpp='$CXXCPP $CPPFLAGS'
50385ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50386ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50387ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50388
50389  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50390/* end confdefs.h.  */
50391int i;
50392_ACEOF
50393if ac_fn_cxx_try_compile "$LINENO"; then :
50394
50395else
50396  supports=no
50397fi
50398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50399  ac_ext=cpp
50400ac_cpp='$CXXCPP $CPPFLAGS'
50401ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50402ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50403ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50404
50405  CXXFLAGS="$saved_cxxflags"
50406
50407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50408$as_echo "$supports" >&6; }
50409  if test "x$supports" = "xyes" ; then
50410    :
50411    CXX_COMP_SUPPORTS="yes"
50412  else
50413    :
50414    CXX_COMP_SUPPORTS="no"
50415  fi
50416
50417
50418
50419
50420
50421
50422
50423
50424
50425
50426
50427
50428
50429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50430$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50431  supports=no
50432  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50433
50434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50435$as_echo "$supports" >&6; }
50436  if test "x$supports" = "xyes" ; then
50437    :
50438
50439  else
50440    :
50441    NO_LIFETIME_DSE_CFLAG=""
50442  fi
50443
50444
50445
50446
50447
50448
50449  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50450
50451
50452
50453  else
50454    :
50455
50456  fi
50457
50458
50459
50460
50461
50462
50463
50464
50465
50466
50467
50468
50469
50470
50471  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50472    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50473
50474    # Restrict the debug information created by Clang to avoid
50475    # too big object files and speed the build up a little bit
50476    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50477    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50478    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50479      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50480        # Force compatibility with i586 on 32 bit intel platforms.
50481        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50482        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50483      fi
50484      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50485      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50486          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50487      case $OPENJDK_TARGET_CPU_ARCH in
50488        ppc )
50489          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50490          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50491          ;;
50492        * )
50493          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50494          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50495          ;;
50496      esac
50497    fi
50498  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50499    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50500    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50501    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50502      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50503    fi
50504
50505    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50506    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50507  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50508    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50509    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50510    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50511  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50512    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50513        -MD -Zc:wchar_t- -W3 -wd4800 \
50514        -DWIN32_LEAN_AND_MEAN \
50515        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50516        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50517        -DWIN32 -DIAL"
50518    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50519      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50520    else
50521      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50522    fi
50523    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50524    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50525    # studio.
50526    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50527      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50528      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50529      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50530    fi
50531  fi
50532
50533  ###############################################################################
50534
50535  # Adjust flags according to debug level.
50536  case $DEBUG_LEVEL in
50537    fastdebug | slowdebug )
50538      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50539      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50540      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50541      ;;
50542    release )
50543      ;;
50544    * )
50545      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50546      ;;
50547  esac
50548
50549  # Set some common defines. These works for all compilers, but assume
50550  # -D is universally accepted.
50551
50552  # Setup endianness
50553  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50554    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50555    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50556    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50557    #   Note: -Dmacro         is the same as    #define macro 1
50558    #         -Dmacro=        is the same as    #define macro
50559    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50560      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50561    else
50562      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50563    fi
50564  else
50565    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50566    # are defined in the system?
50567    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50568      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50569    else
50570      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50571    fi
50572  fi
50573
50574  # Setup target OS define. Use OS target name but in upper case.
50575  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50576  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50577
50578  # Setup target CPU
50579  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50580      $OPENJDK_TARGET_ADD_LP64 \
50581      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50582
50583  # Setup debug/release defines
50584  if test "x$DEBUG_LEVEL" = xrelease; then
50585    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50586    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50587      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50588    fi
50589  else
50590    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50591  fi
50592
50593  # Set some additional per-OS defines.
50594  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50595    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50596    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50597        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50598  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50599    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50600    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50601        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50602  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50603    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50604    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50605    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50606    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50607        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50608        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50609        -fno-omit-frame-pointer"
50610  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50611    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50612    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50613    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50614        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50615        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50616  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50617    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50618  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50619    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50620    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50621  fi
50622
50623  # Set some additional per-CPU defines.
50624  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50625    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50626  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50627    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50628  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50629    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50630      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50631      # fixes `relocation truncated to fit' error for gcc 4.1.
50632      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50633      # Use ppc64 instructions, but schedule for power5
50634      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50635    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50636      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50637    fi
50638  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50639    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50640      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50641      # Little endian machine uses ELFv2 ABI.
50642      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50643      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50644      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50645    fi
50646  fi
50647
50648  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50649    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50650  fi
50651
50652  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50653    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50654      # Solaris does not have _LP64=1 in the old build.
50655      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50656      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50657    fi
50658  fi
50659
50660  # Set JVM_CFLAGS warning handling
50661  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50662    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50663        -Wunused-value -Woverloaded-virtual"
50664
50665    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720    # Execute function body
50721
50722  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50723  REFERENCE_VERSION=4.8
50724
50725  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50726    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50727  fi
50728
50729  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50730    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50731  fi
50732
50733  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50734  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50735
50736  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50737    :
50738
50739            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50740            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50741
50742
50743  else
50744    :
50745
50746  fi
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761    fi
50762    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50763      # Non-zero builds have stricter warnings
50764      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50765    else
50766      if test "x$TOOLCHAIN_TYPE" = xclang; then
50767        # Some versions of llvm do not like -Wundef
50768        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50769      fi
50770    fi
50771  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50772    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50773        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50774  fi
50775
50776  # Additional macosx handling
50777  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50778    # Setting these parameters makes it an error to link to macosx APIs that are
50779    # newer than the given OS version and makes the linked binaries compatible
50780    # even if built on a newer version of the OS.
50781    # The expected format is X.Y.Z
50782    MACOSX_VERSION_MIN=10.7.0
50783
50784
50785    # The macro takes the version with no dots, ex: 1070
50786    # Let the flags variables get resolved in make for easier override on make
50787    # command line.
50788    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50789    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50790  fi
50791
50792  # Setup some hard coded includes
50793  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50794      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50795      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50796      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50797      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50798      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50799
50800  # The shared libraries are compiled using the picflag.
50801  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50802      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50803  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50804      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50805
50806  # Executable flags
50807  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50808  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50809
50810
50811
50812
50813
50814
50815  # Setup LDFLAGS et al.
50816  #
50817
50818  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50819    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50820    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50821    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50822    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50823      LDFLAGS_SAFESH="-safeseh"
50824      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50825      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50826      # NOTE: Old build added -machine. Probably not needed.
50827      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50828    else
50829      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50830    fi
50831  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50832      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50833      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50834        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50835        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50836    fi
50837  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50838    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50839    # We have previously set HAS_GNU_HASH if this is the case
50840    if test -n "$HAS_GNU_HASH"; then
50841      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50842      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50843      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50844    fi
50845      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50846        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50847    fi
50848    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50849      # And since we now know that the linker is gnu, then add -z defs, to forbid
50850      # undefined symbols in object files.
50851      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50852      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50853      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50854      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50855      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50856      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50857        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50858      fi
50859      case $DEBUG_LEVEL in
50860        release )
50861          # tell linker to optimize libraries.
50862          # Should this be supplied to the OSS linker as well?
50863          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50864          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50865          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50866          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50867            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50868          fi
50869          ;;
50870        slowdebug )
50871          # Hotspot always let the linker optimize
50872          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50873          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50874            # do relocations at load
50875            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50876            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50877            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50878          fi
50879          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50880            # mark relocations read only
50881            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50882            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50883            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50884          fi
50885          ;;
50886        fastdebug )
50887          # Hotspot always let the linker optimize
50888          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50889          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50890            # mark relocations read only
50891            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50892            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50893            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50894          fi
50895          ;;
50896        * )
50897          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50898          ;;
50899        esac
50900    fi
50901  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50902    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50903    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50904    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50905    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50906    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50907    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50908      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50909    fi
50910  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50911    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50912    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50913    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50914  fi
50915
50916  # Customize LDFLAGS for executables
50917
50918  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50919
50920  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50921    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50922      LDFLAGS_STACK_SIZE=1048576
50923    else
50924      LDFLAGS_STACK_SIZE=327680
50925    fi
50926    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50927  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50928    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50929  fi
50930
50931  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50932
50933  # Customize LDFLAGS for libs
50934  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50935
50936  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50937  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50938    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50939        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50940    JDKLIB_LIBS=""
50941  else
50942    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50943        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50944
50945    if test "xTARGET" = "xTARGET"; then
50946    # On some platforms (mac) the linker warns about non existing -L dirs.
50947    # Add server first if available. Linking aginst client does not always produce the same results.
50948      # Only add client/minimal dir if client/minimal is being built.
50949    # Default to server for other variants.
50950      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50951        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50952      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50953        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50954      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50955        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50956    else
50957        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50958    fi
50959    elif test "xTARGET" = "xBUILD"; then
50960      # When building a buildjdk, it's always only the server variant
50961      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50962          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50963    fi
50964
50965    JDKLIB_LIBS="-ljava -ljvm"
50966    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50967      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50968    fi
50969
50970  fi
50971
50972  # Set JVM_LIBS (per os)
50973  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50974    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50975  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50976    # FIXME: This hard-coded path is not really proper.
50977    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50978      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50979    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50980      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50981    fi
50982    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50983        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50984  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50985    JVM_LIBS="$JVM_LIBS -lm"
50986  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50987    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50988  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50989    JVM_LIBS="$JVM_LIBS -lm"
50990  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50991    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50992        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50993        wsock32.lib winmm.lib version.lib psapi.lib"
50994    fi
50995
50996  # Set JVM_ASFLAGS
50997  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50998    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50999      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51000    fi
51001  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51002    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51003  fi
51004
51005  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021  # Special extras...
51022  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51023    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51024      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51025      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51026    fi
51027    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51028    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51029  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51030    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51031    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51032  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51033    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076    # Execute function body
51077
51078  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51079$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51080  supports=yes
51081
51082  saved_cxxflags="$CXXFLAGS"
51083  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51084  ac_ext=cpp
51085ac_cpp='$CXXCPP $CPPFLAGS'
51086ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51087ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51088ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51089
51090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51091/* end confdefs.h.  */
51092int i;
51093_ACEOF
51094if ac_fn_cxx_try_compile "$LINENO"; then :
51095
51096else
51097  supports=no
51098fi
51099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51100  ac_ext=cpp
51101ac_cpp='$CXXCPP $CPPFLAGS'
51102ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51103ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51104ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51105
51106  CXXFLAGS="$saved_cxxflags"
51107
51108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51109$as_echo "$supports" >&6; }
51110  if test "x$supports" = "xyes" ; then
51111    :
51112
51113  else
51114    :
51115    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51116  fi
51117
51118
51119
51120
51121
51122
51123
51124
51125
51126
51127
51128
51129    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51130
51131  fi
51132  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51133    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51134    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51135    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
51136    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51137    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51138  fi
51139
51140  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51141    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51142    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51143    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
51144  fi
51145
51146  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51147  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51148  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51149
51150  ###############################################################################
51151  #
51152  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51153  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51154  #
51155
51156  # Setup compiler/platform specific flags into
51157  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51158  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51159  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51160  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51161    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51162    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51163    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51164    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51165      # Force compatibility with i586 on 32 bit intel platforms.
51166      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51167      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51168    fi
51169    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51170        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51171    case $OPENJDK_BUILD_CPU_ARCH in
51172      arm )
51173        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51174        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51175        ;;
51176      ppc )
51177        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51178        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51179        ;;
51180      * )
51181        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51182        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51183        ;;
51184    esac
51185
51186
51187
51188
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239    # Execute function body
51240
51241  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51242  REFERENCE_VERSION=6
51243
51244  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51245    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
51246  fi
51247
51248  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51249    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51250  fi
51251
51252  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51253  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51254
51255  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51256    :
51257
51258  else
51259    :
51260
51261  fi
51262
51263
51264
51265
51266
51267
51268
51269
51270
51271
51272
51273
51274
51275
51276  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51277    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51278
51279    # Restrict the debug information created by Clang to avoid
51280    # too big object files and speed the build up a little bit
51281    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51282    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51283    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51284      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51285        # Force compatibility with i586 on 32 bit intel platforms.
51286        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51287        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51288      fi
51289      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51290      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51291          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51292      case $OPENJDK_BUILD_CPU_ARCH in
51293        ppc )
51294          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51295          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51296          ;;
51297        * )
51298          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51299          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51300          ;;
51301      esac
51302    fi
51303  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51304    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51305    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51306    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51307      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51308    fi
51309
51310    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51311    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51312  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51313    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51314    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51315    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51316  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51317    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51318        -MD -Zc:wchar_t- -W3 -wd4800 \
51319        -DWIN32_LEAN_AND_MEAN \
51320        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51321        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51322        -DWIN32 -DIAL"
51323    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51324      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51325    else
51326      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51327    fi
51328    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51329    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51330    # studio.
51331    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51332      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51333      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51334      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51335    fi
51336  fi
51337
51338  ###############################################################################
51339
51340  # Adjust flags according to debug level.
51341  case $DEBUG_LEVEL in
51342    fastdebug | slowdebug )
51343      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51344      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51345      JAVAC_FLAGS="$JAVAC_FLAGS -g"
51346      ;;
51347    release )
51348      ;;
51349    * )
51350      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51351      ;;
51352  esac
51353
51354  # Set some common defines. These works for all compilers, but assume
51355  # -D is universally accepted.
51356
51357  # Setup endianness
51358  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51359    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51360    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51361    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51362    #   Note: -Dmacro         is the same as    #define macro 1
51363    #         -Dmacro=        is the same as    #define macro
51364    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51365      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51366    else
51367      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51368    fi
51369  else
51370    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51371    # are defined in the system?
51372    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51373      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51374    else
51375      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51376    fi
51377  fi
51378
51379  # Setup target OS define. Use OS target name but in upper case.
51380  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51381  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51382
51383  # Setup target CPU
51384  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51385      $OPENJDK_BUILD_ADD_LP64 \
51386      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51387
51388  # Setup debug/release defines
51389  if test "x$DEBUG_LEVEL" = xrelease; then
51390    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51391    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51392      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51393    fi
51394  else
51395    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51396  fi
51397
51398  # Set some additional per-OS defines.
51399  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51400    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51401    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
51402        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51403  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51404    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51405    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51406        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
51407  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51408    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51409    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51410    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51411    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51412        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51413        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51414        -fno-omit-frame-pointer"
51415  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51416    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51417    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51418    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51419        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51420        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51421  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51422    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51423  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51424    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51425    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51426  fi
51427
51428  # Set some additional per-CPU defines.
51429  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51430    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51431  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51432    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51433  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51434    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51435      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51436      # fixes `relocation truncated to fit' error for gcc 4.1.
51437      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51438      # Use ppc64 instructions, but schedule for power5
51439      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51440    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51441      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51442    fi
51443  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51444    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51445      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51446      # Little endian machine uses ELFv2 ABI.
51447      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51448      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51449      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
51450    fi
51451  fi
51452
51453  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51454    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51455  fi
51456
51457  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51458    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51459      # Solaris does not have _LP64=1 in the old build.
51460      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51461      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51462    fi
51463  fi
51464
51465  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51466  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51467    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51468        -Wunused-value -Woverloaded-virtual"
51469
51470    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525    # Execute function body
51526
51527  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51528  REFERENCE_VERSION=4.8
51529
51530  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51531    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51532  fi
51533
51534  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51535    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51536  fi
51537
51538  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51539  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51540
51541  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51542    :
51543
51544            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51545            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51546
51547
51548  else
51549    :
51550
51551  fi
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566    fi
51567    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51568      # Non-zero builds have stricter warnings
51569      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51570    else
51571      if test "x$TOOLCHAIN_TYPE" = xclang; then
51572        # Some versions of llvm do not like -Wundef
51573        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51574      fi
51575    fi
51576  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51577    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51578        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51579  fi
51580
51581  # Additional macosx handling
51582  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51583    # Setting these parameters makes it an error to link to macosx APIs that are
51584    # newer than the given OS version and makes the linked binaries compatible
51585    # even if built on a newer version of the OS.
51586    # The expected format is X.Y.Z
51587    MACOSX_VERSION_MIN=10.7.0
51588
51589
51590    # The macro takes the version with no dots, ex: 1070
51591    # Let the flags variables get resolved in make for easier override on make
51592    # command line.
51593    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)"
51594    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51595  fi
51596
51597  # Setup some hard coded includes
51598  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51599      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51600      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51601      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51602      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51603      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51604
51605  # The shared libraries are compiled using the picflag.
51606  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51607      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51608  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51609      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51610
51611  # Executable flags
51612  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51613  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51614
51615
51616
51617
51618
51619
51620  # Setup LDFLAGS et al.
51621  #
51622
51623  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51624    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51625    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51626    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51627    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51628      LDFLAGS_SAFESH="-safeseh"
51629      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51630      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51631      # NOTE: Old build added -machine. Probably not needed.
51632      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51633    else
51634      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51635    fi
51636  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51637      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51638      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51639        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51640        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51641    fi
51642  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51643    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51644    # We have previously set HAS_GNU_HASH if this is the case
51645    if test -n "$HAS_GNU_HASH"; then
51646      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51647      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51648      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51649    fi
51650      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51651        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51652    fi
51653    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51654      # And since we now know that the linker is gnu, then add -z defs, to forbid
51655      # undefined symbols in object files.
51656      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51657      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51658      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51659      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51660      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51661      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51662        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51663      fi
51664      case $DEBUG_LEVEL in
51665        release )
51666          # tell linker to optimize libraries.
51667          # Should this be supplied to the OSS linker as well?
51668          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51669          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51670          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51671          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51672            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51673          fi
51674          ;;
51675        slowdebug )
51676          # Hotspot always let the linker optimize
51677          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51678          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51679            # do relocations at load
51680            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51681            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51682            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51683          fi
51684          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51685            # mark relocations read only
51686            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51687            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51688            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51689          fi
51690          ;;
51691        fastdebug )
51692          # Hotspot always let the linker optimize
51693          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51694          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51695            # mark relocations read only
51696            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51697            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51698            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51699          fi
51700          ;;
51701        * )
51702          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51703          ;;
51704        esac
51705    fi
51706  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51707    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51708    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
51709    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51710    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51711    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51712    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51713      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51714    fi
51715  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51716    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51717    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51718    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51719  fi
51720
51721  # Customize LDFLAGS for executables
51722
51723  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51724
51725  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51726    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51727      LDFLAGS_STACK_SIZE=1048576
51728    else
51729      LDFLAGS_STACK_SIZE=327680
51730    fi
51731    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51732  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51733    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51734  fi
51735
51736  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51737
51738  # Customize LDFLAGS for libs
51739  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51740
51741  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51742  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51743    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51744        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51745    OPENJDK_BUILD_JDKLIB_LIBS=""
51746  else
51747    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51748        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51749
51750    if test "xBUILD" = "xTARGET"; then
51751    # On some platforms (mac) the linker warns about non existing -L dirs.
51752    # Add server first if available. Linking aginst client does not always produce the same results.
51753      # Only add client/minimal dir if client/minimal is being built.
51754    # Default to server for other variants.
51755      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51756        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51757      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51758        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51759      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51760        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51761    else
51762        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51763    fi
51764    elif test "xBUILD" = "xBUILD"; then
51765      # When building a buildjdk, it's always only the server variant
51766      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51767          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51768    fi
51769
51770    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51771    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51772      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51773    fi
51774
51775  fi
51776
51777  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51778  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51779    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51780  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51781    # FIXME: This hard-coded path is not really proper.
51782    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51783      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51784    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51785      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51786    fi
51787    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51788        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51789  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51790    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51791  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51792    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51793  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51794    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51795  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51796    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51797        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51798        wsock32.lib winmm.lib version.lib psapi.lib"
51799    fi
51800
51801  # Set OPENJDK_BUILD_JVM_ASFLAGS
51802  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51803    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51804      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51805    fi
51806  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51807    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51808  fi
51809
51810  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826  # Tests are only ever compiled for TARGET
51827  # Flags for compiling test libraries
51828  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51829  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51830
51831  # Flags for compiling test executables
51832  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51833  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51834
51835
51836
51837
51838
51839
51840  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51841  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51842
51843
51844
51845
51846
51847
51848  # Some Zero and Shark settings.
51849  # ZERO_ARCHFLAG tells the compiler which mode to build for
51850  case "${OPENJDK_TARGET_CPU}" in
51851    s390)
51852      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51853      ;;
51854    *)
51855      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51856  esac
51857
51858
51859
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899    # Execute function body
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948    # Execute function body
51949
51950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51951$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51952  supports=yes
51953
51954  saved_cflags="$CFLAGS"
51955  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51956  ac_ext=c
51957ac_cpp='$CPP $CPPFLAGS'
51958ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51959ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51960ac_compiler_gnu=$ac_cv_c_compiler_gnu
51961
51962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51963/* end confdefs.h.  */
51964int i;
51965_ACEOF
51966if ac_fn_c_try_compile "$LINENO"; then :
51967
51968else
51969  supports=no
51970fi
51971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51972  ac_ext=cpp
51973ac_cpp='$CXXCPP $CPPFLAGS'
51974ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51975ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51976ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51977
51978  CFLAGS="$saved_cflags"
51979
51980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51981$as_echo "$supports" >&6; }
51982  if test "x$supports" = "xyes" ; then
51983    :
51984    C_COMP_SUPPORTS="yes"
51985  else
51986    :
51987    C_COMP_SUPPORTS="no"
51988  fi
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
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    # Execute function body
52049
52050  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
52051$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
52052  supports=yes
52053
52054  saved_cxxflags="$CXXFLAGS"
52055  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
52056  ac_ext=cpp
52057ac_cpp='$CXXCPP $CPPFLAGS'
52058ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52059ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52060ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52061
52062  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52063/* end confdefs.h.  */
52064int i;
52065_ACEOF
52066if ac_fn_cxx_try_compile "$LINENO"; then :
52067
52068else
52069  supports=no
52070fi
52071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52072  ac_ext=cpp
52073ac_cpp='$CXXCPP $CPPFLAGS'
52074ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52075ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52076ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52077
52078  CXXFLAGS="$saved_cxxflags"
52079
52080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52081$as_echo "$supports" >&6; }
52082  if test "x$supports" = "xyes" ; then
52083    :
52084    CXX_COMP_SUPPORTS="yes"
52085  else
52086    :
52087    CXX_COMP_SUPPORTS="no"
52088  fi
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
52103$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
52104  supports=no
52105  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52106
52107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52108$as_echo "$supports" >&6; }
52109  if test "x$supports" = "xyes" ; then
52110    :
52111
52112  else
52113    :
52114    ZERO_ARCHFLAG=""
52115  fi
52116
52117
52118
52119
52120
52121
52122
52123
52124  # Check that the compiler supports -mX (or -qX on AIX) flags
52125  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173    # Execute function body
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222    # Execute function body
52223
52224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52225$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52226  supports=yes
52227
52228  saved_cflags="$CFLAGS"
52229  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52230  ac_ext=c
52231ac_cpp='$CPP $CPPFLAGS'
52232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52234ac_compiler_gnu=$ac_cv_c_compiler_gnu
52235
52236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52237/* end confdefs.h.  */
52238int i;
52239_ACEOF
52240if ac_fn_c_try_compile "$LINENO"; then :
52241
52242else
52243  supports=no
52244fi
52245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52246  ac_ext=cpp
52247ac_cpp='$CXXCPP $CPPFLAGS'
52248ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52249ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52250ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52251
52252  CFLAGS="$saved_cflags"
52253
52254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52255$as_echo "$supports" >&6; }
52256  if test "x$supports" = "xyes" ; then
52257    :
52258    C_COMP_SUPPORTS="yes"
52259  else
52260    :
52261    C_COMP_SUPPORTS="no"
52262  fi
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322    # Execute function body
52323
52324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52325$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52326  supports=yes
52327
52328  saved_cxxflags="$CXXFLAGS"
52329  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52330  ac_ext=cpp
52331ac_cpp='$CXXCPP $CPPFLAGS'
52332ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52333ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52334ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52335
52336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52337/* end confdefs.h.  */
52338int i;
52339_ACEOF
52340if ac_fn_cxx_try_compile "$LINENO"; then :
52341
52342else
52343  supports=no
52344fi
52345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52346  ac_ext=cpp
52347ac_cpp='$CXXCPP $CPPFLAGS'
52348ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52349ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52350ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52351
52352  CXXFLAGS="$saved_cxxflags"
52353
52354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52355$as_echo "$supports" >&6; }
52356  if test "x$supports" = "xyes" ; then
52357    :
52358    CXX_COMP_SUPPORTS="yes"
52359  else
52360    :
52361    CXX_COMP_SUPPORTS="no"
52362  fi
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52377$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52378  supports=no
52379  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52380
52381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52382$as_echo "$supports" >&6; }
52383  if test "x$supports" = "xyes" ; then
52384    :
52385    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52386  else
52387    :
52388    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52389  fi
52390
52391
52392
52393
52394
52395
52396
52397
52398  # Check whether --enable-warnings-as-errors was given.
52399if test "${enable_warnings_as_errors+set}" = set; then :
52400  enableval=$enable_warnings_as_errors;
52401fi
52402
52403
52404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52405$as_echo_n "checking if native warnings are errors... " >&6; }
52406  if test "x$enable_warnings_as_errors" = "xyes"; then
52407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
52408$as_echo "yes (explicitely set)" >&6; }
52409    WARNINGS_AS_ERRORS=true
52410  elif test "x$enable_warnings_as_errors" = "xno"; then
52411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52412$as_echo "no" >&6; }
52413    WARNINGS_AS_ERRORS=false
52414  elif test "x$enable_warnings_as_errors" = "x"; then
52415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52416$as_echo "yes (default)" >&6; }
52417    WARNINGS_AS_ERRORS=true
52418  else
52419    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52420  fi
52421
52422  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52423    # Set legacy hotspot variable
52424    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52425  else
52426    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52427  fi
52428
52429
52430
52431
52432  case "${TOOLCHAIN_TYPE}" in
52433    microsoft)
52434      DISABLE_WARNING_PREFIX="-wd"
52435      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52436      ;;
52437    solstudio)
52438      DISABLE_WARNING_PREFIX="-erroff="
52439      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52440      ;;
52441    gcc)
52442      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490    # Execute function body
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539    # Execute function body
52540
52541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52542$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52543  supports=yes
52544
52545  saved_cflags="$CFLAGS"
52546  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52547  ac_ext=c
52548ac_cpp='$CPP $CPPFLAGS'
52549ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52550ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52551ac_compiler_gnu=$ac_cv_c_compiler_gnu
52552
52553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52554/* end confdefs.h.  */
52555int i;
52556_ACEOF
52557if ac_fn_c_try_compile "$LINENO"; then :
52558
52559else
52560  supports=no
52561fi
52562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52563  ac_ext=cpp
52564ac_cpp='$CXXCPP $CPPFLAGS'
52565ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52566ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52567ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52568
52569  CFLAGS="$saved_cflags"
52570
52571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52572$as_echo "$supports" >&6; }
52573  if test "x$supports" = "xyes" ; then
52574    :
52575    C_COMP_SUPPORTS="yes"
52576  else
52577    :
52578    C_COMP_SUPPORTS="no"
52579  fi
52580
52581
52582
52583
52584
52585
52586
52587
52588
52589
52590
52591
52592
52593
52594
52595
52596
52597
52598
52599
52600
52601
52602
52603
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639    # Execute function body
52640
52641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52642$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52643  supports=yes
52644
52645  saved_cxxflags="$CXXFLAGS"
52646  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52647  ac_ext=cpp
52648ac_cpp='$CXXCPP $CPPFLAGS'
52649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52652
52653  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52654/* end confdefs.h.  */
52655int i;
52656_ACEOF
52657if ac_fn_cxx_try_compile "$LINENO"; then :
52658
52659else
52660  supports=no
52661fi
52662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52663  ac_ext=cpp
52664ac_cpp='$CXXCPP $CPPFLAGS'
52665ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52666ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52667ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52668
52669  CXXFLAGS="$saved_cxxflags"
52670
52671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52672$as_echo "$supports" >&6; }
52673  if test "x$supports" = "xyes" ; then
52674    :
52675    CXX_COMP_SUPPORTS="yes"
52676  else
52677    :
52678    CXX_COMP_SUPPORTS="no"
52679  fi
52680
52681
52682
52683
52684
52685
52686
52687
52688
52689
52690
52691
52692
52693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52694$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52695  supports=no
52696  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52697
52698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52699$as_echo "$supports" >&6; }
52700  if test "x$supports" = "xyes" ; then
52701    :
52702    GCC_CAN_DISABLE_WARNINGS=true
52703  else
52704    :
52705    GCC_CAN_DISABLE_WARNINGS=false
52706
52707  fi
52708
52709
52710
52711
52712
52713
52714      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52715        DISABLE_WARNING_PREFIX="-Wno-"
52716      else
52717        DISABLE_WARNING_PREFIX=
52718      fi
52719      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52720      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52721      # CFLAGS since any target specific flags will likely not work with the
52722      # build compiler
52723      CC_OLD="$CC"
52724      CXX_OLD="$CXX"
52725      CC="$BUILD_CC"
52726      CXX="$BUILD_CXX"
52727      CFLAGS_OLD="$CFLAGS"
52728      CFLAGS=""
52729
52730
52731
52732
52733
52734
52735
52736
52737
52738
52739
52740
52741
52742
52743
52744
52745
52746
52747
52748
52749
52750
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776    # Execute function body
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795
52796
52797
52798
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825    # Execute function body
52826
52827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52828$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52829  supports=yes
52830
52831  saved_cflags="$CFLAGS"
52832  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52833  ac_ext=c
52834ac_cpp='$CPP $CPPFLAGS'
52835ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52836ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52837ac_compiler_gnu=$ac_cv_c_compiler_gnu
52838
52839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52840/* end confdefs.h.  */
52841int i;
52842_ACEOF
52843if ac_fn_c_try_compile "$LINENO"; then :
52844
52845else
52846  supports=no
52847fi
52848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52849  ac_ext=cpp
52850ac_cpp='$CXXCPP $CPPFLAGS'
52851ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52852ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52853ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52854
52855  CFLAGS="$saved_cflags"
52856
52857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52858$as_echo "$supports" >&6; }
52859  if test "x$supports" = "xyes" ; then
52860    :
52861    C_COMP_SUPPORTS="yes"
52862  else
52863    :
52864    C_COMP_SUPPORTS="no"
52865  fi
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875
52876
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925    # Execute function body
52926
52927  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52928$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52929  supports=yes
52930
52931  saved_cxxflags="$CXXFLAGS"
52932  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52933  ac_ext=cpp
52934ac_cpp='$CXXCPP $CPPFLAGS'
52935ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52936ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52937ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52938
52939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52940/* end confdefs.h.  */
52941int i;
52942_ACEOF
52943if ac_fn_cxx_try_compile "$LINENO"; then :
52944
52945else
52946  supports=no
52947fi
52948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52949  ac_ext=cpp
52950ac_cpp='$CXXCPP $CPPFLAGS'
52951ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52952ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52953ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52954
52955  CXXFLAGS="$saved_cxxflags"
52956
52957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52958$as_echo "$supports" >&6; }
52959  if test "x$supports" = "xyes" ; then
52960    :
52961    CXX_COMP_SUPPORTS="yes"
52962  else
52963    :
52964    CXX_COMP_SUPPORTS="no"
52965  fi
52966
52967
52968
52969
52970
52971
52972
52973
52974
52975
52976
52977
52978
52979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52980$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52981  supports=no
52982  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52983
52984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52985$as_echo "$supports" >&6; }
52986  if test "x$supports" = "xyes" ; then
52987    :
52988    BUILD_CC_CAN_DISABLE_WARNINGS=true
52989  else
52990    :
52991    BUILD_CC_CAN_DISABLE_WARNINGS=false
52992
52993  fi
52994
52995
52996
52997
52998
52999
53000      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53001        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53002      else
53003        BUILD_CC_DISABLE_WARNING_PREFIX=
53004      fi
53005      CC="$CC_OLD"
53006      CXX="$CXX_OLD"
53007      CFLAGS="$CFLAGS_OLD"
53008      ;;
53009    clang)
53010      DISABLE_WARNING_PREFIX="-Wno-"
53011      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53012      ;;
53013    xlc)
53014      DISABLE_WARNING_PREFIX="-qsuppress="
53015      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53016      ;;
53017  esac
53018
53019
53020
53021
53022
53023# Setup debug symbols (need objcopy from the toolchain for that)
53024
53025  #
53026  # NATIVE_DEBUG_SYMBOLS
53027  # This must be done after the toolchain is setup, since we're looking at objcopy.
53028  #
53029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53030$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53031
53032# Check whether --with-native-debug-symbols was given.
53033if test "${with_native_debug_symbols+set}" = set; then :
53034  withval=$with_native_debug_symbols;
53035        if test "x$OPENJDK_TARGET_OS" = xaix; then
53036          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53037            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53038          fi
53039        fi
53040
53041else
53042
53043        if test "x$OPENJDK_TARGET_OS" = xaix; then
53044          # AIX doesn't support 'zipped' so use 'internal' as default
53045          with_native_debug_symbols="internal"
53046        else
53047          if test "x$STATIC_BUILD" = xtrue; then
53048            with_native_debug_symbols="none"
53049          else
53050            with_native_debug_symbols="zipped"
53051          fi
53052        fi
53053
53054fi
53055
53056  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53058$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53059
53060  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53061
53062    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53063      if test "x$OBJCOPY" = x; then
53064        # enabling of enable-debug-symbols and can't find objcopy
53065        # this is an error
53066        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53067      fi
53068    fi
53069
53070    COMPILE_WITH_DEBUG_SYMBOLS=true
53071    COPY_DEBUG_SYMBOLS=true
53072    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53073
53074    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
53075    DEBUG_BINARIES=false
53076    STRIP_POLICY=min_strip
53077
53078  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53079    COMPILE_WITH_DEBUG_SYMBOLS=false
53080    COPY_DEBUG_SYMBOLS=false
53081    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53082
53083    DEBUG_BINARIES=false
53084    STRIP_POLICY=no_strip
53085  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53086    COMPILE_WITH_DEBUG_SYMBOLS=true
53087    COPY_DEBUG_SYMBOLS=false
53088    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53089
53090    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
53091    DEBUG_BINARIES=true
53092    STRIP_POLICY=no_strip
53093    STRIP=""
53094
53095  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53096
53097    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53098      if test "x$OBJCOPY" = x; then
53099        # enabling of enable-debug-symbols and can't find objcopy
53100        # this is an error
53101        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53102      fi
53103    fi
53104
53105    COMPILE_WITH_DEBUG_SYMBOLS=true
53106    COPY_DEBUG_SYMBOLS=true
53107    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53108
53109    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
53110    DEBUG_BINARIES=false
53111    STRIP_POLICY=min_strip
53112  else
53113    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53114  fi
53115
53116  # --enable-debug-symbols is deprecated.
53117  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53118
53119  # Check whether --enable-debug-symbols was given.
53120if test "${enable_debug_symbols+set}" = set; then :
53121  enableval=$enable_debug_symbols;
53122fi
53123
53124  if test "x$enable_debug_symbols" != x; then
53125    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53126$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53127
53128    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53129      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53130$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53131    fi
53132
53133  fi
53134
53135
53136  # --enable-zip-debug-info is deprecated.
53137  # Please use --with-native-debug-symbols=zipped .
53138
53139  # Check whether --enable-zip-debug-info was given.
53140if test "${enable_zip_debug_info+set}" = set; then :
53141  enableval=$enable_zip_debug_info;
53142fi
53143
53144  if test "x$enable_zip_debug_info" != x; then
53145    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53146$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53147
53148    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53149      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53150$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53151    fi
53152
53153  fi
53154
53155
53156
53157
53158
53159
53160  # Legacy values
53161
53162
53163
53164
53165  # Check whether --enable-native-coverage was given.
53166if test "${enable_native_coverage+set}" = set; then :
53167  enableval=$enable_native_coverage;
53168fi
53169
53170  GCOV_ENABLED="false"
53171  if test "x$enable_native_coverage" = "xyes"; then
53172    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53173      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53174$as_echo_n "checking if native coverage is enabled... " >&6; }
53175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53176$as_echo "yes" >&6; }
53177      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53178      GCOV_LDFLAGS="-fprofile-arcs"
53179      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
53180      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
53181      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
53182      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53183      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53184      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53185      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53186      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53187      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53188      GCOV_ENABLED="true"
53189    else
53190      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53191    fi
53192  elif test "x$enable_native_coverage" = "xno"; then
53193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53194$as_echo_n "checking if native coverage is enabled... " >&6; }
53195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53196$as_echo "no" >&6; }
53197  elif test "x$enable_native_coverage" != "x"; then
53198    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53199  fi
53200
53201
53202
53203
53204# Need toolchain to setup dtrace
53205
53206  # Test for dtrace dependencies
53207  # Check whether --enable-dtrace was given.
53208if test "${enable_dtrace+set}" = set; then :
53209  enableval=$enable_dtrace;
53210fi
53211
53212
53213  DTRACE_DEP_MISSING=false
53214
53215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53216$as_echo_n "checking for dtrace tool... " >&6; }
53217  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53219$as_echo "$DTRACE" >&6; }
53220  else
53221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53222$as_echo "not found, cannot build dtrace" >&6; }
53223    DTRACE_DEP_MISSING=true
53224  fi
53225
53226  for ac_header in sys/sdt.h
53227do :
53228  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53229if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53230  cat >>confdefs.h <<_ACEOF
53231#define HAVE_SYS_SDT_H 1
53232_ACEOF
53233 DTRACE_HEADERS_OK=yes
53234else
53235  DTRACE_HEADERS_OK=no
53236fi
53237
53238done
53239
53240  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53241    DTRACE_DEP_MISSING=true
53242  fi
53243
53244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53245$as_echo_n "checking if dtrace should be built... " >&6; }
53246  if test "x$enable_dtrace" = "xyes"; then
53247    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53249$as_echo "no, missing dependencies" >&6; }
53250
53251  # Print a helpful message on how to acquire the necessary build dependency.
53252  # dtrace is the help tag: freetype, cups, alsa etc
53253  MISSING_DEPENDENCY=dtrace
53254
53255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53256    cygwin_help $MISSING_DEPENDENCY
53257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53258    msys_help $MISSING_DEPENDENCY
53259  else
53260    PKGHANDLER_COMMAND=
53261
53262    case $PKGHANDLER in
53263      apt-get)
53264        apt_help     $MISSING_DEPENDENCY ;;
53265      yum)
53266        yum_help     $MISSING_DEPENDENCY ;;
53267      port)
53268        port_help    $MISSING_DEPENDENCY ;;
53269      pkgutil)
53270        pkgutil_help $MISSING_DEPENDENCY ;;
53271      pkgadd)
53272        pkgadd_help  $MISSING_DEPENDENCY ;;
53273    esac
53274
53275    if test "x$PKGHANDLER_COMMAND" != x; then
53276      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53277    fi
53278  fi
53279
53280      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53281    else
53282      INCLUDE_DTRACE=true
53283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53284$as_echo "yes, forced" >&6; }
53285    fi
53286  elif test "x$enable_dtrace" = "xno"; then
53287    INCLUDE_DTRACE=false
53288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53289$as_echo "no, forced" >&6; }
53290  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53291    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53292      INCLUDE_DTRACE=false
53293      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53294$as_echo "no, missing dependencies" >&6; }
53295    else
53296      INCLUDE_DTRACE=true
53297      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53298$as_echo "yes, dependencies present" >&6; }
53299    fi
53300  else
53301    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53302  fi
53303
53304
53305
53306  # The user can in some cases supply additional jvm features. For the custom
53307  # variant, this defines the entire variant.
53308
53309# Check whether --with-jvm-features was given.
53310if test "${with_jvm_features+set}" = set; then :
53311  withval=$with_jvm_features;
53312fi
53313
53314  if test "x$with_jvm_features" != x; then
53315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
53316$as_echo_n "checking additional JVM features... " >&6; }
53317    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
53318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
53319$as_echo "$JVM_FEATURES" >&6; }
53320  fi
53321
53322  # Verify that dependencies are met for explicitly set features.
53323  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
53324    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
53325  fi
53326
53327  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
53328    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
53329  fi
53330
53331  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
53332    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
53333  fi
53334
53335  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53336    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
53337  fi
53338
53339  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53340    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
53341  fi
53342
53343  # Turn on additional features based on other parts of configure
53344  if test "x$INCLUDE_DTRACE" = "xtrue"; then
53345    JVM_FEATURES="$JVM_FEATURES dtrace"
53346  else
53347    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
53348      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
53349    fi
53350  fi
53351
53352  if test "x$STATIC_BUILD" = "xtrue"; then
53353    JVM_FEATURES="$JVM_FEATURES static-build"
53354  else
53355    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
53356      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
53357    fi
53358  fi
53359
53360  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53361    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
53362      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
53363    fi
53364  fi
53365
53366  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53367    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
53368      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
53369    fi
53370  fi
53371
53372  # Only enable jvmci on x86_64, sparcv9 and aarch64.
53373  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
53374      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
53375      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
53376    JVM_FEATURES_jvmci="jvmci"
53377  else
53378    JVM_FEATURES_jvmci=""
53379  fi
53380
53381  # All variants but minimal (and custom) get these features
53382  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
53383
53384  # Enable features depending on variant.
53385  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
53386  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
53387  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
53388  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
53389  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
53390  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
53391  JVM_FEATURES_custom="$JVM_FEATURES"
53392
53393
53394
53395
53396
53397
53398
53399
53400
53401  # Used for verification of Makefiles by check-jvm-feature
53402
53403
53404  # We don't support --with-jvm-interpreter anymore, use zero instead.
53405
53406
53407# Check whether --with-jvm-interpreter was given.
53408if test "${with_jvm_interpreter+set}" = set; then :
53409  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
53410$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
53411fi
53412
53413
53414
53415
53416  # Check whether --enable-hotspot-gtest was given.
53417if test "${enable_hotspot_gtest+set}" = set; then :
53418  enableval=$enable_hotspot_gtest;
53419fi
53420
53421
53422  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53423    GTEST_DIR_EXISTS="true"
53424  else
53425    GTEST_DIR_EXISTS="false"
53426  fi
53427
53428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53429$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53430  if test "x$enable_hotspot_gtest" = "xyes"; then
53431    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53433$as_echo "yes, forced" >&6; }
53434      BUILD_GTEST="true"
53435    else
53436      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53437    fi
53438  elif test "x$enable_hotspot_gtest" = "xno"; then
53439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53440$as_echo "no, forced" >&6; }
53441    BUILD_GTEST="false"
53442  elif test "x$enable_hotspot_gtest" = "x"; then
53443    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
53444      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53445$as_echo "yes" >&6; }
53446      BUILD_GTEST="true"
53447    else
53448      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53449$as_echo "no" >&6; }
53450      BUILD_GTEST="false"
53451    fi
53452  else
53453    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53454  fi
53455
53456
53457
53458
53459###############################################################################
53460#
53461# Check dependencies for external and internal libraries.
53462#
53463###############################################################################
53464
53465# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53466
53467  # When using cygwin or msys, we need a wrapper binary that renames
53468  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53469  # @files and rewrites these too! This wrapper binary is
53470  # called fixpath.
53471  FIXPATH=
53472  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53474$as_echo_n "checking if fixpath can be created... " >&6; }
53475    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53476    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53477    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53478    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53479      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53480      FIXPATH="$FIXPATH_BIN -c"
53481    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53482      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53483      # @ was chosen as separator to minimize risk of other tools messing around with it
53484      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53485          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53486      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53487      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53488    fi
53489    FIXPATH_SRC_W="$FIXPATH_SRC"
53490    FIXPATH_BIN_W="$FIXPATH_BIN"
53491
53492  unix_path="$FIXPATH_SRC_W"
53493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53494    windows_path=`$CYGPATH -m "$unix_path"`
53495    FIXPATH_SRC_W="$windows_path"
53496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53497    windows_path=`cmd //c echo $unix_path`
53498    FIXPATH_SRC_W="$windows_path"
53499  fi
53500
53501
53502  unix_path="$FIXPATH_BIN_W"
53503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53504    windows_path=`$CYGPATH -m "$unix_path"`
53505    FIXPATH_BIN_W="$windows_path"
53506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53507    windows_path=`cmd //c echo $unix_path`
53508    FIXPATH_BIN_W="$windows_path"
53509  fi
53510
53511    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53512    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53513    cd $FIXPATH_DIR
53514    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53515    cd $CURDIR
53516
53517    if test ! -x $FIXPATH_BIN; then
53518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53519$as_echo "no" >&6; }
53520      cat $FIXPATH_DIR/fixpath1.log
53521      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53522    fi
53523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53524$as_echo "yes" >&6; }
53525    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53526$as_echo_n "checking if fixpath.exe works... " >&6; }
53527    cd $FIXPATH_DIR
53528    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53529        > $FIXPATH_DIR/fixpath2.log 2>&1
53530    cd $CURDIR
53531    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53533$as_echo "no" >&6; }
53534      cat $FIXPATH_DIR/fixpath2.log
53535      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53536    fi
53537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53538$as_echo "yes" >&6; }
53539
53540    FIXPATH_DETACH_FLAG="--detach"
53541  fi
53542
53543
53544
53545
53546
53547
53548  # Check if X11 is needed
53549  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53550    # No X11 support on windows or macosx
53551    NEEDS_LIB_X11=false
53552  else
53553    if test "x$SUPPORT_HEADFUL" = xno; then
53554      # No X11 support if building headless-only
53555      NEEDS_LIB_X11=false
53556    else
53557      # All other instances need X11
53558      NEEDS_LIB_X11=true
53559    fi
53560  fi
53561
53562  # Check if cups is needed
53563  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53564    # Windows have a separate print system
53565    NEEDS_LIB_CUPS=false
53566  else
53567    NEEDS_LIB_CUPS=true
53568  fi
53569
53570  # A custom hook may have set this already
53571  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53572    NEEDS_LIB_FREETYPE=true
53573  fi
53574
53575  # Check if alsa is needed
53576  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53577    NEEDS_LIB_ALSA=true
53578  else
53579    NEEDS_LIB_ALSA=false
53580  fi
53581
53582  # Check if ffi is needed
53583  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53584    NEEDS_LIB_FFI=true
53585  else
53586    NEEDS_LIB_FFI=false
53587  fi
53588
53589
53590  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53591  # dynamic build is configured on command line.
53592
53593# Check whether --with-stdc++lib was given.
53594if test "${with_stdc__lib+set}" = set; then :
53595  withval=$with_stdc__lib;
53596        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53597                && test "x$with_stdc__lib" != xdefault; then
53598          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53599        fi
53600
53601else
53602  with_stdc__lib=default
53603
53604fi
53605
53606
53607  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53608    # Test if -lstdc++ works.
53609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53610$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53611    ac_ext=cpp
53612ac_cpp='$CXXCPP $CPPFLAGS'
53613ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53614ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53615ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53616
53617    OLD_CXXFLAGS="$CXXFLAGS"
53618    CXXFLAGS="$CXXFLAGS -lstdc++"
53619    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53620/* end confdefs.h.  */
53621
53622int
53623main ()
53624{
53625return 0;
53626  ;
53627  return 0;
53628}
53629_ACEOF
53630if ac_fn_cxx_try_link "$LINENO"; then :
53631  has_dynamic_libstdcxx=yes
53632else
53633  has_dynamic_libstdcxx=no
53634fi
53635rm -f core conftest.err conftest.$ac_objext \
53636    conftest$ac_exeext conftest.$ac_ext
53637    CXXFLAGS="$OLD_CXXFLAGS"
53638    ac_ext=cpp
53639ac_cpp='$CXXCPP $CPPFLAGS'
53640ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53641ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53642ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53643
53644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53645$as_echo "$has_dynamic_libstdcxx" >&6; }
53646
53647    # Test if stdc++ can be linked statically.
53648    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53649$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53650    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53651    ac_ext=cpp
53652ac_cpp='$CXXCPP $CPPFLAGS'
53653ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53654ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53655ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53656
53657    OLD_LIBS="$LIBS"
53658    OLD_CXX="$CXX"
53659    LIBS="$STATIC_STDCXX_FLAGS"
53660    CXX="$CC"
53661    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53662/* end confdefs.h.  */
53663
53664int
53665main ()
53666{
53667return 0;
53668  ;
53669  return 0;
53670}
53671_ACEOF
53672if ac_fn_cxx_try_link "$LINENO"; then :
53673  has_static_libstdcxx=yes
53674else
53675  has_static_libstdcxx=no
53676fi
53677rm -f core conftest.err conftest.$ac_objext \
53678    conftest$ac_exeext conftest.$ac_ext
53679    LIBS="$OLD_LIBS"
53680    CXX="$OLD_CXX"
53681    ac_ext=cpp
53682ac_cpp='$CXXCPP $CPPFLAGS'
53683ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53684ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53685ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53686
53687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53688$as_echo "$has_static_libstdcxx" >&6; }
53689
53690    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53691      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53692    fi
53693
53694    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53695      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53696    fi
53697
53698    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53699      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53700    fi
53701
53702    # If dynamic was requested, it's available since it would fail above otherwise.
53703    # If dynamic wasn't requested, go with static unless it isn't available.
53704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53705$as_echo_n "checking how to link with libstdc++... " >&6; }
53706    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53707      LIBCXX="$LIBCXX -lstdc++"
53708      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53709      JVM_LIBS="-lstdc++ $JVM_LIBS"
53710      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53711      # just use the same setting as for the TARGET toolchain.
53712      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53713      LDCXX="$CXX"
53714      STATIC_CXX_SETTING="STATIC_CXX=false"
53715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53716$as_echo "dynamic" >&6; }
53717    else
53718      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53719      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53720      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53721      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53722      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53723      # just use the same setting as for the TARGET toolchain.
53724      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53725      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53726      LDCXX="$CC"
53727      STATIC_CXX_SETTING="STATIC_CXX=true"
53728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53729$as_echo "static" >&6; }
53730    fi
53731  fi
53732
53733
53734  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53735  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53736    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53737  fi
53738
53739  # TODO better (platform agnostic) test
53740  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53741    LIBCXX="-lstdc++"
53742  fi
53743
53744
53745  # Setup Windows runtime dlls
53746  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53747
53748
53749# Check whether --with-msvcr-dll was given.
53750if test "${with_msvcr_dll+set}" = set; then :
53751  withval=$with_msvcr_dll;
53752fi
53753
53754
53755  if test "x$with_msvcr_dll" != x; then
53756    # If given explicitely by user, do not probe. If not present, fail directly.
53757
53758  DLL_NAME="$MSVCR_NAME"
53759  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53760  METHOD="--with-msvcr-dll"
53761  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53762    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53763$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53764
53765    # Need to check if the found msvcr is correct architecture
53766    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53767$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53768    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53770      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53771      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53772      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53773        CORRECT_MSVCR_ARCH="PE32 executable"
53774      else
53775        CORRECT_MSVCR_ARCH="PE32+ executable"
53776      fi
53777    else
53778      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53779        CORRECT_MSVCR_ARCH=386
53780      else
53781        CORRECT_MSVCR_ARCH=x86-64
53782      fi
53783    fi
53784    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53786$as_echo "ok" >&6; }
53787      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53788
53789  # Only process if variable expands to non-empty
53790
53791  if test "x$MSVC_DLL" != x; then
53792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53793
53794  # Input might be given as Windows format, start by converting to
53795  # unix format.
53796  path="$MSVC_DLL"
53797  new_path=`$CYGPATH -u "$path"`
53798
53799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53802  # "foo.exe" is OK but "foo" is an error.
53803  #
53804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53805  # It is also a way to make sure we got the proper file name for the real test later on.
53806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53807  if test "x$test_shortpath" = x; then
53808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53809$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53810    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53811  fi
53812
53813  # Call helper function which possibly converts this using DOS-style short mode.
53814  # If so, the updated path is stored in $new_path.
53815
53816  input_path="$new_path"
53817  # Check if we need to convert this using DOS-style short mode. If the path
53818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53819  # take no chances and rewrite it.
53820  # Note: m4 eats our [], so we need to use [ and ] instead.
53821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53822  if test "x$has_forbidden_chars" != x; then
53823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53827      # Going to short mode and back again did indeed matter. Since short mode is
53828      # case insensitive, let's make it lowercase to improve readability.
53829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53830      # Now convert it back to Unix-style (cygpath)
53831      input_path=`$CYGPATH -u "$shortmode_path"`
53832      new_path="$input_path"
53833    fi
53834  fi
53835
53836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53837  if test "x$test_cygdrive_prefix" = x; then
53838    # As a simple fix, exclude /usr/bin since it's not a real path.
53839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53841      # a path prefixed by /cygdrive for fixpath to work.
53842      new_path="$CYGWIN_ROOT_PATH$input_path"
53843    fi
53844  fi
53845
53846
53847  if test "x$path" != "x$new_path"; then
53848    MSVC_DLL="$new_path"
53849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53850$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53851  fi
53852
53853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53854
53855  path="$MSVC_DLL"
53856  has_colon=`$ECHO $path | $GREP ^.:`
53857  new_path="$path"
53858  if test "x$has_colon" = x; then
53859    # Not in mixed or Windows style, start by that.
53860    new_path=`cmd //c echo $path`
53861  fi
53862
53863
53864  input_path="$new_path"
53865  # Check if we need to convert this using DOS-style short mode. If the path
53866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53867  # take no chances and rewrite it.
53868  # Note: m4 eats our [], so we need to use [ and ] instead.
53869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53870  if test "x$has_forbidden_chars" != x; then
53871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53873  fi
53874
53875
53876  windows_path="$new_path"
53877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53878    unix_path=`$CYGPATH -u "$windows_path"`
53879    new_path="$unix_path"
53880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53882    new_path="$unix_path"
53883  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53893
53894    else
53895      # We're on a unix platform. Hooray! :)
53896      path="$MSVC_DLL"
53897      has_space=`$ECHO "$path" | $GREP " "`
53898      if test "x$has_space" != x; then
53899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53900$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53902      fi
53903
53904      # Use eval to expand a potential ~
53905      eval path="$path"
53906      if test ! -f "$path" && test ! -d "$path"; then
53907        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53908      fi
53909
53910      if test -d "$path"; then
53911        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53912      else
53913        dir="`$DIRNAME "$path"`"
53914        base="`$BASENAME "$path"`"
53915        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53916      fi
53917    fi
53918  fi
53919
53920      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53921$as_echo_n "checking for $DLL_NAME... " >&6; }
53922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53923$as_echo "$MSVC_DLL" >&6; }
53924    else
53925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53926$as_echo "incorrect, ignoring" >&6; }
53927      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53928$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53929    fi
53930  fi
53931
53932    if test "x$MSVC_DLL" = x; then
53933      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53934    fi
53935    MSVCR_DLL="$MSVC_DLL"
53936  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53937
53938  DLL_NAME="$MSVCR_NAME"
53939  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53940  METHOD="devkit"
53941  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53942    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53943$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53944
53945    # Need to check if the found msvcr is correct architecture
53946    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53947$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53948    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53949    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53950      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53951      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53952      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53953        CORRECT_MSVCR_ARCH="PE32 executable"
53954      else
53955        CORRECT_MSVCR_ARCH="PE32+ executable"
53956      fi
53957    else
53958      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53959        CORRECT_MSVCR_ARCH=386
53960      else
53961        CORRECT_MSVCR_ARCH=x86-64
53962      fi
53963    fi
53964    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53966$as_echo "ok" >&6; }
53967      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53968
53969  # Only process if variable expands to non-empty
53970
53971  if test "x$MSVC_DLL" != x; then
53972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53973
53974  # Input might be given as Windows format, start by converting to
53975  # unix format.
53976  path="$MSVC_DLL"
53977  new_path=`$CYGPATH -u "$path"`
53978
53979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53982  # "foo.exe" is OK but "foo" is an error.
53983  #
53984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53985  # It is also a way to make sure we got the proper file name for the real test later on.
53986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53987  if test "x$test_shortpath" = x; then
53988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53989$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53990    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53991  fi
53992
53993  # Call helper function which possibly converts this using DOS-style short mode.
53994  # If so, the updated path is stored in $new_path.
53995
53996  input_path="$new_path"
53997  # Check if we need to convert this using DOS-style short mode. If the path
53998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53999  # take no chances and rewrite it.
54000  # Note: m4 eats our [], so we need to use [ and ] instead.
54001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54002  if test "x$has_forbidden_chars" != x; then
54003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54007      # Going to short mode and back again did indeed matter. Since short mode is
54008      # case insensitive, let's make it lowercase to improve readability.
54009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54010      # Now convert it back to Unix-style (cygpath)
54011      input_path=`$CYGPATH -u "$shortmode_path"`
54012      new_path="$input_path"
54013    fi
54014  fi
54015
54016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54017  if test "x$test_cygdrive_prefix" = x; then
54018    # As a simple fix, exclude /usr/bin since it's not a real path.
54019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54021      # a path prefixed by /cygdrive for fixpath to work.
54022      new_path="$CYGWIN_ROOT_PATH$input_path"
54023    fi
54024  fi
54025
54026
54027  if test "x$path" != "x$new_path"; then
54028    MSVC_DLL="$new_path"
54029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54030$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54031  fi
54032
54033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54034
54035  path="$MSVC_DLL"
54036  has_colon=`$ECHO $path | $GREP ^.:`
54037  new_path="$path"
54038  if test "x$has_colon" = x; then
54039    # Not in mixed or Windows style, start by that.
54040    new_path=`cmd //c echo $path`
54041  fi
54042
54043
54044  input_path="$new_path"
54045  # Check if we need to convert this using DOS-style short mode. If the path
54046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54047  # take no chances and rewrite it.
54048  # Note: m4 eats our [], so we need to use [ and ] instead.
54049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54050  if test "x$has_forbidden_chars" != x; then
54051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54053  fi
54054
54055
54056  windows_path="$new_path"
54057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54058    unix_path=`$CYGPATH -u "$windows_path"`
54059    new_path="$unix_path"
54060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54062    new_path="$unix_path"
54063  fi
54064
54065  if test "x$path" != "x$new_path"; then
54066    MSVC_DLL="$new_path"
54067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54068$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54069  fi
54070
54071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54073
54074    else
54075      # We're on a unix platform. Hooray! :)
54076      path="$MSVC_DLL"
54077      has_space=`$ECHO "$path" | $GREP " "`
54078      if test "x$has_space" != x; then
54079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54080$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54081        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54082      fi
54083
54084      # Use eval to expand a potential ~
54085      eval path="$path"
54086      if test ! -f "$path" && test ! -d "$path"; then
54087        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54088      fi
54089
54090      if test -d "$path"; then
54091        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54092      else
54093        dir="`$DIRNAME "$path"`"
54094        base="`$BASENAME "$path"`"
54095        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54096      fi
54097    fi
54098  fi
54099
54100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54101$as_echo_n "checking for $DLL_NAME... " >&6; }
54102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54103$as_echo "$MSVC_DLL" >&6; }
54104    else
54105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54106$as_echo "incorrect, ignoring" >&6; }
54107      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54108$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54109    fi
54110  fi
54111
54112    if test "x$MSVC_DLL" = x; then
54113      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54114    fi
54115    MSVCR_DLL="$MSVC_DLL"
54116  else
54117
54118  DLL_NAME="${MSVCR_NAME}"
54119  MSVC_DLL=
54120
54121  if test "x$MSVC_DLL" = x; then
54122    # Probe: Using well-known location from Visual Studio 10.0
54123    if test "x$VCINSTALLDIR" != x; then
54124      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54125
54126  windows_path="$CYGWIN_VC_INSTALL_DIR"
54127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54128    unix_path=`$CYGPATH -u "$windows_path"`
54129    CYGWIN_VC_INSTALL_DIR="$unix_path"
54130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54132    CYGWIN_VC_INSTALL_DIR="$unix_path"
54133  fi
54134
54135      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54136        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54137      else
54138        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54139      fi
54140      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54141
54142  DLL_NAME="$DLL_NAME"
54143  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54144  METHOD="well-known location in VCINSTALLDIR"
54145  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54146    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54147$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54148
54149    # Need to check if the found msvcr is correct architecture
54150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54151$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54152    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54154      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54155      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54156      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54157        CORRECT_MSVCR_ARCH="PE32 executable"
54158      else
54159        CORRECT_MSVCR_ARCH="PE32+ executable"
54160      fi
54161    else
54162      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54163        CORRECT_MSVCR_ARCH=386
54164      else
54165        CORRECT_MSVCR_ARCH=x86-64
54166      fi
54167    fi
54168    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54170$as_echo "ok" >&6; }
54171      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54172
54173  # Only process if variable expands to non-empty
54174
54175  if test "x$MSVC_DLL" != x; then
54176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54177
54178  # Input might be given as Windows format, start by converting to
54179  # unix format.
54180  path="$MSVC_DLL"
54181  new_path=`$CYGPATH -u "$path"`
54182
54183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54186  # "foo.exe" is OK but "foo" is an error.
54187  #
54188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54189  # It is also a way to make sure we got the proper file name for the real test later on.
54190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54191  if test "x$test_shortpath" = x; then
54192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54193$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54194    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54195  fi
54196
54197  # Call helper function which possibly converts this using DOS-style short mode.
54198  # If so, the updated path is stored in $new_path.
54199
54200  input_path="$new_path"
54201  # Check if we need to convert this using DOS-style short mode. If the path
54202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54203  # take no chances and rewrite it.
54204  # Note: m4 eats our [], so we need to use [ and ] instead.
54205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54206  if test "x$has_forbidden_chars" != x; then
54207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54211      # Going to short mode and back again did indeed matter. Since short mode is
54212      # case insensitive, let's make it lowercase to improve readability.
54213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54214      # Now convert it back to Unix-style (cygpath)
54215      input_path=`$CYGPATH -u "$shortmode_path"`
54216      new_path="$input_path"
54217    fi
54218  fi
54219
54220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54221  if test "x$test_cygdrive_prefix" = x; then
54222    # As a simple fix, exclude /usr/bin since it's not a real path.
54223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54225      # a path prefixed by /cygdrive for fixpath to work.
54226      new_path="$CYGWIN_ROOT_PATH$input_path"
54227    fi
54228  fi
54229
54230
54231  if test "x$path" != "x$new_path"; then
54232    MSVC_DLL="$new_path"
54233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54234$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54235  fi
54236
54237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54238
54239  path="$MSVC_DLL"
54240  has_colon=`$ECHO $path | $GREP ^.:`
54241  new_path="$path"
54242  if test "x$has_colon" = x; then
54243    # Not in mixed or Windows style, start by that.
54244    new_path=`cmd //c echo $path`
54245  fi
54246
54247
54248  input_path="$new_path"
54249  # Check if we need to convert this using DOS-style short mode. If the path
54250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54251  # take no chances and rewrite it.
54252  # Note: m4 eats our [], so we need to use [ and ] instead.
54253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54254  if test "x$has_forbidden_chars" != x; then
54255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54257  fi
54258
54259
54260  windows_path="$new_path"
54261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54262    unix_path=`$CYGPATH -u "$windows_path"`
54263    new_path="$unix_path"
54264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54266    new_path="$unix_path"
54267  fi
54268
54269  if test "x$path" != "x$new_path"; then
54270    MSVC_DLL="$new_path"
54271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54272$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54273  fi
54274
54275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54277
54278    else
54279      # We're on a unix platform. Hooray! :)
54280      path="$MSVC_DLL"
54281      has_space=`$ECHO "$path" | $GREP " "`
54282      if test "x$has_space" != x; then
54283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54284$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54286      fi
54287
54288      # Use eval to expand a potential ~
54289      eval path="$path"
54290      if test ! -f "$path" && test ! -d "$path"; then
54291        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54292      fi
54293
54294      if test -d "$path"; then
54295        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54296      else
54297        dir="`$DIRNAME "$path"`"
54298        base="`$BASENAME "$path"`"
54299        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54300      fi
54301    fi
54302  fi
54303
54304      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54305$as_echo_n "checking for $DLL_NAME... " >&6; }
54306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54307$as_echo "$MSVC_DLL" >&6; }
54308    else
54309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54310$as_echo "incorrect, ignoring" >&6; }
54311      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54312$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54313    fi
54314  fi
54315
54316    fi
54317  fi
54318
54319  if test "x$MSVC_DLL" = x; then
54320    # Probe: Check in the Boot JDK directory.
54321    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54322
54323  DLL_NAME="$DLL_NAME"
54324  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54325  METHOD="well-known location in Boot JDK"
54326  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54327    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54328$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54329
54330    # Need to check if the found msvcr is correct architecture
54331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54332$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54333    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54335      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54336      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54337      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54338        CORRECT_MSVCR_ARCH="PE32 executable"
54339      else
54340        CORRECT_MSVCR_ARCH="PE32+ executable"
54341      fi
54342    else
54343      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54344        CORRECT_MSVCR_ARCH=386
54345      else
54346        CORRECT_MSVCR_ARCH=x86-64
54347      fi
54348    fi
54349    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54351$as_echo "ok" >&6; }
54352      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54353
54354  # Only process if variable expands to non-empty
54355
54356  if test "x$MSVC_DLL" != x; then
54357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54358
54359  # Input might be given as Windows format, start by converting to
54360  # unix format.
54361  path="$MSVC_DLL"
54362  new_path=`$CYGPATH -u "$path"`
54363
54364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54367  # "foo.exe" is OK but "foo" is an error.
54368  #
54369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54370  # It is also a way to make sure we got the proper file name for the real test later on.
54371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54372  if test "x$test_shortpath" = x; then
54373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54374$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54375    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54376  fi
54377
54378  # Call helper function which possibly converts this using DOS-style short mode.
54379  # If so, the updated path is stored in $new_path.
54380
54381  input_path="$new_path"
54382  # Check if we need to convert this using DOS-style short mode. If the path
54383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54384  # take no chances and rewrite it.
54385  # Note: m4 eats our [], so we need to use [ and ] instead.
54386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54387  if test "x$has_forbidden_chars" != x; then
54388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54392      # Going to short mode and back again did indeed matter. Since short mode is
54393      # case insensitive, let's make it lowercase to improve readability.
54394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54395      # Now convert it back to Unix-style (cygpath)
54396      input_path=`$CYGPATH -u "$shortmode_path"`
54397      new_path="$input_path"
54398    fi
54399  fi
54400
54401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54402  if test "x$test_cygdrive_prefix" = x; then
54403    # As a simple fix, exclude /usr/bin since it's not a real path.
54404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54406      # a path prefixed by /cygdrive for fixpath to work.
54407      new_path="$CYGWIN_ROOT_PATH$input_path"
54408    fi
54409  fi
54410
54411
54412  if test "x$path" != "x$new_path"; then
54413    MSVC_DLL="$new_path"
54414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54415$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54416  fi
54417
54418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54419
54420  path="$MSVC_DLL"
54421  has_colon=`$ECHO $path | $GREP ^.:`
54422  new_path="$path"
54423  if test "x$has_colon" = x; then
54424    # Not in mixed or Windows style, start by that.
54425    new_path=`cmd //c echo $path`
54426  fi
54427
54428
54429  input_path="$new_path"
54430  # Check if we need to convert this using DOS-style short mode. If the path
54431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54432  # take no chances and rewrite it.
54433  # Note: m4 eats our [], so we need to use [ and ] instead.
54434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54435  if test "x$has_forbidden_chars" != x; then
54436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54438  fi
54439
54440
54441  windows_path="$new_path"
54442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54443    unix_path=`$CYGPATH -u "$windows_path"`
54444    new_path="$unix_path"
54445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54447    new_path="$unix_path"
54448  fi
54449
54450  if test "x$path" != "x$new_path"; then
54451    MSVC_DLL="$new_path"
54452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54453$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54454  fi
54455
54456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54458
54459    else
54460      # We're on a unix platform. Hooray! :)
54461      path="$MSVC_DLL"
54462      has_space=`$ECHO "$path" | $GREP " "`
54463      if test "x$has_space" != x; then
54464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54465$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54467      fi
54468
54469      # Use eval to expand a potential ~
54470      eval path="$path"
54471      if test ! -f "$path" && test ! -d "$path"; then
54472        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54473      fi
54474
54475      if test -d "$path"; then
54476        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54477      else
54478        dir="`$DIRNAME "$path"`"
54479        base="`$BASENAME "$path"`"
54480        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54481      fi
54482    fi
54483  fi
54484
54485      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54486$as_echo_n "checking for $DLL_NAME... " >&6; }
54487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54488$as_echo "$MSVC_DLL" >&6; }
54489    else
54490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54491$as_echo "incorrect, ignoring" >&6; }
54492      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54493$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54494    fi
54495  fi
54496
54497  fi
54498
54499  if test "x$MSVC_DLL" = x; then
54500    # Probe: Look in the Windows system32 directory
54501    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54502
54503  windows_path="$CYGWIN_SYSTEMROOT"
54504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54505    unix_path=`$CYGPATH -u "$windows_path"`
54506    CYGWIN_SYSTEMROOT="$unix_path"
54507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54509    CYGWIN_SYSTEMROOT="$unix_path"
54510  fi
54511
54512    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54513
54514  DLL_NAME="$DLL_NAME"
54515  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54516  METHOD="well-known location in SYSTEMROOT"
54517  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54518    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54519$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54520
54521    # Need to check if the found msvcr is correct architecture
54522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54523$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54524    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54526      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54527      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54528      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54529        CORRECT_MSVCR_ARCH="PE32 executable"
54530      else
54531        CORRECT_MSVCR_ARCH="PE32+ executable"
54532      fi
54533    else
54534      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54535        CORRECT_MSVCR_ARCH=386
54536      else
54537        CORRECT_MSVCR_ARCH=x86-64
54538      fi
54539    fi
54540    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54541      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54542$as_echo "ok" >&6; }
54543      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54544
54545  # Only process if variable expands to non-empty
54546
54547  if test "x$MSVC_DLL" != x; then
54548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54549
54550  # Input might be given as Windows format, start by converting to
54551  # unix format.
54552  path="$MSVC_DLL"
54553  new_path=`$CYGPATH -u "$path"`
54554
54555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54558  # "foo.exe" is OK but "foo" is an error.
54559  #
54560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54561  # It is also a way to make sure we got the proper file name for the real test later on.
54562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54563  if test "x$test_shortpath" = x; then
54564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54565$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54566    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54567  fi
54568
54569  # Call helper function which possibly converts this using DOS-style short mode.
54570  # If so, the updated path is stored in $new_path.
54571
54572  input_path="$new_path"
54573  # Check if we need to convert this using DOS-style short mode. If the path
54574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54575  # take no chances and rewrite it.
54576  # Note: m4 eats our [], so we need to use [ and ] instead.
54577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54578  if test "x$has_forbidden_chars" != x; then
54579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54583      # Going to short mode and back again did indeed matter. Since short mode is
54584      # case insensitive, let's make it lowercase to improve readability.
54585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54586      # Now convert it back to Unix-style (cygpath)
54587      input_path=`$CYGPATH -u "$shortmode_path"`
54588      new_path="$input_path"
54589    fi
54590  fi
54591
54592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54593  if test "x$test_cygdrive_prefix" = x; then
54594    # As a simple fix, exclude /usr/bin since it's not a real path.
54595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54597      # a path prefixed by /cygdrive for fixpath to work.
54598      new_path="$CYGWIN_ROOT_PATH$input_path"
54599    fi
54600  fi
54601
54602
54603  if test "x$path" != "x$new_path"; then
54604    MSVC_DLL="$new_path"
54605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54606$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54607  fi
54608
54609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54610
54611  path="$MSVC_DLL"
54612  has_colon=`$ECHO $path | $GREP ^.:`
54613  new_path="$path"
54614  if test "x$has_colon" = x; then
54615    # Not in mixed or Windows style, start by that.
54616    new_path=`cmd //c echo $path`
54617  fi
54618
54619
54620  input_path="$new_path"
54621  # Check if we need to convert this using DOS-style short mode. If the path
54622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54623  # take no chances and rewrite it.
54624  # Note: m4 eats our [], so we need to use [ and ] instead.
54625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54626  if test "x$has_forbidden_chars" != x; then
54627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54629  fi
54630
54631
54632  windows_path="$new_path"
54633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54634    unix_path=`$CYGPATH -u "$windows_path"`
54635    new_path="$unix_path"
54636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54638    new_path="$unix_path"
54639  fi
54640
54641  if test "x$path" != "x$new_path"; then
54642    MSVC_DLL="$new_path"
54643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54644$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54645  fi
54646
54647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54649
54650    else
54651      # We're on a unix platform. Hooray! :)
54652      path="$MSVC_DLL"
54653      has_space=`$ECHO "$path" | $GREP " "`
54654      if test "x$has_space" != x; then
54655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54656$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54657        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54658      fi
54659
54660      # Use eval to expand a potential ~
54661      eval path="$path"
54662      if test ! -f "$path" && test ! -d "$path"; then
54663        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54664      fi
54665
54666      if test -d "$path"; then
54667        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54668      else
54669        dir="`$DIRNAME "$path"`"
54670        base="`$BASENAME "$path"`"
54671        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54672      fi
54673    fi
54674  fi
54675
54676      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54677$as_echo_n "checking for $DLL_NAME... " >&6; }
54678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54679$as_echo "$MSVC_DLL" >&6; }
54680    else
54681      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54682$as_echo "incorrect, ignoring" >&6; }
54683      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54684$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54685    fi
54686  fi
54687
54688  fi
54689
54690  if test "x$MSVC_DLL" = x; then
54691    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54692    if test "x$VS100COMNTOOLS" != x; then
54693      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54694
54695  windows_path="$CYGWIN_VS_TOOLS_DIR"
54696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54697    unix_path=`$CYGPATH -u "$windows_path"`
54698    CYGWIN_VS_TOOLS_DIR="$unix_path"
54699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54701    CYGWIN_VS_TOOLS_DIR="$unix_path"
54702  fi
54703
54704      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54705        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54706	    | $GREP -i /x64/ | $HEAD --lines 1`
54707      else
54708        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54709	    | $GREP -i /x86/ | $HEAD --lines 1`
54710      fi
54711
54712  DLL_NAME="$DLL_NAME"
54713  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54714  METHOD="search of VS100COMNTOOLS"
54715  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54716    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54717$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54718
54719    # Need to check if the found msvcr is correct architecture
54720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54721$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54722    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54724      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54725      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54726      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54727        CORRECT_MSVCR_ARCH="PE32 executable"
54728      else
54729        CORRECT_MSVCR_ARCH="PE32+ executable"
54730      fi
54731    else
54732      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54733        CORRECT_MSVCR_ARCH=386
54734      else
54735        CORRECT_MSVCR_ARCH=x86-64
54736      fi
54737    fi
54738    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54740$as_echo "ok" >&6; }
54741      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54742
54743  # Only process if variable expands to non-empty
54744
54745  if test "x$MSVC_DLL" != x; then
54746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54747
54748  # Input might be given as Windows format, start by converting to
54749  # unix format.
54750  path="$MSVC_DLL"
54751  new_path=`$CYGPATH -u "$path"`
54752
54753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54756  # "foo.exe" is OK but "foo" is an error.
54757  #
54758  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54759  # It is also a way to make sure we got the proper file name for the real test later on.
54760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54761  if test "x$test_shortpath" = x; then
54762    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54763$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54764    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54765  fi
54766
54767  # Call helper function which possibly converts this using DOS-style short mode.
54768  # If so, the updated path is stored in $new_path.
54769
54770  input_path="$new_path"
54771  # Check if we need to convert this using DOS-style short mode. If the path
54772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54773  # take no chances and rewrite it.
54774  # Note: m4 eats our [], so we need to use [ and ] instead.
54775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54776  if test "x$has_forbidden_chars" != x; then
54777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54781      # Going to short mode and back again did indeed matter. Since short mode is
54782      # case insensitive, let's make it lowercase to improve readability.
54783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54784      # Now convert it back to Unix-style (cygpath)
54785      input_path=`$CYGPATH -u "$shortmode_path"`
54786      new_path="$input_path"
54787    fi
54788  fi
54789
54790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54791  if test "x$test_cygdrive_prefix" = x; then
54792    # As a simple fix, exclude /usr/bin since it's not a real path.
54793    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54795      # a path prefixed by /cygdrive for fixpath to work.
54796      new_path="$CYGWIN_ROOT_PATH$input_path"
54797    fi
54798  fi
54799
54800
54801  if test "x$path" != "x$new_path"; then
54802    MSVC_DLL="$new_path"
54803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54804$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54805  fi
54806
54807    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54808
54809  path="$MSVC_DLL"
54810  has_colon=`$ECHO $path | $GREP ^.:`
54811  new_path="$path"
54812  if test "x$has_colon" = x; then
54813    # Not in mixed or Windows style, start by that.
54814    new_path=`cmd //c echo $path`
54815  fi
54816
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54827  fi
54828
54829
54830  windows_path="$new_path"
54831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54832    unix_path=`$CYGPATH -u "$windows_path"`
54833    new_path="$unix_path"
54834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54836    new_path="$unix_path"
54837  fi
54838
54839  if test "x$path" != "x$new_path"; then
54840    MSVC_DLL="$new_path"
54841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54842$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54843  fi
54844
54845  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54846  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54847
54848    else
54849      # We're on a unix platform. Hooray! :)
54850      path="$MSVC_DLL"
54851      has_space=`$ECHO "$path" | $GREP " "`
54852      if test "x$has_space" != x; then
54853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54854$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54855        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54856      fi
54857
54858      # Use eval to expand a potential ~
54859      eval path="$path"
54860      if test ! -f "$path" && test ! -d "$path"; then
54861        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54862      fi
54863
54864      if test -d "$path"; then
54865        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54866      else
54867        dir="`$DIRNAME "$path"`"
54868        base="`$BASENAME "$path"`"
54869        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54870      fi
54871    fi
54872  fi
54873
54874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54875$as_echo_n "checking for $DLL_NAME... " >&6; }
54876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54877$as_echo "$MSVC_DLL" >&6; }
54878    else
54879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54880$as_echo "incorrect, ignoring" >&6; }
54881      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54882$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54883    fi
54884  fi
54885
54886    fi
54887  fi
54888
54889  if test "x$MSVC_DLL" = x; then
54890    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54891    # (This was the original behaviour; kept since it might turn something up)
54892    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54893      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54894        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54895	    | $GREP x64 | $HEAD --lines 1`
54896      else
54897        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54898	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54899        if test "x$POSSIBLE_MSVC_DLL" = x; then
54900          # We're grasping at straws now...
54901          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54902	      | $HEAD --lines 1`
54903        fi
54904      fi
54905
54906
54907  DLL_NAME="$DLL_NAME"
54908  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54909  METHOD="search of VCINSTALLDIR"
54910  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54911    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54912$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54913
54914    # Need to check if the found msvcr is correct architecture
54915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54916$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54917    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54918    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54919      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54920      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54921      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54922        CORRECT_MSVCR_ARCH="PE32 executable"
54923      else
54924        CORRECT_MSVCR_ARCH="PE32+ executable"
54925      fi
54926    else
54927      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54928        CORRECT_MSVCR_ARCH=386
54929      else
54930        CORRECT_MSVCR_ARCH=x86-64
54931      fi
54932    fi
54933    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54935$as_echo "ok" >&6; }
54936      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54937
54938  # Only process if variable expands to non-empty
54939
54940  if test "x$MSVC_DLL" != x; then
54941    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54942
54943  # Input might be given as Windows format, start by converting to
54944  # unix format.
54945  path="$MSVC_DLL"
54946  new_path=`$CYGPATH -u "$path"`
54947
54948  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54949  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54950  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54951  # "foo.exe" is OK but "foo" is an error.
54952  #
54953  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54954  # It is also a way to make sure we got the proper file name for the real test later on.
54955  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54956  if test "x$test_shortpath" = x; then
54957    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54958$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54959    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54960  fi
54961
54962  # Call helper function which possibly converts this using DOS-style short mode.
54963  # If so, the updated path is stored in $new_path.
54964
54965  input_path="$new_path"
54966  # Check if we need to convert this using DOS-style short mode. If the path
54967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54968  # take no chances and rewrite it.
54969  # Note: m4 eats our [], so we need to use [ and ] instead.
54970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54971  if test "x$has_forbidden_chars" != x; then
54972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54976      # Going to short mode and back again did indeed matter. Since short mode is
54977      # case insensitive, let's make it lowercase to improve readability.
54978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54979      # Now convert it back to Unix-style (cygpath)
54980      input_path=`$CYGPATH -u "$shortmode_path"`
54981      new_path="$input_path"
54982    fi
54983  fi
54984
54985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54986  if test "x$test_cygdrive_prefix" = x; then
54987    # As a simple fix, exclude /usr/bin since it's not a real path.
54988    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54990      # a path prefixed by /cygdrive for fixpath to work.
54991      new_path="$CYGWIN_ROOT_PATH$input_path"
54992    fi
54993  fi
54994
54995
54996  if test "x$path" != "x$new_path"; then
54997    MSVC_DLL="$new_path"
54998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54999$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55000  fi
55001
55002    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55003
55004  path="$MSVC_DLL"
55005  has_colon=`$ECHO $path | $GREP ^.:`
55006  new_path="$path"
55007  if test "x$has_colon" = x; then
55008    # Not in mixed or Windows style, start by that.
55009    new_path=`cmd //c echo $path`
55010  fi
55011
55012
55013  input_path="$new_path"
55014  # Check if we need to convert this using DOS-style short mode. If the path
55015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55016  # take no chances and rewrite it.
55017  # Note: m4 eats our [], so we need to use [ and ] instead.
55018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55019  if test "x$has_forbidden_chars" != x; then
55020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55022  fi
55023
55024
55025  windows_path="$new_path"
55026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55027    unix_path=`$CYGPATH -u "$windows_path"`
55028    new_path="$unix_path"
55029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55031    new_path="$unix_path"
55032  fi
55033
55034  if test "x$path" != "x$new_path"; then
55035    MSVC_DLL="$new_path"
55036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55037$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55038  fi
55039
55040  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55041  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55042
55043    else
55044      # We're on a unix platform. Hooray! :)
55045      path="$MSVC_DLL"
55046      has_space=`$ECHO "$path" | $GREP " "`
55047      if test "x$has_space" != x; then
55048        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55049$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55050        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55051      fi
55052
55053      # Use eval to expand a potential ~
55054      eval path="$path"
55055      if test ! -f "$path" && test ! -d "$path"; then
55056        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55057      fi
55058
55059      if test -d "$path"; then
55060        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55061      else
55062        dir="`$DIRNAME "$path"`"
55063        base="`$BASENAME "$path"`"
55064        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55065      fi
55066    fi
55067  fi
55068
55069      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55070$as_echo_n "checking for $DLL_NAME... " >&6; }
55071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55072$as_echo "$MSVC_DLL" >&6; }
55073    else
55074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55075$as_echo "incorrect, ignoring" >&6; }
55076      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55077$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55078    fi
55079  fi
55080
55081    fi
55082  fi
55083
55084  if test "x$MSVC_DLL" = x; then
55085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55086$as_echo_n "checking for $DLL_NAME... " >&6; }
55087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55088$as_echo "no" >&6; }
55089    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55090  fi
55091
55092    MSVCR_DLL="$MSVC_DLL"
55093  fi
55094
55095
55096
55097# Check whether --with-msvcp-dll was given.
55098if test "${with_msvcp_dll+set}" = set; then :
55099  withval=$with_msvcp_dll;
55100fi
55101
55102
55103  if test "x$MSVCP_NAME" != "x"; then
55104    if test "x$with_msvcp_dll" != x; then
55105      # If given explicitely by user, do not probe. If not present, fail directly.
55106
55107  DLL_NAME="$MSVCP_NAME"
55108  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55109  METHOD="--with-msvcp-dll"
55110  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55111    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55112$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55113
55114    # Need to check if the found msvcr is correct architecture
55115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55116$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55117    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55119      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55120      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55121      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55122        CORRECT_MSVCR_ARCH="PE32 executable"
55123      else
55124        CORRECT_MSVCR_ARCH="PE32+ executable"
55125      fi
55126    else
55127      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55128        CORRECT_MSVCR_ARCH=386
55129      else
55130        CORRECT_MSVCR_ARCH=x86-64
55131      fi
55132    fi
55133    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55135$as_echo "ok" >&6; }
55136      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55137
55138  # Only process if variable expands to non-empty
55139
55140  if test "x$MSVC_DLL" != x; then
55141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55142
55143  # Input might be given as Windows format, start by converting to
55144  # unix format.
55145  path="$MSVC_DLL"
55146  new_path=`$CYGPATH -u "$path"`
55147
55148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55151  # "foo.exe" is OK but "foo" is an error.
55152  #
55153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55154  # It is also a way to make sure we got the proper file name for the real test later on.
55155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55156  if test "x$test_shortpath" = x; then
55157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55158$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55159    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55160  fi
55161
55162  # Call helper function which possibly converts this using DOS-style short mode.
55163  # If so, the updated path is stored in $new_path.
55164
55165  input_path="$new_path"
55166  # Check if we need to convert this using DOS-style short mode. If the path
55167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55168  # take no chances and rewrite it.
55169  # Note: m4 eats our [], so we need to use [ and ] instead.
55170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55171  if test "x$has_forbidden_chars" != x; then
55172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55176      # Going to short mode and back again did indeed matter. Since short mode is
55177      # case insensitive, let's make it lowercase to improve readability.
55178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55179      # Now convert it back to Unix-style (cygpath)
55180      input_path=`$CYGPATH -u "$shortmode_path"`
55181      new_path="$input_path"
55182    fi
55183  fi
55184
55185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55186  if test "x$test_cygdrive_prefix" = x; then
55187    # As a simple fix, exclude /usr/bin since it's not a real path.
55188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55190      # a path prefixed by /cygdrive for fixpath to work.
55191      new_path="$CYGWIN_ROOT_PATH$input_path"
55192    fi
55193  fi
55194
55195
55196  if test "x$path" != "x$new_path"; then
55197    MSVC_DLL="$new_path"
55198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55199$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55200  fi
55201
55202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55203
55204  path="$MSVC_DLL"
55205  has_colon=`$ECHO $path | $GREP ^.:`
55206  new_path="$path"
55207  if test "x$has_colon" = x; then
55208    # Not in mixed or Windows style, start by that.
55209    new_path=`cmd //c echo $path`
55210  fi
55211
55212
55213  input_path="$new_path"
55214  # Check if we need to convert this using DOS-style short mode. If the path
55215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55216  # take no chances and rewrite it.
55217  # Note: m4 eats our [], so we need to use [ and ] instead.
55218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55219  if test "x$has_forbidden_chars" != x; then
55220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55222  fi
55223
55224
55225  windows_path="$new_path"
55226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55227    unix_path=`$CYGPATH -u "$windows_path"`
55228    new_path="$unix_path"
55229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55231    new_path="$unix_path"
55232  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55242
55243    else
55244      # We're on a unix platform. Hooray! :)
55245      path="$MSVC_DLL"
55246      has_space=`$ECHO "$path" | $GREP " "`
55247      if test "x$has_space" != x; then
55248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55249$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55250        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55251      fi
55252
55253      # Use eval to expand a potential ~
55254      eval path="$path"
55255      if test ! -f "$path" && test ! -d "$path"; then
55256        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55257      fi
55258
55259      if test -d "$path"; then
55260        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55261      else
55262        dir="`$DIRNAME "$path"`"
55263        base="`$BASENAME "$path"`"
55264        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55265      fi
55266    fi
55267  fi
55268
55269      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55270$as_echo_n "checking for $DLL_NAME... " >&6; }
55271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55272$as_echo "$MSVC_DLL" >&6; }
55273    else
55274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55275$as_echo "incorrect, ignoring" >&6; }
55276      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55277$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55278    fi
55279  fi
55280
55281      if test "x$MSVC_DLL" = x; then
55282        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55283      fi
55284      MSVCP_DLL="$MSVC_DLL"
55285    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55286
55287  DLL_NAME="$MSVCP_NAME"
55288  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55289  METHOD="devkit"
55290  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55291    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55292$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55293
55294    # Need to check if the found msvcr is correct architecture
55295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55296$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55297    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55299      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55300      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55301      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55302        CORRECT_MSVCR_ARCH="PE32 executable"
55303      else
55304        CORRECT_MSVCR_ARCH="PE32+ executable"
55305      fi
55306    else
55307      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55308        CORRECT_MSVCR_ARCH=386
55309      else
55310        CORRECT_MSVCR_ARCH=x86-64
55311      fi
55312    fi
55313    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55315$as_echo "ok" >&6; }
55316      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55317
55318  # Only process if variable expands to non-empty
55319
55320  if test "x$MSVC_DLL" != x; then
55321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55322
55323  # Input might be given as Windows format, start by converting to
55324  # unix format.
55325  path="$MSVC_DLL"
55326  new_path=`$CYGPATH -u "$path"`
55327
55328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55331  # "foo.exe" is OK but "foo" is an error.
55332  #
55333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55334  # It is also a way to make sure we got the proper file name for the real test later on.
55335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55336  if test "x$test_shortpath" = x; then
55337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55338$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55339    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55340  fi
55341
55342  # Call helper function which possibly converts this using DOS-style short mode.
55343  # If so, the updated path is stored in $new_path.
55344
55345  input_path="$new_path"
55346  # Check if we need to convert this using DOS-style short mode. If the path
55347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55348  # take no chances and rewrite it.
55349  # Note: m4 eats our [], so we need to use [ and ] instead.
55350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55351  if test "x$has_forbidden_chars" != x; then
55352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55356      # Going to short mode and back again did indeed matter. Since short mode is
55357      # case insensitive, let's make it lowercase to improve readability.
55358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55359      # Now convert it back to Unix-style (cygpath)
55360      input_path=`$CYGPATH -u "$shortmode_path"`
55361      new_path="$input_path"
55362    fi
55363  fi
55364
55365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55366  if test "x$test_cygdrive_prefix" = x; then
55367    # As a simple fix, exclude /usr/bin since it's not a real path.
55368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55370      # a path prefixed by /cygdrive for fixpath to work.
55371      new_path="$CYGWIN_ROOT_PATH$input_path"
55372    fi
55373  fi
55374
55375
55376  if test "x$path" != "x$new_path"; then
55377    MSVC_DLL="$new_path"
55378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55379$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55380  fi
55381
55382    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55383
55384  path="$MSVC_DLL"
55385  has_colon=`$ECHO $path | $GREP ^.:`
55386  new_path="$path"
55387  if test "x$has_colon" = x; then
55388    # Not in mixed or Windows style, start by that.
55389    new_path=`cmd //c echo $path`
55390  fi
55391
55392
55393  input_path="$new_path"
55394  # Check if we need to convert this using DOS-style short mode. If the path
55395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55396  # take no chances and rewrite it.
55397  # Note: m4 eats our [], so we need to use [ and ] instead.
55398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55399  if test "x$has_forbidden_chars" != x; then
55400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55402  fi
55403
55404
55405  windows_path="$new_path"
55406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55407    unix_path=`$CYGPATH -u "$windows_path"`
55408    new_path="$unix_path"
55409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55411    new_path="$unix_path"
55412  fi
55413
55414  if test "x$path" != "x$new_path"; then
55415    MSVC_DLL="$new_path"
55416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55417$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55418  fi
55419
55420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55422
55423    else
55424      # We're on a unix platform. Hooray! :)
55425      path="$MSVC_DLL"
55426      has_space=`$ECHO "$path" | $GREP " "`
55427      if test "x$has_space" != x; then
55428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55429$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55430        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55431      fi
55432
55433      # Use eval to expand a potential ~
55434      eval path="$path"
55435      if test ! -f "$path" && test ! -d "$path"; then
55436        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55437      fi
55438
55439      if test -d "$path"; then
55440        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55441      else
55442        dir="`$DIRNAME "$path"`"
55443        base="`$BASENAME "$path"`"
55444        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55445      fi
55446    fi
55447  fi
55448
55449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55450$as_echo_n "checking for $DLL_NAME... " >&6; }
55451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55452$as_echo "$MSVC_DLL" >&6; }
55453    else
55454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55455$as_echo "incorrect, ignoring" >&6; }
55456      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55457$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55458    fi
55459  fi
55460
55461      if test "x$MSVC_DLL" = x; then
55462        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55463      fi
55464      MSVCP_DLL="$MSVC_DLL"
55465    else
55466
55467  DLL_NAME="${MSVCP_NAME}"
55468  MSVC_DLL=
55469
55470  if test "x$MSVC_DLL" = x; then
55471    # Probe: Using well-known location from Visual Studio 10.0
55472    if test "x$VCINSTALLDIR" != x; then
55473      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55474
55475  windows_path="$CYGWIN_VC_INSTALL_DIR"
55476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55477    unix_path=`$CYGPATH -u "$windows_path"`
55478    CYGWIN_VC_INSTALL_DIR="$unix_path"
55479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55481    CYGWIN_VC_INSTALL_DIR="$unix_path"
55482  fi
55483
55484      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55485        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55486      else
55487        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55488      fi
55489      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55490
55491  DLL_NAME="$DLL_NAME"
55492  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55493  METHOD="well-known location in VCINSTALLDIR"
55494  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55495    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55496$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55497
55498    # Need to check if the found msvcr is correct architecture
55499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55500$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55501    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55502    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55503      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55504      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55505      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55506        CORRECT_MSVCR_ARCH="PE32 executable"
55507      else
55508        CORRECT_MSVCR_ARCH="PE32+ executable"
55509      fi
55510    else
55511      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55512        CORRECT_MSVCR_ARCH=386
55513      else
55514        CORRECT_MSVCR_ARCH=x86-64
55515      fi
55516    fi
55517    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55519$as_echo "ok" >&6; }
55520      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55521
55522  # Only process if variable expands to non-empty
55523
55524  if test "x$MSVC_DLL" != x; then
55525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55526
55527  # Input might be given as Windows format, start by converting to
55528  # unix format.
55529  path="$MSVC_DLL"
55530  new_path=`$CYGPATH -u "$path"`
55531
55532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55535  # "foo.exe" is OK but "foo" is an error.
55536  #
55537  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55538  # It is also a way to make sure we got the proper file name for the real test later on.
55539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55540  if test "x$test_shortpath" = x; then
55541    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55542$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55543    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55544  fi
55545
55546  # Call helper function which possibly converts this using DOS-style short mode.
55547  # If so, the updated path is stored in $new_path.
55548
55549  input_path="$new_path"
55550  # Check if we need to convert this using DOS-style short mode. If the path
55551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55552  # take no chances and rewrite it.
55553  # Note: m4 eats our [], so we need to use [ and ] instead.
55554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55555  if test "x$has_forbidden_chars" != x; then
55556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55560      # Going to short mode and back again did indeed matter. Since short mode is
55561      # case insensitive, let's make it lowercase to improve readability.
55562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55563      # Now convert it back to Unix-style (cygpath)
55564      input_path=`$CYGPATH -u "$shortmode_path"`
55565      new_path="$input_path"
55566    fi
55567  fi
55568
55569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55570  if test "x$test_cygdrive_prefix" = x; then
55571    # As a simple fix, exclude /usr/bin since it's not a real path.
55572    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55574      # a path prefixed by /cygdrive for fixpath to work.
55575      new_path="$CYGWIN_ROOT_PATH$input_path"
55576    fi
55577  fi
55578
55579
55580  if test "x$path" != "x$new_path"; then
55581    MSVC_DLL="$new_path"
55582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55583$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55584  fi
55585
55586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55587
55588  path="$MSVC_DLL"
55589  has_colon=`$ECHO $path | $GREP ^.:`
55590  new_path="$path"
55591  if test "x$has_colon" = x; then
55592    # Not in mixed or Windows style, start by that.
55593    new_path=`cmd //c echo $path`
55594  fi
55595
55596
55597  input_path="$new_path"
55598  # Check if we need to convert this using DOS-style short mode. If the path
55599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55600  # take no chances and rewrite it.
55601  # Note: m4 eats our [], so we need to use [ and ] instead.
55602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55603  if test "x$has_forbidden_chars" != x; then
55604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55606  fi
55607
55608
55609  windows_path="$new_path"
55610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55611    unix_path=`$CYGPATH -u "$windows_path"`
55612    new_path="$unix_path"
55613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55615    new_path="$unix_path"
55616  fi
55617
55618  if test "x$path" != "x$new_path"; then
55619    MSVC_DLL="$new_path"
55620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55621$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55622  fi
55623
55624  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55625  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55626
55627    else
55628      # We're on a unix platform. Hooray! :)
55629      path="$MSVC_DLL"
55630      has_space=`$ECHO "$path" | $GREP " "`
55631      if test "x$has_space" != x; then
55632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55633$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55634        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55635      fi
55636
55637      # Use eval to expand a potential ~
55638      eval path="$path"
55639      if test ! -f "$path" && test ! -d "$path"; then
55640        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55641      fi
55642
55643      if test -d "$path"; then
55644        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55645      else
55646        dir="`$DIRNAME "$path"`"
55647        base="`$BASENAME "$path"`"
55648        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55649      fi
55650    fi
55651  fi
55652
55653      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55654$as_echo_n "checking for $DLL_NAME... " >&6; }
55655      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55656$as_echo "$MSVC_DLL" >&6; }
55657    else
55658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55659$as_echo "incorrect, ignoring" >&6; }
55660      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55661$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55662    fi
55663  fi
55664
55665    fi
55666  fi
55667
55668  if test "x$MSVC_DLL" = x; then
55669    # Probe: Check in the Boot JDK directory.
55670    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55671
55672  DLL_NAME="$DLL_NAME"
55673  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55674  METHOD="well-known location in Boot JDK"
55675  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55676    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55677$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55678
55679    # Need to check if the found msvcr is correct architecture
55680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55681$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55682    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55683    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55684      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55685      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55686      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55687        CORRECT_MSVCR_ARCH="PE32 executable"
55688      else
55689        CORRECT_MSVCR_ARCH="PE32+ executable"
55690      fi
55691    else
55692      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55693        CORRECT_MSVCR_ARCH=386
55694      else
55695        CORRECT_MSVCR_ARCH=x86-64
55696      fi
55697    fi
55698    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55700$as_echo "ok" >&6; }
55701      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55702
55703  # Only process if variable expands to non-empty
55704
55705  if test "x$MSVC_DLL" != x; then
55706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55707
55708  # Input might be given as Windows format, start by converting to
55709  # unix format.
55710  path="$MSVC_DLL"
55711  new_path=`$CYGPATH -u "$path"`
55712
55713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55716  # "foo.exe" is OK but "foo" is an error.
55717  #
55718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55719  # It is also a way to make sure we got the proper file name for the real test later on.
55720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55721  if test "x$test_shortpath" = x; then
55722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55723$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55724    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55725  fi
55726
55727  # Call helper function which possibly converts this using DOS-style short mode.
55728  # If so, the updated path is stored in $new_path.
55729
55730  input_path="$new_path"
55731  # Check if we need to convert this using DOS-style short mode. If the path
55732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55733  # take no chances and rewrite it.
55734  # Note: m4 eats our [], so we need to use [ and ] instead.
55735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55736  if test "x$has_forbidden_chars" != x; then
55737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55741      # Going to short mode and back again did indeed matter. Since short mode is
55742      # case insensitive, let's make it lowercase to improve readability.
55743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55744      # Now convert it back to Unix-style (cygpath)
55745      input_path=`$CYGPATH -u "$shortmode_path"`
55746      new_path="$input_path"
55747    fi
55748  fi
55749
55750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55751  if test "x$test_cygdrive_prefix" = x; then
55752    # As a simple fix, exclude /usr/bin since it's not a real path.
55753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55755      # a path prefixed by /cygdrive for fixpath to work.
55756      new_path="$CYGWIN_ROOT_PATH$input_path"
55757    fi
55758  fi
55759
55760
55761  if test "x$path" != "x$new_path"; then
55762    MSVC_DLL="$new_path"
55763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55764$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55765  fi
55766
55767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55768
55769  path="$MSVC_DLL"
55770  has_colon=`$ECHO $path | $GREP ^.:`
55771  new_path="$path"
55772  if test "x$has_colon" = x; then
55773    # Not in mixed or Windows style, start by that.
55774    new_path=`cmd //c echo $path`
55775  fi
55776
55777
55778  input_path="$new_path"
55779  # Check if we need to convert this using DOS-style short mode. If the path
55780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55781  # take no chances and rewrite it.
55782  # Note: m4 eats our [], so we need to use [ and ] instead.
55783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55784  if test "x$has_forbidden_chars" != x; then
55785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55787  fi
55788
55789
55790  windows_path="$new_path"
55791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55792    unix_path=`$CYGPATH -u "$windows_path"`
55793    new_path="$unix_path"
55794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55796    new_path="$unix_path"
55797  fi
55798
55799  if test "x$path" != "x$new_path"; then
55800    MSVC_DLL="$new_path"
55801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55802$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55803  fi
55804
55805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55807
55808    else
55809      # We're on a unix platform. Hooray! :)
55810      path="$MSVC_DLL"
55811      has_space=`$ECHO "$path" | $GREP " "`
55812      if test "x$has_space" != x; then
55813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55814$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55815        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55816      fi
55817
55818      # Use eval to expand a potential ~
55819      eval path="$path"
55820      if test ! -f "$path" && test ! -d "$path"; then
55821        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55822      fi
55823
55824      if test -d "$path"; then
55825        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55826      else
55827        dir="`$DIRNAME "$path"`"
55828        base="`$BASENAME "$path"`"
55829        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55830      fi
55831    fi
55832  fi
55833
55834      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55835$as_echo_n "checking for $DLL_NAME... " >&6; }
55836      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55837$as_echo "$MSVC_DLL" >&6; }
55838    else
55839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55840$as_echo "incorrect, ignoring" >&6; }
55841      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55842$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55843    fi
55844  fi
55845
55846  fi
55847
55848  if test "x$MSVC_DLL" = x; then
55849    # Probe: Look in the Windows system32 directory
55850    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55851
55852  windows_path="$CYGWIN_SYSTEMROOT"
55853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55854    unix_path=`$CYGPATH -u "$windows_path"`
55855    CYGWIN_SYSTEMROOT="$unix_path"
55856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55858    CYGWIN_SYSTEMROOT="$unix_path"
55859  fi
55860
55861    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55862
55863  DLL_NAME="$DLL_NAME"
55864  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55865  METHOD="well-known location in SYSTEMROOT"
55866  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55867    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55868$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55869
55870    # Need to check if the found msvcr is correct architecture
55871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55872$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55873    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55875      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55876      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55877      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55878        CORRECT_MSVCR_ARCH="PE32 executable"
55879      else
55880        CORRECT_MSVCR_ARCH="PE32+ executable"
55881      fi
55882    else
55883      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55884        CORRECT_MSVCR_ARCH=386
55885      else
55886        CORRECT_MSVCR_ARCH=x86-64
55887      fi
55888    fi
55889    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55891$as_echo "ok" >&6; }
55892      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55893
55894  # Only process if variable expands to non-empty
55895
55896  if test "x$MSVC_DLL" != x; then
55897    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55898
55899  # Input might be given as Windows format, start by converting to
55900  # unix format.
55901  path="$MSVC_DLL"
55902  new_path=`$CYGPATH -u "$path"`
55903
55904  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55905  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55906  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55907  # "foo.exe" is OK but "foo" is an error.
55908  #
55909  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55910  # It is also a way to make sure we got the proper file name for the real test later on.
55911  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55912  if test "x$test_shortpath" = x; then
55913    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55914$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55915    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55916  fi
55917
55918  # Call helper function which possibly converts this using DOS-style short mode.
55919  # If so, the updated path is stored in $new_path.
55920
55921  input_path="$new_path"
55922  # Check if we need to convert this using DOS-style short mode. If the path
55923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55924  # take no chances and rewrite it.
55925  # Note: m4 eats our [], so we need to use [ and ] instead.
55926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55927  if test "x$has_forbidden_chars" != x; then
55928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55932      # Going to short mode and back again did indeed matter. Since short mode is
55933      # case insensitive, let's make it lowercase to improve readability.
55934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55935      # Now convert it back to Unix-style (cygpath)
55936      input_path=`$CYGPATH -u "$shortmode_path"`
55937      new_path="$input_path"
55938    fi
55939  fi
55940
55941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55942  if test "x$test_cygdrive_prefix" = x; then
55943    # As a simple fix, exclude /usr/bin since it's not a real path.
55944    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55946      # a path prefixed by /cygdrive for fixpath to work.
55947      new_path="$CYGWIN_ROOT_PATH$input_path"
55948    fi
55949  fi
55950
55951
55952  if test "x$path" != "x$new_path"; then
55953    MSVC_DLL="$new_path"
55954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55955$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55956  fi
55957
55958    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55959
55960  path="$MSVC_DLL"
55961  has_colon=`$ECHO $path | $GREP ^.:`
55962  new_path="$path"
55963  if test "x$has_colon" = x; then
55964    # Not in mixed or Windows style, start by that.
55965    new_path=`cmd //c echo $path`
55966  fi
55967
55968
55969  input_path="$new_path"
55970  # Check if we need to convert this using DOS-style short mode. If the path
55971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55972  # take no chances and rewrite it.
55973  # Note: m4 eats our [], so we need to use [ and ] instead.
55974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55975  if test "x$has_forbidden_chars" != x; then
55976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55978  fi
55979
55980
55981  windows_path="$new_path"
55982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55983    unix_path=`$CYGPATH -u "$windows_path"`
55984    new_path="$unix_path"
55985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55987    new_path="$unix_path"
55988  fi
55989
55990  if test "x$path" != "x$new_path"; then
55991    MSVC_DLL="$new_path"
55992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55993$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55994  fi
55995
55996  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55997  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55998
55999    else
56000      # We're on a unix platform. Hooray! :)
56001      path="$MSVC_DLL"
56002      has_space=`$ECHO "$path" | $GREP " "`
56003      if test "x$has_space" != x; then
56004        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56005$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56006        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56007      fi
56008
56009      # Use eval to expand a potential ~
56010      eval path="$path"
56011      if test ! -f "$path" && test ! -d "$path"; then
56012        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56013      fi
56014
56015      if test -d "$path"; then
56016        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56017      else
56018        dir="`$DIRNAME "$path"`"
56019        base="`$BASENAME "$path"`"
56020        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56021      fi
56022    fi
56023  fi
56024
56025      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56026$as_echo_n "checking for $DLL_NAME... " >&6; }
56027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56028$as_echo "$MSVC_DLL" >&6; }
56029    else
56030      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56031$as_echo "incorrect, ignoring" >&6; }
56032      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56033$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56034    fi
56035  fi
56036
56037  fi
56038
56039  if test "x$MSVC_DLL" = x; then
56040    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56041    if test "x$VS100COMNTOOLS" != x; then
56042      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56043
56044  windows_path="$CYGWIN_VS_TOOLS_DIR"
56045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56046    unix_path=`$CYGPATH -u "$windows_path"`
56047    CYGWIN_VS_TOOLS_DIR="$unix_path"
56048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56050    CYGWIN_VS_TOOLS_DIR="$unix_path"
56051  fi
56052
56053      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56054        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56055	    | $GREP -i /x64/ | $HEAD --lines 1`
56056      else
56057        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56058	    | $GREP -i /x86/ | $HEAD --lines 1`
56059      fi
56060
56061  DLL_NAME="$DLL_NAME"
56062  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56063  METHOD="search of VS100COMNTOOLS"
56064  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56065    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56066$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56067
56068    # Need to check if the found msvcr is correct architecture
56069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56070$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56071    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56072    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56073      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56074      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56075      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56076        CORRECT_MSVCR_ARCH="PE32 executable"
56077      else
56078        CORRECT_MSVCR_ARCH="PE32+ executable"
56079      fi
56080    else
56081      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56082        CORRECT_MSVCR_ARCH=386
56083      else
56084        CORRECT_MSVCR_ARCH=x86-64
56085      fi
56086    fi
56087    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56088      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56089$as_echo "ok" >&6; }
56090      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56091
56092  # Only process if variable expands to non-empty
56093
56094  if test "x$MSVC_DLL" != x; then
56095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56096
56097  # Input might be given as Windows format, start by converting to
56098  # unix format.
56099  path="$MSVC_DLL"
56100  new_path=`$CYGPATH -u "$path"`
56101
56102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56105  # "foo.exe" is OK but "foo" is an error.
56106  #
56107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56108  # It is also a way to make sure we got the proper file name for the real test later on.
56109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56110  if test "x$test_shortpath" = x; then
56111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56112$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56113    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56114  fi
56115
56116  # Call helper function which possibly converts this using DOS-style short mode.
56117  # If so, the updated path is stored in $new_path.
56118
56119  input_path="$new_path"
56120  # Check if we need to convert this using DOS-style short mode. If the path
56121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56122  # take no chances and rewrite it.
56123  # Note: m4 eats our [], so we need to use [ and ] instead.
56124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56125  if test "x$has_forbidden_chars" != x; then
56126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56130      # Going to short mode and back again did indeed matter. Since short mode is
56131      # case insensitive, let's make it lowercase to improve readability.
56132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56133      # Now convert it back to Unix-style (cygpath)
56134      input_path=`$CYGPATH -u "$shortmode_path"`
56135      new_path="$input_path"
56136    fi
56137  fi
56138
56139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56140  if test "x$test_cygdrive_prefix" = x; then
56141    # As a simple fix, exclude /usr/bin since it's not a real path.
56142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56144      # a path prefixed by /cygdrive for fixpath to work.
56145      new_path="$CYGWIN_ROOT_PATH$input_path"
56146    fi
56147  fi
56148
56149
56150  if test "x$path" != "x$new_path"; then
56151    MSVC_DLL="$new_path"
56152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56153$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56154  fi
56155
56156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56157
56158  path="$MSVC_DLL"
56159  has_colon=`$ECHO $path | $GREP ^.:`
56160  new_path="$path"
56161  if test "x$has_colon" = x; then
56162    # Not in mixed or Windows style, start by that.
56163    new_path=`cmd //c echo $path`
56164  fi
56165
56166
56167  input_path="$new_path"
56168  # Check if we need to convert this using DOS-style short mode. If the path
56169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56170  # take no chances and rewrite it.
56171  # Note: m4 eats our [], so we need to use [ and ] instead.
56172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56173  if test "x$has_forbidden_chars" != x; then
56174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56176  fi
56177
56178
56179  windows_path="$new_path"
56180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56181    unix_path=`$CYGPATH -u "$windows_path"`
56182    new_path="$unix_path"
56183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56185    new_path="$unix_path"
56186  fi
56187
56188  if test "x$path" != "x$new_path"; then
56189    MSVC_DLL="$new_path"
56190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56191$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56192  fi
56193
56194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56196
56197    else
56198      # We're on a unix platform. Hooray! :)
56199      path="$MSVC_DLL"
56200      has_space=`$ECHO "$path" | $GREP " "`
56201      if test "x$has_space" != x; then
56202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56203$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56204        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56205      fi
56206
56207      # Use eval to expand a potential ~
56208      eval path="$path"
56209      if test ! -f "$path" && test ! -d "$path"; then
56210        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56211      fi
56212
56213      if test -d "$path"; then
56214        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56215      else
56216        dir="`$DIRNAME "$path"`"
56217        base="`$BASENAME "$path"`"
56218        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56219      fi
56220    fi
56221  fi
56222
56223      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56224$as_echo_n "checking for $DLL_NAME... " >&6; }
56225      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56226$as_echo "$MSVC_DLL" >&6; }
56227    else
56228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56229$as_echo "incorrect, ignoring" >&6; }
56230      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56231$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56232    fi
56233  fi
56234
56235    fi
56236  fi
56237
56238  if test "x$MSVC_DLL" = x; then
56239    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56240    # (This was the original behaviour; kept since it might turn something up)
56241    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56242      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56243        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56244	    | $GREP x64 | $HEAD --lines 1`
56245      else
56246        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56247	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56248        if test "x$POSSIBLE_MSVC_DLL" = x; then
56249          # We're grasping at straws now...
56250          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56251	      | $HEAD --lines 1`
56252        fi
56253      fi
56254
56255
56256  DLL_NAME="$DLL_NAME"
56257  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56258  METHOD="search of VCINSTALLDIR"
56259  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56260    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56261$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56262
56263    # Need to check if the found msvcr is correct architecture
56264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56265$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56266    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56267    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56268      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56269      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56270      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56271        CORRECT_MSVCR_ARCH="PE32 executable"
56272      else
56273        CORRECT_MSVCR_ARCH="PE32+ executable"
56274      fi
56275    else
56276      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56277        CORRECT_MSVCR_ARCH=386
56278      else
56279        CORRECT_MSVCR_ARCH=x86-64
56280      fi
56281    fi
56282    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56284$as_echo "ok" >&6; }
56285      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56286
56287  # Only process if variable expands to non-empty
56288
56289  if test "x$MSVC_DLL" != x; then
56290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56291
56292  # Input might be given as Windows format, start by converting to
56293  # unix format.
56294  path="$MSVC_DLL"
56295  new_path=`$CYGPATH -u "$path"`
56296
56297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56300  # "foo.exe" is OK but "foo" is an error.
56301  #
56302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56303  # It is also a way to make sure we got the proper file name for the real test later on.
56304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56305  if test "x$test_shortpath" = x; then
56306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56307$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56308    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56309  fi
56310
56311  # Call helper function which possibly converts this using DOS-style short mode.
56312  # If so, the updated path is stored in $new_path.
56313
56314  input_path="$new_path"
56315  # Check if we need to convert this using DOS-style short mode. If the path
56316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56317  # take no chances and rewrite it.
56318  # Note: m4 eats our [], so we need to use [ and ] instead.
56319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56320  if test "x$has_forbidden_chars" != x; then
56321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56325      # Going to short mode and back again did indeed matter. Since short mode is
56326      # case insensitive, let's make it lowercase to improve readability.
56327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56328      # Now convert it back to Unix-style (cygpath)
56329      input_path=`$CYGPATH -u "$shortmode_path"`
56330      new_path="$input_path"
56331    fi
56332  fi
56333
56334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56335  if test "x$test_cygdrive_prefix" = x; then
56336    # As a simple fix, exclude /usr/bin since it's not a real path.
56337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56339      # a path prefixed by /cygdrive for fixpath to work.
56340      new_path="$CYGWIN_ROOT_PATH$input_path"
56341    fi
56342  fi
56343
56344
56345  if test "x$path" != "x$new_path"; then
56346    MSVC_DLL="$new_path"
56347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56348$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56349  fi
56350
56351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56352
56353  path="$MSVC_DLL"
56354  has_colon=`$ECHO $path | $GREP ^.:`
56355  new_path="$path"
56356  if test "x$has_colon" = x; then
56357    # Not in mixed or Windows style, start by that.
56358    new_path=`cmd //c echo $path`
56359  fi
56360
56361
56362  input_path="$new_path"
56363  # Check if we need to convert this using DOS-style short mode. If the path
56364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56365  # take no chances and rewrite it.
56366  # Note: m4 eats our [], so we need to use [ and ] instead.
56367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56368  if test "x$has_forbidden_chars" != x; then
56369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56371  fi
56372
56373
56374  windows_path="$new_path"
56375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56376    unix_path=`$CYGPATH -u "$windows_path"`
56377    new_path="$unix_path"
56378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56380    new_path="$unix_path"
56381  fi
56382
56383  if test "x$path" != "x$new_path"; then
56384    MSVC_DLL="$new_path"
56385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56386$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56387  fi
56388
56389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56391
56392    else
56393      # We're on a unix platform. Hooray! :)
56394      path="$MSVC_DLL"
56395      has_space=`$ECHO "$path" | $GREP " "`
56396      if test "x$has_space" != x; then
56397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56398$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56399        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56400      fi
56401
56402      # Use eval to expand a potential ~
56403      eval path="$path"
56404      if test ! -f "$path" && test ! -d "$path"; then
56405        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56406      fi
56407
56408      if test -d "$path"; then
56409        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56410      else
56411        dir="`$DIRNAME "$path"`"
56412        base="`$BASENAME "$path"`"
56413        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56414      fi
56415    fi
56416  fi
56417
56418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56419$as_echo_n "checking for $DLL_NAME... " >&6; }
56420      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56421$as_echo "$MSVC_DLL" >&6; }
56422    else
56423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56424$as_echo "incorrect, ignoring" >&6; }
56425      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56426$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56427    fi
56428  fi
56429
56430    fi
56431  fi
56432
56433  if test "x$MSVC_DLL" = x; then
56434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56435$as_echo_n "checking for $DLL_NAME... " >&6; }
56436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56437$as_echo "no" >&6; }
56438    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56439  fi
56440
56441      MSVCP_DLL="$MSVC_DLL"
56442    fi
56443
56444  fi
56445
56446  fi
56447
56448
56449  if test "x$NEEDS_LIB_X11" = xfalse; then
56450    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56451      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56452$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56453    fi
56454    X_CFLAGS=
56455    X_LIBS=
56456  else
56457
56458    if test "x${with_x}" = xno; then
56459      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56460    fi
56461
56462    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56463      # The user has specified a X11 base directory. Use it for includes and
56464      # libraries, unless explicitely overridden.
56465      if test "x$x_includes" = xNONE; then
56466        x_includes="${with_x}/include"
56467      fi
56468      if test "x$x_libraries" = xNONE; then
56469        x_libraries="${with_x}/lib"
56470      fi
56471    else
56472      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56473      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56474      # --x-libraries for the sysroot, if that seems to be correct.
56475      if test "x$SYSROOT" != "x"; then
56476        if test "x$x_includes" = xNONE; then
56477          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56478            x_includes="$SYSROOT/usr/X11R6/include"
56479          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56480            x_includes="$SYSROOT/usr/include"
56481          fi
56482        fi
56483        if test "x$x_libraries" = xNONE; then
56484          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56485            x_libraries="$SYSROOT/usr/X11R6/lib"
56486          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56487            x_libraries="$SYSROOT/usr/lib64"
56488          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56489            x_libraries="$SYSROOT/usr/lib"
56490          fi
56491        fi
56492      fi
56493    fi
56494
56495    # Now let autoconf do it's magic
56496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56497$as_echo_n "checking for X... " >&6; }
56498
56499
56500# Check whether --with-x was given.
56501if test "${with_x+set}" = set; then :
56502  withval=$with_x;
56503fi
56504
56505# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56506if test "x$with_x" = xno; then
56507  # The user explicitly disabled X.
56508  have_x=disabled
56509else
56510  case $x_includes,$x_libraries in #(
56511    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56512    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56513  $as_echo_n "(cached) " >&6
56514else
56515  # One or both of the vars are not set, and there is no cached value.
56516ac_x_includes=no ac_x_libraries=no
56517rm -f -r conftest.dir
56518if mkdir conftest.dir; then
56519  cd conftest.dir
56520  cat >Imakefile <<'_ACEOF'
56521incroot:
56522	@echo incroot='${INCROOT}'
56523usrlibdir:
56524	@echo usrlibdir='${USRLIBDIR}'
56525libdir:
56526	@echo libdir='${LIBDIR}'
56527_ACEOF
56528  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56529    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56530    for ac_var in incroot usrlibdir libdir; do
56531      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56532    done
56533    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56534    for ac_extension in a so sl dylib la dll; do
56535      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56536	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56537	ac_im_usrlibdir=$ac_im_libdir; break
56538      fi
56539    done
56540    # Screen out bogus values from the imake configuration.  They are
56541    # bogus both because they are the default anyway, and because
56542    # using them would break gcc on systems where it needs fixed includes.
56543    case $ac_im_incroot in
56544	/usr/include) ac_x_includes= ;;
56545	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56546    esac
56547    case $ac_im_usrlibdir in
56548	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56549	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56550    esac
56551  fi
56552  cd ..
56553  rm -f -r conftest.dir
56554fi
56555
56556# Standard set of common directories for X headers.
56557# Check X11 before X11Rn because it is often a symlink to the current release.
56558ac_x_header_dirs='
56559/usr/X11/include
56560/usr/X11R7/include
56561/usr/X11R6/include
56562/usr/X11R5/include
56563/usr/X11R4/include
56564
56565/usr/include/X11
56566/usr/include/X11R7
56567/usr/include/X11R6
56568/usr/include/X11R5
56569/usr/include/X11R4
56570
56571/usr/local/X11/include
56572/usr/local/X11R7/include
56573/usr/local/X11R6/include
56574/usr/local/X11R5/include
56575/usr/local/X11R4/include
56576
56577/usr/local/include/X11
56578/usr/local/include/X11R7
56579/usr/local/include/X11R6
56580/usr/local/include/X11R5
56581/usr/local/include/X11R4
56582
56583/usr/X386/include
56584/usr/x386/include
56585/usr/XFree86/include/X11
56586
56587/usr/include
56588/usr/local/include
56589/usr/unsupported/include
56590/usr/athena/include
56591/usr/local/x11r5/include
56592/usr/lpp/Xamples/include
56593
56594/usr/openwin/include
56595/usr/openwin/share/include'
56596
56597if test "$ac_x_includes" = no; then
56598  # Guess where to find include files, by looking for Xlib.h.
56599  # First, try using that file with no special directory specified.
56600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56601/* end confdefs.h.  */
56602#include <X11/Xlib.h>
56603_ACEOF
56604if ac_fn_cxx_try_cpp "$LINENO"; then :
56605  # We can compile using X headers with no special include directory.
56606ac_x_includes=
56607else
56608  for ac_dir in $ac_x_header_dirs; do
56609  if test -r "$ac_dir/X11/Xlib.h"; then
56610    ac_x_includes=$ac_dir
56611    break
56612  fi
56613done
56614fi
56615rm -f conftest.err conftest.i conftest.$ac_ext
56616fi # $ac_x_includes = no
56617
56618if test "$ac_x_libraries" = no; then
56619  # Check for the libraries.
56620  # See if we find them without any special options.
56621  # Don't add to $LIBS permanently.
56622  ac_save_LIBS=$LIBS
56623  LIBS="-lX11 $LIBS"
56624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56625/* end confdefs.h.  */
56626#include <X11/Xlib.h>
56627int
56628main ()
56629{
56630XrmInitialize ()
56631  ;
56632  return 0;
56633}
56634_ACEOF
56635if ac_fn_cxx_try_link "$LINENO"; then :
56636  LIBS=$ac_save_LIBS
56637# We can link X programs with no special library path.
56638ac_x_libraries=
56639else
56640  LIBS=$ac_save_LIBS
56641for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56642do
56643  # Don't even attempt the hair of trying to link an X program!
56644  for ac_extension in a so sl dylib la dll; do
56645    if test -r "$ac_dir/libX11.$ac_extension"; then
56646      ac_x_libraries=$ac_dir
56647      break 2
56648    fi
56649  done
56650done
56651fi
56652rm -f core conftest.err conftest.$ac_objext \
56653    conftest$ac_exeext conftest.$ac_ext
56654fi # $ac_x_libraries = no
56655
56656case $ac_x_includes,$ac_x_libraries in #(
56657  no,* | *,no | *\'*)
56658    # Didn't find X, or a directory has "'" in its name.
56659    ac_cv_have_x="have_x=no";; #(
56660  *)
56661    # Record where we found X for the cache.
56662    ac_cv_have_x="have_x=yes\
56663	ac_x_includes='$ac_x_includes'\
56664	ac_x_libraries='$ac_x_libraries'"
56665esac
56666fi
56667;; #(
56668    *) have_x=yes;;
56669  esac
56670  eval "$ac_cv_have_x"
56671fi # $with_x != no
56672
56673if test "$have_x" != yes; then
56674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56675$as_echo "$have_x" >&6; }
56676  no_x=yes
56677else
56678  # If each of the values was on the command line, it overrides each guess.
56679  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56680  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56681  # Update the cache value to reflect the command line values.
56682  ac_cv_have_x="have_x=yes\
56683	ac_x_includes='$x_includes'\
56684	ac_x_libraries='$x_libraries'"
56685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56686$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56687fi
56688
56689    if test "$no_x" = yes; then
56690  # Not all programs may use this symbol, but it does not hurt to define it.
56691
56692$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56693
56694  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56695else
56696  if test -n "$x_includes"; then
56697    X_CFLAGS="$X_CFLAGS -I$x_includes"
56698  fi
56699
56700  # It would also be nice to do this for all -L options, not just this one.
56701  if test -n "$x_libraries"; then
56702    X_LIBS="$X_LIBS -L$x_libraries"
56703    # For Solaris; some versions of Sun CC require a space after -R and
56704    # others require no space.  Words are not sufficient . . . .
56705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56706$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56707    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56708    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56709    ac_cxx_werror_flag=yes
56710    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56711/* end confdefs.h.  */
56712
56713int
56714main ()
56715{
56716
56717  ;
56718  return 0;
56719}
56720_ACEOF
56721if ac_fn_cxx_try_link "$LINENO"; then :
56722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56723$as_echo "no" >&6; }
56724       X_LIBS="$X_LIBS -R$x_libraries"
56725else
56726  LIBS="$ac_xsave_LIBS -R $x_libraries"
56727       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56728/* end confdefs.h.  */
56729
56730int
56731main ()
56732{
56733
56734  ;
56735  return 0;
56736}
56737_ACEOF
56738if ac_fn_cxx_try_link "$LINENO"; then :
56739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56740$as_echo "yes" >&6; }
56741	  X_LIBS="$X_LIBS -R $x_libraries"
56742else
56743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56744$as_echo "neither works" >&6; }
56745fi
56746rm -f core conftest.err conftest.$ac_objext \
56747    conftest$ac_exeext conftest.$ac_ext
56748fi
56749rm -f core conftest.err conftest.$ac_objext \
56750    conftest$ac_exeext conftest.$ac_ext
56751    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56752    LIBS=$ac_xsave_LIBS
56753  fi
56754
56755  # Check for system-dependent libraries X programs must link with.
56756  # Do this before checking for the system-independent R6 libraries
56757  # (-lICE), since we may need -lsocket or whatever for X linking.
56758
56759  if test "$ISC" = yes; then
56760    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56761  else
56762    # Martyn Johnson says this is needed for Ultrix, if the X
56763    # libraries were built with DECnet support.  And Karl Berry says
56764    # the Alpha needs dnet_stub (dnet does not exist).
56765    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56766    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56767/* end confdefs.h.  */
56768
56769/* Override any GCC internal prototype to avoid an error.
56770   Use char because int might match the return type of a GCC
56771   builtin and then its argument prototype would still apply.  */
56772#ifdef __cplusplus
56773extern "C"
56774#endif
56775char XOpenDisplay ();
56776int
56777main ()
56778{
56779return XOpenDisplay ();
56780  ;
56781  return 0;
56782}
56783_ACEOF
56784if ac_fn_cxx_try_link "$LINENO"; then :
56785
56786else
56787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56788$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56789if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56790  $as_echo_n "(cached) " >&6
56791else
56792  ac_check_lib_save_LIBS=$LIBS
56793LIBS="-ldnet  $LIBS"
56794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56795/* end confdefs.h.  */
56796
56797/* Override any GCC internal prototype to avoid an error.
56798   Use char because int might match the return type of a GCC
56799   builtin and then its argument prototype would still apply.  */
56800#ifdef __cplusplus
56801extern "C"
56802#endif
56803char dnet_ntoa ();
56804int
56805main ()
56806{
56807return dnet_ntoa ();
56808  ;
56809  return 0;
56810}
56811_ACEOF
56812if ac_fn_cxx_try_link "$LINENO"; then :
56813  ac_cv_lib_dnet_dnet_ntoa=yes
56814else
56815  ac_cv_lib_dnet_dnet_ntoa=no
56816fi
56817rm -f core conftest.err conftest.$ac_objext \
56818    conftest$ac_exeext conftest.$ac_ext
56819LIBS=$ac_check_lib_save_LIBS
56820fi
56821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56822$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56823if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56824  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56825fi
56826
56827    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56828      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56829$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56830if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56831  $as_echo_n "(cached) " >&6
56832else
56833  ac_check_lib_save_LIBS=$LIBS
56834LIBS="-ldnet_stub  $LIBS"
56835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56836/* end confdefs.h.  */
56837
56838/* Override any GCC internal prototype to avoid an error.
56839   Use char because int might match the return type of a GCC
56840   builtin and then its argument prototype would still apply.  */
56841#ifdef __cplusplus
56842extern "C"
56843#endif
56844char dnet_ntoa ();
56845int
56846main ()
56847{
56848return dnet_ntoa ();
56849  ;
56850  return 0;
56851}
56852_ACEOF
56853if ac_fn_cxx_try_link "$LINENO"; then :
56854  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56855else
56856  ac_cv_lib_dnet_stub_dnet_ntoa=no
56857fi
56858rm -f core conftest.err conftest.$ac_objext \
56859    conftest$ac_exeext conftest.$ac_ext
56860LIBS=$ac_check_lib_save_LIBS
56861fi
56862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56863$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56864if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56865  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56866fi
56867
56868    fi
56869fi
56870rm -f core conftest.err conftest.$ac_objext \
56871    conftest$ac_exeext conftest.$ac_ext
56872    LIBS="$ac_xsave_LIBS"
56873
56874    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56875    # to get the SysV transport functions.
56876    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56877    # needs -lnsl.
56878    # The nsl library prevents programs from opening the X display
56879    # on Irix 5.2, according to T.E. Dickey.
56880    # The functions gethostbyname, getservbyname, and inet_addr are
56881    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56882    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56883if test "x$ac_cv_func_gethostbyname" = xyes; then :
56884
56885fi
56886
56887    if test $ac_cv_func_gethostbyname = no; then
56888      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56889$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56890if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56891  $as_echo_n "(cached) " >&6
56892else
56893  ac_check_lib_save_LIBS=$LIBS
56894LIBS="-lnsl  $LIBS"
56895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56896/* end confdefs.h.  */
56897
56898/* Override any GCC internal prototype to avoid an error.
56899   Use char because int might match the return type of a GCC
56900   builtin and then its argument prototype would still apply.  */
56901#ifdef __cplusplus
56902extern "C"
56903#endif
56904char gethostbyname ();
56905int
56906main ()
56907{
56908return gethostbyname ();
56909  ;
56910  return 0;
56911}
56912_ACEOF
56913if ac_fn_cxx_try_link "$LINENO"; then :
56914  ac_cv_lib_nsl_gethostbyname=yes
56915else
56916  ac_cv_lib_nsl_gethostbyname=no
56917fi
56918rm -f core conftest.err conftest.$ac_objext \
56919    conftest$ac_exeext conftest.$ac_ext
56920LIBS=$ac_check_lib_save_LIBS
56921fi
56922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56923$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56924if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56925  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56926fi
56927
56928      if test $ac_cv_lib_nsl_gethostbyname = no; then
56929	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56930$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56931if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56932  $as_echo_n "(cached) " >&6
56933else
56934  ac_check_lib_save_LIBS=$LIBS
56935LIBS="-lbsd  $LIBS"
56936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56937/* end confdefs.h.  */
56938
56939/* Override any GCC internal prototype to avoid an error.
56940   Use char because int might match the return type of a GCC
56941   builtin and then its argument prototype would still apply.  */
56942#ifdef __cplusplus
56943extern "C"
56944#endif
56945char gethostbyname ();
56946int
56947main ()
56948{
56949return gethostbyname ();
56950  ;
56951  return 0;
56952}
56953_ACEOF
56954if ac_fn_cxx_try_link "$LINENO"; then :
56955  ac_cv_lib_bsd_gethostbyname=yes
56956else
56957  ac_cv_lib_bsd_gethostbyname=no
56958fi
56959rm -f core conftest.err conftest.$ac_objext \
56960    conftest$ac_exeext conftest.$ac_ext
56961LIBS=$ac_check_lib_save_LIBS
56962fi
56963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56964$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56965if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56966  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56967fi
56968
56969      fi
56970    fi
56971
56972    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56973    # socket/setsockopt and other routines are undefined under SCO ODT
56974    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56975    # on later versions), says Simon Leinen: it contains gethostby*
56976    # variants that don't use the name server (or something).  -lsocket
56977    # must be given before -lnsl if both are needed.  We assume that
56978    # if connect needs -lnsl, so does gethostbyname.
56979    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56980if test "x$ac_cv_func_connect" = xyes; then :
56981
56982fi
56983
56984    if test $ac_cv_func_connect = no; then
56985      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56986$as_echo_n "checking for connect in -lsocket... " >&6; }
56987if ${ac_cv_lib_socket_connect+:} false; then :
56988  $as_echo_n "(cached) " >&6
56989else
56990  ac_check_lib_save_LIBS=$LIBS
56991LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56993/* end confdefs.h.  */
56994
56995/* Override any GCC internal prototype to avoid an error.
56996   Use char because int might match the return type of a GCC
56997   builtin and then its argument prototype would still apply.  */
56998#ifdef __cplusplus
56999extern "C"
57000#endif
57001char connect ();
57002int
57003main ()
57004{
57005return connect ();
57006  ;
57007  return 0;
57008}
57009_ACEOF
57010if ac_fn_cxx_try_link "$LINENO"; then :
57011  ac_cv_lib_socket_connect=yes
57012else
57013  ac_cv_lib_socket_connect=no
57014fi
57015rm -f core conftest.err conftest.$ac_objext \
57016    conftest$ac_exeext conftest.$ac_ext
57017LIBS=$ac_check_lib_save_LIBS
57018fi
57019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57020$as_echo "$ac_cv_lib_socket_connect" >&6; }
57021if test "x$ac_cv_lib_socket_connect" = xyes; then :
57022  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57023fi
57024
57025    fi
57026
57027    # Guillermo Gomez says -lposix is necessary on A/UX.
57028    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57029if test "x$ac_cv_func_remove" = xyes; then :
57030
57031fi
57032
57033    if test $ac_cv_func_remove = no; then
57034      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57035$as_echo_n "checking for remove in -lposix... " >&6; }
57036if ${ac_cv_lib_posix_remove+:} false; then :
57037  $as_echo_n "(cached) " >&6
57038else
57039  ac_check_lib_save_LIBS=$LIBS
57040LIBS="-lposix  $LIBS"
57041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57042/* end confdefs.h.  */
57043
57044/* Override any GCC internal prototype to avoid an error.
57045   Use char because int might match the return type of a GCC
57046   builtin and then its argument prototype would still apply.  */
57047#ifdef __cplusplus
57048extern "C"
57049#endif
57050char remove ();
57051int
57052main ()
57053{
57054return remove ();
57055  ;
57056  return 0;
57057}
57058_ACEOF
57059if ac_fn_cxx_try_link "$LINENO"; then :
57060  ac_cv_lib_posix_remove=yes
57061else
57062  ac_cv_lib_posix_remove=no
57063fi
57064rm -f core conftest.err conftest.$ac_objext \
57065    conftest$ac_exeext conftest.$ac_ext
57066LIBS=$ac_check_lib_save_LIBS
57067fi
57068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57069$as_echo "$ac_cv_lib_posix_remove" >&6; }
57070if test "x$ac_cv_lib_posix_remove" = xyes; then :
57071  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57072fi
57073
57074    fi
57075
57076    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57077    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57078if test "x$ac_cv_func_shmat" = xyes; then :
57079
57080fi
57081
57082    if test $ac_cv_func_shmat = no; then
57083      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57084$as_echo_n "checking for shmat in -lipc... " >&6; }
57085if ${ac_cv_lib_ipc_shmat+:} false; then :
57086  $as_echo_n "(cached) " >&6
57087else
57088  ac_check_lib_save_LIBS=$LIBS
57089LIBS="-lipc  $LIBS"
57090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57091/* end confdefs.h.  */
57092
57093/* Override any GCC internal prototype to avoid an error.
57094   Use char because int might match the return type of a GCC
57095   builtin and then its argument prototype would still apply.  */
57096#ifdef __cplusplus
57097extern "C"
57098#endif
57099char shmat ();
57100int
57101main ()
57102{
57103return shmat ();
57104  ;
57105  return 0;
57106}
57107_ACEOF
57108if ac_fn_cxx_try_link "$LINENO"; then :
57109  ac_cv_lib_ipc_shmat=yes
57110else
57111  ac_cv_lib_ipc_shmat=no
57112fi
57113rm -f core conftest.err conftest.$ac_objext \
57114    conftest$ac_exeext conftest.$ac_ext
57115LIBS=$ac_check_lib_save_LIBS
57116fi
57117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57118$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57119if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57120  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57121fi
57122
57123    fi
57124  fi
57125
57126  # Check for libraries that X11R6 Xt/Xaw programs need.
57127  ac_save_LDFLAGS=$LDFLAGS
57128  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57129  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57130  # check for ICE first), but we must link in the order -lSM -lICE or
57131  # we get undefined symbols.  So assume we have SM if we have ICE.
57132  # These have to be linked with before -lX11, unlike the other
57133  # libraries we check for below, so use a different variable.
57134  # John Interrante, Karl Berry
57135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57136$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57137if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57138  $as_echo_n "(cached) " >&6
57139else
57140  ac_check_lib_save_LIBS=$LIBS
57141LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57143/* end confdefs.h.  */
57144
57145/* Override any GCC internal prototype to avoid an error.
57146   Use char because int might match the return type of a GCC
57147   builtin and then its argument prototype would still apply.  */
57148#ifdef __cplusplus
57149extern "C"
57150#endif
57151char IceConnectionNumber ();
57152int
57153main ()
57154{
57155return IceConnectionNumber ();
57156  ;
57157  return 0;
57158}
57159_ACEOF
57160if ac_fn_cxx_try_link "$LINENO"; then :
57161  ac_cv_lib_ICE_IceConnectionNumber=yes
57162else
57163  ac_cv_lib_ICE_IceConnectionNumber=no
57164fi
57165rm -f core conftest.err conftest.$ac_objext \
57166    conftest$ac_exeext conftest.$ac_ext
57167LIBS=$ac_check_lib_save_LIBS
57168fi
57169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57170$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57171if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57172  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57173fi
57174
57175  LDFLAGS=$ac_save_LDFLAGS
57176
57177fi
57178
57179
57180    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57181    # this doesn't make sense so we remove it.
57182    if test "x$COMPILE_TYPE" = xcross; then
57183      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57184    fi
57185
57186    if test "x$no_x" = xyes; then
57187
57188  # Print a helpful message on how to acquire the necessary build dependency.
57189  # x11 is the help tag: freetype, cups, alsa etc
57190  MISSING_DEPENDENCY=x11
57191
57192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57193    cygwin_help $MISSING_DEPENDENCY
57194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57195    msys_help $MISSING_DEPENDENCY
57196  else
57197    PKGHANDLER_COMMAND=
57198
57199    case $PKGHANDLER in
57200      apt-get)
57201        apt_help     $MISSING_DEPENDENCY ;;
57202      yum)
57203        yum_help     $MISSING_DEPENDENCY ;;
57204      port)
57205        port_help    $MISSING_DEPENDENCY ;;
57206      pkgutil)
57207        pkgutil_help $MISSING_DEPENDENCY ;;
57208      pkgadd)
57209        pkgadd_help  $MISSING_DEPENDENCY ;;
57210    esac
57211
57212    if test "x$PKGHANDLER_COMMAND" != x; then
57213      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57214    fi
57215  fi
57216
57217      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57218    fi
57219
57220    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57221      OPENWIN_HOME="/usr/openwin"
57222      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57223      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
57224          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57225          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
57226          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57227    fi
57228
57229    ac_ext=c
57230ac_cpp='$CPP $CPPFLAGS'
57231ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57232ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57233ac_compiler_gnu=$ac_cv_c_compiler_gnu
57234
57235    OLD_CFLAGS="$CFLAGS"
57236    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57237
57238    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57239    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57240do :
57241  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57242ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57243          # include <X11/Xlib.h>
57244          # include <X11/Xutil.h>
57245
57246
57247"
57248if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57249  cat >>confdefs.h <<_ACEOF
57250#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57251_ACEOF
57252 X11_HEADERS_OK=yes
57253else
57254  X11_HEADERS_OK=no; break
57255fi
57256
57257done
57258
57259
57260    if test "x$X11_HEADERS_OK" = xno; then
57261
57262  # Print a helpful message on how to acquire the necessary build dependency.
57263  # x11 is the help tag: freetype, cups, alsa etc
57264  MISSING_DEPENDENCY=x11
57265
57266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57267    cygwin_help $MISSING_DEPENDENCY
57268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57269    msys_help $MISSING_DEPENDENCY
57270  else
57271    PKGHANDLER_COMMAND=
57272
57273    case $PKGHANDLER in
57274      apt-get)
57275        apt_help     $MISSING_DEPENDENCY ;;
57276      yum)
57277        yum_help     $MISSING_DEPENDENCY ;;
57278      port)
57279        port_help    $MISSING_DEPENDENCY ;;
57280      pkgutil)
57281        pkgutil_help $MISSING_DEPENDENCY ;;
57282      pkgadd)
57283        pkgadd_help  $MISSING_DEPENDENCY ;;
57284    esac
57285
57286    if test "x$PKGHANDLER_COMMAND" != x; then
57287      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57288    fi
57289  fi
57290
57291      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57292    fi
57293
57294    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57295    # defined in libawt_xawt.
57296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57297$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57298    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57299/* end confdefs.h.  */
57300#include <X11/extensions/Xrender.h>
57301int
57302main ()
57303{
57304XLinearGradient x;
57305  ;
57306  return 0;
57307}
57308_ACEOF
57309if ac_fn_c_try_compile "$LINENO"; then :
57310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57311$as_echo "yes" >&6; }
57312else
57313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57314$as_echo "no" >&6; }
57315         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57316fi
57317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57318
57319    CFLAGS="$OLD_CFLAGS"
57320    ac_ext=cpp
57321ac_cpp='$CXXCPP $CPPFLAGS'
57322ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57323ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57324ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57325
57326  fi # NEEDS_LIB_X11
57327
57328
57329
57330
57331
57332
57333# Check whether --with-cups was given.
57334if test "${with_cups+set}" = set; then :
57335  withval=$with_cups;
57336fi
57337
57338
57339# Check whether --with-cups-include was given.
57340if test "${with_cups_include+set}" = set; then :
57341  withval=$with_cups_include;
57342fi
57343
57344
57345  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57346    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57347        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57348      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57349$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57350    fi
57351    CUPS_CFLAGS=
57352  else
57353    CUPS_FOUND=no
57354
57355    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57356      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57357    fi
57358
57359    if test "x${with_cups}" != x; then
57360      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57361$as_echo_n "checking for cups headers... " >&6; }
57362      if test -s "${with_cups}/include/cups/cups.h"; then
57363        CUPS_CFLAGS="-I${with_cups}/include"
57364        CUPS_FOUND=yes
57365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57366$as_echo "$CUPS_FOUND" >&6; }
57367      else
57368        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57369      fi
57370    fi
57371    if test "x${with_cups_include}" != x; then
57372      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57373$as_echo_n "checking for cups headers... " >&6; }
57374      if test -s "${with_cups_include}/cups/cups.h"; then
57375        CUPS_CFLAGS="-I${with_cups_include}"
57376        CUPS_FOUND=yes
57377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57378$as_echo "$CUPS_FOUND" >&6; }
57379      else
57380        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57381      fi
57382    fi
57383    if test "x$CUPS_FOUND" = xno; then
57384      # Are the cups headers installed in the default /usr/include location?
57385      for ac_header in cups/cups.h cups/ppd.h
57386do :
57387  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57388ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57389if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57390  cat >>confdefs.h <<_ACEOF
57391#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57392_ACEOF
57393
57394          CUPS_FOUND=yes
57395          CUPS_CFLAGS=
57396          DEFAULT_CUPS=yes
57397
57398fi
57399
57400done
57401
57402    fi
57403    if test "x$CUPS_FOUND" = xno; then
57404      # Getting nervous now? Lets poke around for standard Solaris third-party
57405      # package installation locations.
57406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57407$as_echo_n "checking for cups headers... " >&6; }
57408      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
57409        # An SFW package seems to be installed!
57410        CUPS_FOUND=yes
57411        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
57412      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
57413        # A CSW package seems to be installed!
57414        CUPS_FOUND=yes
57415        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
57416      fi
57417      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57418$as_echo "$CUPS_FOUND" >&6; }
57419    fi
57420    if test "x$CUPS_FOUND" = xno; then
57421
57422  # Print a helpful message on how to acquire the necessary build dependency.
57423  # cups is the help tag: freetype, cups, alsa etc
57424  MISSING_DEPENDENCY=cups
57425
57426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57427    cygwin_help $MISSING_DEPENDENCY
57428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57429    msys_help $MISSING_DEPENDENCY
57430  else
57431    PKGHANDLER_COMMAND=
57432
57433    case $PKGHANDLER in
57434      apt-get)
57435        apt_help     $MISSING_DEPENDENCY ;;
57436      yum)
57437        yum_help     $MISSING_DEPENDENCY ;;
57438      port)
57439        port_help    $MISSING_DEPENDENCY ;;
57440      pkgutil)
57441        pkgutil_help $MISSING_DEPENDENCY ;;
57442      pkgadd)
57443        pkgadd_help  $MISSING_DEPENDENCY ;;
57444    esac
57445
57446    if test "x$PKGHANDLER_COMMAND" != x; then
57447      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57448    fi
57449  fi
57450
57451      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57452    fi
57453  fi
57454
57455
57456
57457
57458
57459# Check whether --with-freetype was given.
57460if test "${with_freetype+set}" = set; then :
57461  withval=$with_freetype;
57462fi
57463
57464
57465# Check whether --with-freetype-include was given.
57466if test "${with_freetype_include+set}" = set; then :
57467  withval=$with_freetype_include;
57468fi
57469
57470
57471# Check whether --with-freetype-lib was given.
57472if test "${with_freetype_lib+set}" = set; then :
57473  withval=$with_freetype_lib;
57474fi
57475
57476
57477# Check whether --with-freetype-src was given.
57478if test "${with_freetype_src+set}" = set; then :
57479  withval=$with_freetype_src;
57480fi
57481
57482  # Check whether --enable-freetype-bundling was given.
57483if test "${enable_freetype_bundling+set}" = set; then :
57484  enableval=$enable_freetype_bundling;
57485fi
57486
57487
57488  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57489  FREETYPE_BASE_NAME=freetype
57490  FREETYPE_CFLAGS=
57491  FREETYPE_LIBS=
57492  FREETYPE_BUNDLE_LIB_PATH=
57493
57494  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57495    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57496        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57497        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57498        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57499      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57500$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57501    fi
57502    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57503      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57504$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57505    fi
57506  else
57507    # freetype is needed to build; go get it!
57508
57509    BUNDLE_FREETYPE="$enable_freetype_bundling"
57510
57511    if  test "x$with_freetype_src" != x; then
57512      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57513        # Try to build freetype if --with-freetype-src was given on Windows
57514
57515  FREETYPE_SRC_PATH="$with_freetype_src"
57516  BUILD_FREETYPE=yes
57517
57518  # Check if the freetype sources are acessible..
57519  if ! test -d $FREETYPE_SRC_PATH; then
57520    { $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
57521$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57522    BUILD_FREETYPE=no
57523  fi
57524  # ..and contain a vc2010 project file
57525  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57526  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57527    { $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
57528$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57529    BUILD_FREETYPE=no
57530  fi
57531  # Now check if configure found a version of 'msbuild.exe'
57532  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57533    { $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
57534$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;}
57535    BUILD_FREETYPE=no
57536  fi
57537
57538  # Ready to go..
57539  if test "x$BUILD_FREETYPE" = xyes; then
57540    # msbuild requires trailing slashes for output directories
57541    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57542    freetype_lib_path_unix="$freetype_lib_path"
57543    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57544
57545  unix_path="$vcxproj_path"
57546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57547    windows_path=`$CYGPATH -m "$unix_path"`
57548    vcxproj_path="$windows_path"
57549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57550    windows_path=`cmd //c echo $unix_path`
57551    vcxproj_path="$windows_path"
57552  fi
57553
57554
57555  unix_path="$freetype_lib_path"
57556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57557    windows_path=`$CYGPATH -m "$unix_path"`
57558    freetype_lib_path="$windows_path"
57559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57560    windows_path=`cmd //c echo $unix_path`
57561    freetype_lib_path="$windows_path"
57562  fi
57563
57564
57565  unix_path="$freetype_obj_path"
57566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57567    windows_path=`$CYGPATH -m "$unix_path"`
57568    freetype_obj_path="$windows_path"
57569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57570    windows_path=`cmd //c echo $unix_path`
57571    freetype_obj_path="$windows_path"
57572  fi
57573
57574    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57575      freetype_platform=x64
57576    else
57577      freetype_platform=win32
57578    fi
57579
57580    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57581    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57582    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57583    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57584    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57585$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57586
57587    # First we try to build the freetype.dll
57588    $ECHO -e "@echo off\n"\
57589        "$MSBUILD $vcxproj_path "\
57590        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57591        "/p:Configuration=\"Release Multithreaded\" "\
57592        "/p:Platform=$freetype_platform "\
57593        "/p:ConfigurationType=DynamicLibrary "\
57594        "/p:TargetName=freetype "\
57595        "/p:OutDir=\"$freetype_lib_path\" "\
57596        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57597    cmd /c freetype.bat
57598
57599    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57600      # If that succeeds we also build freetype.lib
57601      $ECHO -e "@echo off\n"\
57602          "$MSBUILD $vcxproj_path "\
57603          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57604          "/p:Configuration=\"Release Multithreaded\" "\
57605          "/p:Platform=$freetype_platform "\
57606          "/p:ConfigurationType=StaticLibrary "\
57607          "/p:TargetName=freetype "\
57608          "/p:OutDir=\"$freetype_lib_path\" "\
57609          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57610      cmd /c freetype.bat
57611
57612      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57613        # Once we build both, lib and dll, set freetype lib and include path appropriately
57614        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57615        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57616        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57617$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57618      else
57619        BUILD_FREETYPE=no
57620      fi
57621    else
57622      BUILD_FREETYPE=no
57623    fi
57624  fi
57625
57626        if test "x$BUILD_FREETYPE" = xyes; then
57627          # Okay, we built it. Check that it works.
57628
57629  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57630  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57631  METHOD="--with-freetype-src"
57632
57633  # Let's start with an optimistic view of the world :-)
57634  FOUND_FREETYPE=yes
57635
57636  # First look for the canonical freetype main include file ft2build.h.
57637  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57638    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57639    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57640    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57641      # Fail.
57642      FOUND_FREETYPE=no
57643    fi
57644  fi
57645
57646  if test "x$FOUND_FREETYPE" = xyes; then
57647    # Include file found, let's continue the sanity check.
57648    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57649$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57650
57651    # Reset to default value
57652    FREETYPE_BASE_NAME=freetype
57653    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57654    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57655      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57656          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57657        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57658        # for the .6 version explicitly.
57659        FREETYPE_BASE_NAME=freetype.6
57660        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57661        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57662$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57663      else
57664        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57665$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57666        FOUND_FREETYPE=no
57667      fi
57668    else
57669      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57670        # On Windows, we will need both .lib and .dll file.
57671        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57672          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57673$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57674          FOUND_FREETYPE=no
57675        fi
57676      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57677          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57678        # Found lib in isa dir, use that instead.
57679        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57680        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57681$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57682      fi
57683    fi
57684  fi
57685
57686  if test "x$FOUND_FREETYPE" = xyes; then
57687
57688  # Only process if variable expands to non-empty
57689
57690  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57691    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57692
57693  # Input might be given as Windows format, start by converting to
57694  # unix format.
57695  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57696  new_path=`$CYGPATH -u "$path"`
57697
57698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57701  # "foo.exe" is OK but "foo" is an error.
57702  #
57703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57704  # It is also a way to make sure we got the proper file name for the real test later on.
57705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57706  if test "x$test_shortpath" = x; then
57707    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57708$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57709    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57710  fi
57711
57712  # Call helper function which possibly converts this using DOS-style short mode.
57713  # If so, the updated path is stored in $new_path.
57714
57715  input_path="$new_path"
57716  # Check if we need to convert this using DOS-style short mode. If the path
57717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57718  # take no chances and rewrite it.
57719  # Note: m4 eats our [], so we need to use [ and ] instead.
57720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57721  if test "x$has_forbidden_chars" != x; then
57722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57726      # Going to short mode and back again did indeed matter. Since short mode is
57727      # case insensitive, let's make it lowercase to improve readability.
57728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57729      # Now convert it back to Unix-style (cygpath)
57730      input_path=`$CYGPATH -u "$shortmode_path"`
57731      new_path="$input_path"
57732    fi
57733  fi
57734
57735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57736  if test "x$test_cygdrive_prefix" = x; then
57737    # As a simple fix, exclude /usr/bin since it's not a real path.
57738    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57740      # a path prefixed by /cygdrive for fixpath to work.
57741      new_path="$CYGWIN_ROOT_PATH$input_path"
57742    fi
57743  fi
57744
57745
57746  if test "x$path" != "x$new_path"; then
57747    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57749$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57750  fi
57751
57752    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57753
57754  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57755  has_colon=`$ECHO $path | $GREP ^.:`
57756  new_path="$path"
57757  if test "x$has_colon" = x; then
57758    # Not in mixed or Windows style, start by that.
57759    new_path=`cmd //c echo $path`
57760  fi
57761
57762
57763  input_path="$new_path"
57764  # Check if we need to convert this using DOS-style short mode. If the path
57765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57766  # take no chances and rewrite it.
57767  # Note: m4 eats our [], so we need to use [ and ] instead.
57768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57769  if test "x$has_forbidden_chars" != x; then
57770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57772  fi
57773
57774
57775  windows_path="$new_path"
57776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57777    unix_path=`$CYGPATH -u "$windows_path"`
57778    new_path="$unix_path"
57779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57781    new_path="$unix_path"
57782  fi
57783
57784  if test "x$path" != "x$new_path"; then
57785    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57787$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57788  fi
57789
57790  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57791  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57792
57793    else
57794      # We're on a unix platform. Hooray! :)
57795      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57796      has_space=`$ECHO "$path" | $GREP " "`
57797      if test "x$has_space" != x; then
57798        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57799$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57800        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57801      fi
57802
57803      # Use eval to expand a potential ~
57804      eval path="$path"
57805      if test ! -f "$path" && test ! -d "$path"; then
57806        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57807      fi
57808
57809      if test -d "$path"; then
57810        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57811      else
57812        dir="`$DIRNAME "$path"`"
57813        base="`$BASENAME "$path"`"
57814        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57815      fi
57816    fi
57817  fi
57818
57819
57820  # Only process if variable expands to non-empty
57821
57822  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57824
57825  # Input might be given as Windows format, start by converting to
57826  # unix format.
57827  path="$POTENTIAL_FREETYPE_LIB_PATH"
57828  new_path=`$CYGPATH -u "$path"`
57829
57830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57833  # "foo.exe" is OK but "foo" is an error.
57834  #
57835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57836  # It is also a way to make sure we got the proper file name for the real test later on.
57837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57838  if test "x$test_shortpath" = x; then
57839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57840$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57841    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57842  fi
57843
57844  # Call helper function which possibly converts this using DOS-style short mode.
57845  # If so, the updated path is stored in $new_path.
57846
57847  input_path="$new_path"
57848  # Check if we need to convert this using DOS-style short mode. If the path
57849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57850  # take no chances and rewrite it.
57851  # Note: m4 eats our [], so we need to use [ and ] instead.
57852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57853  if test "x$has_forbidden_chars" != x; then
57854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57858      # Going to short mode and back again did indeed matter. Since short mode is
57859      # case insensitive, let's make it lowercase to improve readability.
57860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57861      # Now convert it back to Unix-style (cygpath)
57862      input_path=`$CYGPATH -u "$shortmode_path"`
57863      new_path="$input_path"
57864    fi
57865  fi
57866
57867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57868  if test "x$test_cygdrive_prefix" = x; then
57869    # As a simple fix, exclude /usr/bin since it's not a real path.
57870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57872      # a path prefixed by /cygdrive for fixpath to work.
57873      new_path="$CYGWIN_ROOT_PATH$input_path"
57874    fi
57875  fi
57876
57877
57878  if test "x$path" != "x$new_path"; then
57879    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57881$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57882  fi
57883
57884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57885
57886  path="$POTENTIAL_FREETYPE_LIB_PATH"
57887  has_colon=`$ECHO $path | $GREP ^.:`
57888  new_path="$path"
57889  if test "x$has_colon" = x; then
57890    # Not in mixed or Windows style, start by that.
57891    new_path=`cmd //c echo $path`
57892  fi
57893
57894
57895  input_path="$new_path"
57896  # Check if we need to convert this using DOS-style short mode. If the path
57897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57898  # take no chances and rewrite it.
57899  # Note: m4 eats our [], so we need to use [ and ] instead.
57900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57901  if test "x$has_forbidden_chars" != x; then
57902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57904  fi
57905
57906
57907  windows_path="$new_path"
57908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57909    unix_path=`$CYGPATH -u "$windows_path"`
57910    new_path="$unix_path"
57911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57913    new_path="$unix_path"
57914  fi
57915
57916  if test "x$path" != "x$new_path"; then
57917    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57919$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57920  fi
57921
57922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57924
57925    else
57926      # We're on a unix platform. Hooray! :)
57927      path="$POTENTIAL_FREETYPE_LIB_PATH"
57928      has_space=`$ECHO "$path" | $GREP " "`
57929      if test "x$has_space" != x; then
57930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57931$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57932        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57933      fi
57934
57935      # Use eval to expand a potential ~
57936      eval path="$path"
57937      if test ! -f "$path" && test ! -d "$path"; then
57938        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57939      fi
57940
57941      if test -d "$path"; then
57942        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57943      else
57944        dir="`$DIRNAME "$path"`"
57945        base="`$BASENAME "$path"`"
57946        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57947      fi
57948    fi
57949  fi
57950
57951
57952    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57954$as_echo_n "checking for freetype includes... " >&6; }
57955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57956$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57957    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57959$as_echo_n "checking for freetype libraries... " >&6; }
57960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57961$as_echo "$FREETYPE_LIB_PATH" >&6; }
57962  fi
57963
57964          if test "x$FOUND_FREETYPE" != xyes; then
57965            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57966          fi
57967        else
57968          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57969$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57970          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57971        fi
57972      else
57973        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57974$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57975      fi
57976    fi
57977
57978    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57979      # User has specified settings
57980
57981      if test "x$BUNDLE_FREETYPE" = x; then
57982        # If not specified, default is to bundle freetype
57983        BUNDLE_FREETYPE=yes
57984      fi
57985
57986      if test "x$with_freetype" != x; then
57987        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57988        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57989      fi
57990
57991      # Allow --with-freetype-lib and --with-freetype-include to override
57992      if test "x$with_freetype_include" != x; then
57993        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57994      fi
57995      if test "x$with_freetype_lib" != x; then
57996        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57997      fi
57998
57999      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58000        # Okay, we got it. Check that it works.
58001
58002  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58003  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58004  METHOD="--with-freetype"
58005
58006  # Let's start with an optimistic view of the world :-)
58007  FOUND_FREETYPE=yes
58008
58009  # First look for the canonical freetype main include file ft2build.h.
58010  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58011    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58012    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58013    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58014      # Fail.
58015      FOUND_FREETYPE=no
58016    fi
58017  fi
58018
58019  if test "x$FOUND_FREETYPE" = xyes; then
58020    # Include file found, let's continue the sanity check.
58021    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58022$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58023
58024    # Reset to default value
58025    FREETYPE_BASE_NAME=freetype
58026    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58027    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58028      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58029          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58030        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58031        # for the .6 version explicitly.
58032        FREETYPE_BASE_NAME=freetype.6
58033        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58034        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58035$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58036      else
58037        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58038$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58039        FOUND_FREETYPE=no
58040      fi
58041    else
58042      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58043        # On Windows, we will need both .lib and .dll file.
58044        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58045          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58046$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58047          FOUND_FREETYPE=no
58048        fi
58049      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58050          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58051        # Found lib in isa dir, use that instead.
58052        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58053        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58054$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58055      fi
58056    fi
58057  fi
58058
58059  if test "x$FOUND_FREETYPE" = xyes; then
58060
58061  # Only process if variable expands to non-empty
58062
58063  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58065
58066  # Input might be given as Windows format, start by converting to
58067  # unix format.
58068  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58069  new_path=`$CYGPATH -u "$path"`
58070
58071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58074  # "foo.exe" is OK but "foo" is an error.
58075  #
58076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58077  # It is also a way to make sure we got the proper file name for the real test later on.
58078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58079  if test "x$test_shortpath" = x; then
58080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58081$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58082    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58083  fi
58084
58085  # Call helper function which possibly converts this using DOS-style short mode.
58086  # If so, the updated path is stored in $new_path.
58087
58088  input_path="$new_path"
58089  # Check if we need to convert this using DOS-style short mode. If the path
58090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58091  # take no chances and rewrite it.
58092  # Note: m4 eats our [], so we need to use [ and ] instead.
58093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58094  if test "x$has_forbidden_chars" != x; then
58095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58099      # Going to short mode and back again did indeed matter. Since short mode is
58100      # case insensitive, let's make it lowercase to improve readability.
58101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58102      # Now convert it back to Unix-style (cygpath)
58103      input_path=`$CYGPATH -u "$shortmode_path"`
58104      new_path="$input_path"
58105    fi
58106  fi
58107
58108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58109  if test "x$test_cygdrive_prefix" = x; then
58110    # As a simple fix, exclude /usr/bin since it's not a real path.
58111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58113      # a path prefixed by /cygdrive for fixpath to work.
58114      new_path="$CYGWIN_ROOT_PATH$input_path"
58115    fi
58116  fi
58117
58118
58119  if test "x$path" != "x$new_path"; then
58120    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58122$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58123  fi
58124
58125    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58126
58127  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58128  has_colon=`$ECHO $path | $GREP ^.:`
58129  new_path="$path"
58130  if test "x$has_colon" = x; then
58131    # Not in mixed or Windows style, start by that.
58132    new_path=`cmd //c echo $path`
58133  fi
58134
58135
58136  input_path="$new_path"
58137  # Check if we need to convert this using DOS-style short mode. If the path
58138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58139  # take no chances and rewrite it.
58140  # Note: m4 eats our [], so we need to use [ and ] instead.
58141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58142  if test "x$has_forbidden_chars" != x; then
58143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58145  fi
58146
58147
58148  windows_path="$new_path"
58149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58150    unix_path=`$CYGPATH -u "$windows_path"`
58151    new_path="$unix_path"
58152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58154    new_path="$unix_path"
58155  fi
58156
58157  if test "x$path" != "x$new_path"; then
58158    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58160$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58161  fi
58162
58163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58165
58166    else
58167      # We're on a unix platform. Hooray! :)
58168      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58169      has_space=`$ECHO "$path" | $GREP " "`
58170      if test "x$has_space" != x; then
58171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58172$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58173        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58174      fi
58175
58176      # Use eval to expand a potential ~
58177      eval path="$path"
58178      if test ! -f "$path" && test ! -d "$path"; then
58179        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58180      fi
58181
58182      if test -d "$path"; then
58183        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58184      else
58185        dir="`$DIRNAME "$path"`"
58186        base="`$BASENAME "$path"`"
58187        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58188      fi
58189    fi
58190  fi
58191
58192
58193  # Only process if variable expands to non-empty
58194
58195  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58197
58198  # Input might be given as Windows format, start by converting to
58199  # unix format.
58200  path="$POTENTIAL_FREETYPE_LIB_PATH"
58201  new_path=`$CYGPATH -u "$path"`
58202
58203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58206  # "foo.exe" is OK but "foo" is an error.
58207  #
58208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58209  # It is also a way to make sure we got the proper file name for the real test later on.
58210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58211  if test "x$test_shortpath" = x; then
58212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58214    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58215  fi
58216
58217  # Call helper function which possibly converts this using DOS-style short mode.
58218  # If so, the updated path is stored in $new_path.
58219
58220  input_path="$new_path"
58221  # Check if we need to convert this using DOS-style short mode. If the path
58222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58223  # take no chances and rewrite it.
58224  # Note: m4 eats our [], so we need to use [ and ] instead.
58225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58226  if test "x$has_forbidden_chars" != x; then
58227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58231      # Going to short mode and back again did indeed matter. Since short mode is
58232      # case insensitive, let's make it lowercase to improve readability.
58233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58234      # Now convert it back to Unix-style (cygpath)
58235      input_path=`$CYGPATH -u "$shortmode_path"`
58236      new_path="$input_path"
58237    fi
58238  fi
58239
58240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58241  if test "x$test_cygdrive_prefix" = x; then
58242    # As a simple fix, exclude /usr/bin since it's not a real path.
58243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58245      # a path prefixed by /cygdrive for fixpath to work.
58246      new_path="$CYGWIN_ROOT_PATH$input_path"
58247    fi
58248  fi
58249
58250
58251  if test "x$path" != "x$new_path"; then
58252    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58254$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58255  fi
58256
58257    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58258
58259  path="$POTENTIAL_FREETYPE_LIB_PATH"
58260  has_colon=`$ECHO $path | $GREP ^.:`
58261  new_path="$path"
58262  if test "x$has_colon" = x; then
58263    # Not in mixed or Windows style, start by that.
58264    new_path=`cmd //c echo $path`
58265  fi
58266
58267
58268  input_path="$new_path"
58269  # Check if we need to convert this using DOS-style short mode. If the path
58270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58271  # take no chances and rewrite it.
58272  # Note: m4 eats our [], so we need to use [ and ] instead.
58273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58274  if test "x$has_forbidden_chars" != x; then
58275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58277  fi
58278
58279
58280  windows_path="$new_path"
58281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58282    unix_path=`$CYGPATH -u "$windows_path"`
58283    new_path="$unix_path"
58284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58286    new_path="$unix_path"
58287  fi
58288
58289  if test "x$path" != "x$new_path"; then
58290    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58293  fi
58294
58295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58297
58298    else
58299      # We're on a unix platform. Hooray! :)
58300      path="$POTENTIAL_FREETYPE_LIB_PATH"
58301      has_space=`$ECHO "$path" | $GREP " "`
58302      if test "x$has_space" != x; then
58303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58304$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58305        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58306      fi
58307
58308      # Use eval to expand a potential ~
58309      eval path="$path"
58310      if test ! -f "$path" && test ! -d "$path"; then
58311        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58312      fi
58313
58314      if test -d "$path"; then
58315        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58316      else
58317        dir="`$DIRNAME "$path"`"
58318        base="`$BASENAME "$path"`"
58319        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58320      fi
58321    fi
58322  fi
58323
58324
58325    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58327$as_echo_n "checking for freetype includes... " >&6; }
58328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58329$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58330    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58332$as_echo_n "checking for freetype libraries... " >&6; }
58333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58334$as_echo "$FREETYPE_LIB_PATH" >&6; }
58335  fi
58336
58337        if test "x$FOUND_FREETYPE" != xyes; then
58338          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58339        fi
58340      else
58341        # User specified only one of lib or include. This is an error.
58342        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58343          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58344$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58345          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58346        else
58347          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58348$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58349          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58350        fi
58351      fi
58352    else
58353      # User did not specify settings, but we need freetype. Try to locate it.
58354
58355      if test "x$BUNDLE_FREETYPE" = x; then
58356        # If not specified, default is to bundle freetype only on windows
58357        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58358          BUNDLE_FREETYPE=yes
58359        else
58360          BUNDLE_FREETYPE=no
58361        fi
58362      fi
58363
58364      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58365      if test "x$SYSROOT" = x; then
58366        if test "x$FOUND_FREETYPE" != xyes; then
58367          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58368          if test "x$PKG_CONFIG" != x; then
58369
58370pkg_failed=no
58371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58372$as_echo_n "checking for FREETYPE... " >&6; }
58373
58374if test -n "$FREETYPE_CFLAGS"; then
58375    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58376 elif test -n "$PKG_CONFIG"; then
58377    if test -n "$PKG_CONFIG" && \
58378    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58379  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58380  ac_status=$?
58381  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58382  test $ac_status = 0; }; then
58383  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58384else
58385  pkg_failed=yes
58386fi
58387 else
58388    pkg_failed=untried
58389fi
58390if test -n "$FREETYPE_LIBS"; then
58391    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58392 elif test -n "$PKG_CONFIG"; then
58393    if test -n "$PKG_CONFIG" && \
58394    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58395  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58396  ac_status=$?
58397  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58398  test $ac_status = 0; }; then
58399  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58400else
58401  pkg_failed=yes
58402fi
58403 else
58404    pkg_failed=untried
58405fi
58406
58407
58408
58409if test $pkg_failed = yes; then
58410
58411if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58412        _pkg_short_errors_supported=yes
58413else
58414        _pkg_short_errors_supported=no
58415fi
58416        if test $_pkg_short_errors_supported = yes; then
58417	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58418        else
58419	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58420        fi
58421	# Put the nasty error message in config.log where it belongs
58422	echo "$FREETYPE_PKG_ERRORS" >&5
58423
58424	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58425$as_echo "no" >&6; }
58426                FOUND_FREETYPE=no
58427elif test $pkg_failed = untried; then
58428	FOUND_FREETYPE=no
58429else
58430	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58431	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58433$as_echo "yes" >&6; }
58434	FOUND_FREETYPE=yes
58435fi
58436            if test "x$FOUND_FREETYPE" = xyes; then
58437              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58438              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58439              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58440              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58441                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58442              fi
58443              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58444              if test "x$BUNDLE_FREETYPE" = xyes; then
58445                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58446$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58447                FOUND_FREETYPE=no
58448              else
58449                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58450$as_echo_n "checking for freetype... " >&6; }
58451                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58452$as_echo "yes (using pkg-config)" >&6; }
58453              fi
58454            fi
58455          fi
58456        fi
58457      fi
58458
58459      if test "x$FOUND_FREETYPE" != xyes; then
58460        # Check in well-known locations
58461        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58462          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58463
58464  windows_path="$FREETYPE_BASE_DIR"
58465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58466    unix_path=`$CYGPATH -u "$windows_path"`
58467    FREETYPE_BASE_DIR="$unix_path"
58468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58470    FREETYPE_BASE_DIR="$unix_path"
58471  fi
58472
58473
58474  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58475  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58476  METHOD="well-known location"
58477
58478  # Let's start with an optimistic view of the world :-)
58479  FOUND_FREETYPE=yes
58480
58481  # First look for the canonical freetype main include file ft2build.h.
58482  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58483    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58484    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58485    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58486      # Fail.
58487      FOUND_FREETYPE=no
58488    fi
58489  fi
58490
58491  if test "x$FOUND_FREETYPE" = xyes; then
58492    # Include file found, let's continue the sanity check.
58493    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58494$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58495
58496    # Reset to default value
58497    FREETYPE_BASE_NAME=freetype
58498    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58499    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58500      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58501          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58502        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58503        # for the .6 version explicitly.
58504        FREETYPE_BASE_NAME=freetype.6
58505        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58506        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58507$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58508      else
58509        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58510$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58511        FOUND_FREETYPE=no
58512      fi
58513    else
58514      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58515        # On Windows, we will need both .lib and .dll file.
58516        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58517          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58518$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58519          FOUND_FREETYPE=no
58520        fi
58521      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58522          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58523        # Found lib in isa dir, use that instead.
58524        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58525        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58526$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58527      fi
58528    fi
58529  fi
58530
58531  if test "x$FOUND_FREETYPE" = xyes; then
58532
58533  # Only process if variable expands to non-empty
58534
58535  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58537
58538  # Input might be given as Windows format, start by converting to
58539  # unix format.
58540  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58541  new_path=`$CYGPATH -u "$path"`
58542
58543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58546  # "foo.exe" is OK but "foo" is an error.
58547  #
58548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58549  # It is also a way to make sure we got the proper file name for the real test later on.
58550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58551  if test "x$test_shortpath" = x; then
58552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58553$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58554    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58555  fi
58556
58557  # Call helper function which possibly converts this using DOS-style short mode.
58558  # If so, the updated path is stored in $new_path.
58559
58560  input_path="$new_path"
58561  # Check if we need to convert this using DOS-style short mode. If the path
58562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58563  # take no chances and rewrite it.
58564  # Note: m4 eats our [], so we need to use [ and ] instead.
58565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58566  if test "x$has_forbidden_chars" != x; then
58567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58571      # Going to short mode and back again did indeed matter. Since short mode is
58572      # case insensitive, let's make it lowercase to improve readability.
58573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58574      # Now convert it back to Unix-style (cygpath)
58575      input_path=`$CYGPATH -u "$shortmode_path"`
58576      new_path="$input_path"
58577    fi
58578  fi
58579
58580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58581  if test "x$test_cygdrive_prefix" = x; then
58582    # As a simple fix, exclude /usr/bin since it's not a real path.
58583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58585      # a path prefixed by /cygdrive for fixpath to work.
58586      new_path="$CYGWIN_ROOT_PATH$input_path"
58587    fi
58588  fi
58589
58590
58591  if test "x$path" != "x$new_path"; then
58592    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58594$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58595  fi
58596
58597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58598
58599  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58600  has_colon=`$ECHO $path | $GREP ^.:`
58601  new_path="$path"
58602  if test "x$has_colon" = x; then
58603    # Not in mixed or Windows style, start by that.
58604    new_path=`cmd //c echo $path`
58605  fi
58606
58607
58608  input_path="$new_path"
58609  # Check if we need to convert this using DOS-style short mode. If the path
58610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58611  # take no chances and rewrite it.
58612  # Note: m4 eats our [], so we need to use [ and ] instead.
58613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58614  if test "x$has_forbidden_chars" != x; then
58615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58617  fi
58618
58619
58620  windows_path="$new_path"
58621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58622    unix_path=`$CYGPATH -u "$windows_path"`
58623    new_path="$unix_path"
58624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58626    new_path="$unix_path"
58627  fi
58628
58629  if test "x$path" != "x$new_path"; then
58630    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58632$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58633  fi
58634
58635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58637
58638    else
58639      # We're on a unix platform. Hooray! :)
58640      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58641      has_space=`$ECHO "$path" | $GREP " "`
58642      if test "x$has_space" != x; then
58643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58644$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58645        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58646      fi
58647
58648      # Use eval to expand a potential ~
58649      eval path="$path"
58650      if test ! -f "$path" && test ! -d "$path"; then
58651        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58652      fi
58653
58654      if test -d "$path"; then
58655        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58656      else
58657        dir="`$DIRNAME "$path"`"
58658        base="`$BASENAME "$path"`"
58659        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58660      fi
58661    fi
58662  fi
58663
58664
58665  # Only process if variable expands to non-empty
58666
58667  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58669
58670  # Input might be given as Windows format, start by converting to
58671  # unix format.
58672  path="$POTENTIAL_FREETYPE_LIB_PATH"
58673  new_path=`$CYGPATH -u "$path"`
58674
58675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58678  # "foo.exe" is OK but "foo" is an error.
58679  #
58680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58681  # It is also a way to make sure we got the proper file name for the real test later on.
58682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58683  if test "x$test_shortpath" = x; then
58684    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58685$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58686    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58687  fi
58688
58689  # Call helper function which possibly converts this using DOS-style short mode.
58690  # If so, the updated path is stored in $new_path.
58691
58692  input_path="$new_path"
58693  # Check if we need to convert this using DOS-style short mode. If the path
58694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58695  # take no chances and rewrite it.
58696  # Note: m4 eats our [], so we need to use [ and ] instead.
58697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58698  if test "x$has_forbidden_chars" != x; then
58699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58703      # Going to short mode and back again did indeed matter. Since short mode is
58704      # case insensitive, let's make it lowercase to improve readability.
58705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58706      # Now convert it back to Unix-style (cygpath)
58707      input_path=`$CYGPATH -u "$shortmode_path"`
58708      new_path="$input_path"
58709    fi
58710  fi
58711
58712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58713  if test "x$test_cygdrive_prefix" = x; then
58714    # As a simple fix, exclude /usr/bin since it's not a real path.
58715    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58717      # a path prefixed by /cygdrive for fixpath to work.
58718      new_path="$CYGWIN_ROOT_PATH$input_path"
58719    fi
58720  fi
58721
58722
58723  if test "x$path" != "x$new_path"; then
58724    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58726$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58727  fi
58728
58729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58730
58731  path="$POTENTIAL_FREETYPE_LIB_PATH"
58732  has_colon=`$ECHO $path | $GREP ^.:`
58733  new_path="$path"
58734  if test "x$has_colon" = x; then
58735    # Not in mixed or Windows style, start by that.
58736    new_path=`cmd //c echo $path`
58737  fi
58738
58739
58740  input_path="$new_path"
58741  # Check if we need to convert this using DOS-style short mode. If the path
58742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58743  # take no chances and rewrite it.
58744  # Note: m4 eats our [], so we need to use [ and ] instead.
58745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58746  if test "x$has_forbidden_chars" != x; then
58747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58749  fi
58750
58751
58752  windows_path="$new_path"
58753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58754    unix_path=`$CYGPATH -u "$windows_path"`
58755    new_path="$unix_path"
58756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58758    new_path="$unix_path"
58759  fi
58760
58761  if test "x$path" != "x$new_path"; then
58762    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58764$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58765  fi
58766
58767  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58768  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58769
58770    else
58771      # We're on a unix platform. Hooray! :)
58772      path="$POTENTIAL_FREETYPE_LIB_PATH"
58773      has_space=`$ECHO "$path" | $GREP " "`
58774      if test "x$has_space" != x; then
58775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58776$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58777        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58778      fi
58779
58780      # Use eval to expand a potential ~
58781      eval path="$path"
58782      if test ! -f "$path" && test ! -d "$path"; then
58783        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58784      fi
58785
58786      if test -d "$path"; then
58787        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58788      else
58789        dir="`$DIRNAME "$path"`"
58790        base="`$BASENAME "$path"`"
58791        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58792      fi
58793    fi
58794  fi
58795
58796
58797    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58798    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58799$as_echo_n "checking for freetype includes... " >&6; }
58800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58801$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58802    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58804$as_echo_n "checking for freetype libraries... " >&6; }
58805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58806$as_echo "$FREETYPE_LIB_PATH" >&6; }
58807  fi
58808
58809          if test "x$FOUND_FREETYPE" != xyes; then
58810            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58811
58812  windows_path="$FREETYPE_BASE_DIR"
58813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58814    unix_path=`$CYGPATH -u "$windows_path"`
58815    FREETYPE_BASE_DIR="$unix_path"
58816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58818    FREETYPE_BASE_DIR="$unix_path"
58819  fi
58820
58821
58822  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58823  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58824  METHOD="well-known location"
58825
58826  # Let's start with an optimistic view of the world :-)
58827  FOUND_FREETYPE=yes
58828
58829  # First look for the canonical freetype main include file ft2build.h.
58830  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58831    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58832    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58833    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58834      # Fail.
58835      FOUND_FREETYPE=no
58836    fi
58837  fi
58838
58839  if test "x$FOUND_FREETYPE" = xyes; then
58840    # Include file found, let's continue the sanity check.
58841    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58842$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58843
58844    # Reset to default value
58845    FREETYPE_BASE_NAME=freetype
58846    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58847    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58848      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58849          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58850        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58851        # for the .6 version explicitly.
58852        FREETYPE_BASE_NAME=freetype.6
58853        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58854        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58855$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58856      else
58857        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58858$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58859        FOUND_FREETYPE=no
58860      fi
58861    else
58862      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58863        # On Windows, we will need both .lib and .dll file.
58864        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58865          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58866$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58867          FOUND_FREETYPE=no
58868        fi
58869      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58870          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58871        # Found lib in isa dir, use that instead.
58872        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58873        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58874$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58875      fi
58876    fi
58877  fi
58878
58879  if test "x$FOUND_FREETYPE" = xyes; then
58880
58881  # Only process if variable expands to non-empty
58882
58883  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58885
58886  # Input might be given as Windows format, start by converting to
58887  # unix format.
58888  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58889  new_path=`$CYGPATH -u "$path"`
58890
58891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58894  # "foo.exe" is OK but "foo" is an error.
58895  #
58896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58897  # It is also a way to make sure we got the proper file name for the real test later on.
58898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58899  if test "x$test_shortpath" = x; then
58900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58901$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58902    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58903  fi
58904
58905  # Call helper function which possibly converts this using DOS-style short mode.
58906  # If so, the updated path is stored in $new_path.
58907
58908  input_path="$new_path"
58909  # Check if we need to convert this using DOS-style short mode. If the path
58910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58911  # take no chances and rewrite it.
58912  # Note: m4 eats our [], so we need to use [ and ] instead.
58913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58914  if test "x$has_forbidden_chars" != x; then
58915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58919      # Going to short mode and back again did indeed matter. Since short mode is
58920      # case insensitive, let's make it lowercase to improve readability.
58921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58922      # Now convert it back to Unix-style (cygpath)
58923      input_path=`$CYGPATH -u "$shortmode_path"`
58924      new_path="$input_path"
58925    fi
58926  fi
58927
58928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58929  if test "x$test_cygdrive_prefix" = x; then
58930    # As a simple fix, exclude /usr/bin since it's not a real path.
58931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58933      # a path prefixed by /cygdrive for fixpath to work.
58934      new_path="$CYGWIN_ROOT_PATH$input_path"
58935    fi
58936  fi
58937
58938
58939  if test "x$path" != "x$new_path"; then
58940    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58942$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58943  fi
58944
58945    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58946
58947  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58948  has_colon=`$ECHO $path | $GREP ^.:`
58949  new_path="$path"
58950  if test "x$has_colon" = x; then
58951    # Not in mixed or Windows style, start by that.
58952    new_path=`cmd //c echo $path`
58953  fi
58954
58955
58956  input_path="$new_path"
58957  # Check if we need to convert this using DOS-style short mode. If the path
58958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58959  # take no chances and rewrite it.
58960  # Note: m4 eats our [], so we need to use [ and ] instead.
58961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58962  if test "x$has_forbidden_chars" != x; then
58963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58965  fi
58966
58967
58968  windows_path="$new_path"
58969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58970    unix_path=`$CYGPATH -u "$windows_path"`
58971    new_path="$unix_path"
58972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58974    new_path="$unix_path"
58975  fi
58976
58977  if test "x$path" != "x$new_path"; then
58978    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58980$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58981  fi
58982
58983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58985
58986    else
58987      # We're on a unix platform. Hooray! :)
58988      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58989      has_space=`$ECHO "$path" | $GREP " "`
58990      if test "x$has_space" != x; then
58991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58992$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58993        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58994      fi
58995
58996      # Use eval to expand a potential ~
58997      eval path="$path"
58998      if test ! -f "$path" && test ! -d "$path"; then
58999        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59000      fi
59001
59002      if test -d "$path"; then
59003        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59004      else
59005        dir="`$DIRNAME "$path"`"
59006        base="`$BASENAME "$path"`"
59007        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59008      fi
59009    fi
59010  fi
59011
59012
59013  # Only process if variable expands to non-empty
59014
59015  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59017
59018  # Input might be given as Windows format, start by converting to
59019  # unix format.
59020  path="$POTENTIAL_FREETYPE_LIB_PATH"
59021  new_path=`$CYGPATH -u "$path"`
59022
59023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59026  # "foo.exe" is OK but "foo" is an error.
59027  #
59028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59029  # It is also a way to make sure we got the proper file name for the real test later on.
59030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59031  if test "x$test_shortpath" = x; then
59032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59033$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59034    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59035  fi
59036
59037  # Call helper function which possibly converts this using DOS-style short mode.
59038  # If so, the updated path is stored in $new_path.
59039
59040  input_path="$new_path"
59041  # Check if we need to convert this using DOS-style short mode. If the path
59042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59043  # take no chances and rewrite it.
59044  # Note: m4 eats our [], so we need to use [ and ] instead.
59045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59046  if test "x$has_forbidden_chars" != x; then
59047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59051      # Going to short mode and back again did indeed matter. Since short mode is
59052      # case insensitive, let's make it lowercase to improve readability.
59053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59054      # Now convert it back to Unix-style (cygpath)
59055      input_path=`$CYGPATH -u "$shortmode_path"`
59056      new_path="$input_path"
59057    fi
59058  fi
59059
59060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59061  if test "x$test_cygdrive_prefix" = x; then
59062    # As a simple fix, exclude /usr/bin since it's not a real path.
59063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59065      # a path prefixed by /cygdrive for fixpath to work.
59066      new_path="$CYGWIN_ROOT_PATH$input_path"
59067    fi
59068  fi
59069
59070
59071  if test "x$path" != "x$new_path"; then
59072    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59074$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59075  fi
59076
59077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59078
59079  path="$POTENTIAL_FREETYPE_LIB_PATH"
59080  has_colon=`$ECHO $path | $GREP ^.:`
59081  new_path="$path"
59082  if test "x$has_colon" = x; then
59083    # Not in mixed or Windows style, start by that.
59084    new_path=`cmd //c echo $path`
59085  fi
59086
59087
59088  input_path="$new_path"
59089  # Check if we need to convert this using DOS-style short mode. If the path
59090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59091  # take no chances and rewrite it.
59092  # Note: m4 eats our [], so we need to use [ and ] instead.
59093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59094  if test "x$has_forbidden_chars" != x; then
59095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59097  fi
59098
59099
59100  windows_path="$new_path"
59101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59102    unix_path=`$CYGPATH -u "$windows_path"`
59103    new_path="$unix_path"
59104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59106    new_path="$unix_path"
59107  fi
59108
59109  if test "x$path" != "x$new_path"; then
59110    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59112$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59113  fi
59114
59115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59117
59118    else
59119      # We're on a unix platform. Hooray! :)
59120      path="$POTENTIAL_FREETYPE_LIB_PATH"
59121      has_space=`$ECHO "$path" | $GREP " "`
59122      if test "x$has_space" != x; then
59123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59124$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59125        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59126      fi
59127
59128      # Use eval to expand a potential ~
59129      eval path="$path"
59130      if test ! -f "$path" && test ! -d "$path"; then
59131        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59132      fi
59133
59134      if test -d "$path"; then
59135        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59136      else
59137        dir="`$DIRNAME "$path"`"
59138        base="`$BASENAME "$path"`"
59139        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59140      fi
59141    fi
59142  fi
59143
59144
59145    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59147$as_echo_n "checking for freetype includes... " >&6; }
59148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59149$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59150    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59152$as_echo_n "checking for freetype libraries... " >&6; }
59153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59154$as_echo "$FREETYPE_LIB_PATH" >&6; }
59155  fi
59156
59157          fi
59158          if test "x$FOUND_FREETYPE" != xyes; then
59159            FREETYPE_BASE_DIR="$HOME/freetype"
59160
59161  windows_path="$FREETYPE_BASE_DIR"
59162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59163    unix_path=`$CYGPATH -u "$windows_path"`
59164    FREETYPE_BASE_DIR="$unix_path"
59165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59167    FREETYPE_BASE_DIR="$unix_path"
59168  fi
59169
59170            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59171
59172  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59173  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59174  METHOD="well-known location"
59175
59176  # Let's start with an optimistic view of the world :-)
59177  FOUND_FREETYPE=yes
59178
59179  # First look for the canonical freetype main include file ft2build.h.
59180  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59181    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59182    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59183    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59184      # Fail.
59185      FOUND_FREETYPE=no
59186    fi
59187  fi
59188
59189  if test "x$FOUND_FREETYPE" = xyes; then
59190    # Include file found, let's continue the sanity check.
59191    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59192$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59193
59194    # Reset to default value
59195    FREETYPE_BASE_NAME=freetype
59196    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59197    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59198      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59199          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59200        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59201        # for the .6 version explicitly.
59202        FREETYPE_BASE_NAME=freetype.6
59203        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59204        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59205$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59206      else
59207        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59208$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59209        FOUND_FREETYPE=no
59210      fi
59211    else
59212      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59213        # On Windows, we will need both .lib and .dll file.
59214        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59215          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59216$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59217          FOUND_FREETYPE=no
59218        fi
59219      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59220          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59221        # Found lib in isa dir, use that instead.
59222        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59223        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59224$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59225      fi
59226    fi
59227  fi
59228
59229  if test "x$FOUND_FREETYPE" = xyes; then
59230
59231  # Only process if variable expands to non-empty
59232
59233  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59235
59236  # Input might be given as Windows format, start by converting to
59237  # unix format.
59238  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59239  new_path=`$CYGPATH -u "$path"`
59240
59241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59244  # "foo.exe" is OK but "foo" is an error.
59245  #
59246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59247  # It is also a way to make sure we got the proper file name for the real test later on.
59248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59249  if test "x$test_shortpath" = x; then
59250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59251$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59252    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59253  fi
59254
59255  # Call helper function which possibly converts this using DOS-style short mode.
59256  # If so, the updated path is stored in $new_path.
59257
59258  input_path="$new_path"
59259  # Check if we need to convert this using DOS-style short mode. If the path
59260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59261  # take no chances and rewrite it.
59262  # Note: m4 eats our [], so we need to use [ and ] instead.
59263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59264  if test "x$has_forbidden_chars" != x; then
59265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59269      # Going to short mode and back again did indeed matter. Since short mode is
59270      # case insensitive, let's make it lowercase to improve readability.
59271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59272      # Now convert it back to Unix-style (cygpath)
59273      input_path=`$CYGPATH -u "$shortmode_path"`
59274      new_path="$input_path"
59275    fi
59276  fi
59277
59278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59279  if test "x$test_cygdrive_prefix" = x; then
59280    # As a simple fix, exclude /usr/bin since it's not a real path.
59281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59283      # a path prefixed by /cygdrive for fixpath to work.
59284      new_path="$CYGWIN_ROOT_PATH$input_path"
59285    fi
59286  fi
59287
59288
59289  if test "x$path" != "x$new_path"; then
59290    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59293  fi
59294
59295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59296
59297  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59298  has_colon=`$ECHO $path | $GREP ^.:`
59299  new_path="$path"
59300  if test "x$has_colon" = x; then
59301    # Not in mixed or Windows style, start by that.
59302    new_path=`cmd //c echo $path`
59303  fi
59304
59305
59306  input_path="$new_path"
59307  # Check if we need to convert this using DOS-style short mode. If the path
59308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59309  # take no chances and rewrite it.
59310  # Note: m4 eats our [], so we need to use [ and ] instead.
59311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59312  if test "x$has_forbidden_chars" != x; then
59313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59315  fi
59316
59317
59318  windows_path="$new_path"
59319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59320    unix_path=`$CYGPATH -u "$windows_path"`
59321    new_path="$unix_path"
59322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59324    new_path="$unix_path"
59325  fi
59326
59327  if test "x$path" != "x$new_path"; then
59328    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59330$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59331  fi
59332
59333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59335
59336    else
59337      # We're on a unix platform. Hooray! :)
59338      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59339      has_space=`$ECHO "$path" | $GREP " "`
59340      if test "x$has_space" != x; then
59341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59342$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59344      fi
59345
59346      # Use eval to expand a potential ~
59347      eval path="$path"
59348      if test ! -f "$path" && test ! -d "$path"; then
59349        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59350      fi
59351
59352      if test -d "$path"; then
59353        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59354      else
59355        dir="`$DIRNAME "$path"`"
59356        base="`$BASENAME "$path"`"
59357        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59358      fi
59359    fi
59360  fi
59361
59362
59363  # Only process if variable expands to non-empty
59364
59365  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59366    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59367
59368  # Input might be given as Windows format, start by converting to
59369  # unix format.
59370  path="$POTENTIAL_FREETYPE_LIB_PATH"
59371  new_path=`$CYGPATH -u "$path"`
59372
59373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59376  # "foo.exe" is OK but "foo" is an error.
59377  #
59378  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59379  # It is also a way to make sure we got the proper file name for the real test later on.
59380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59381  if test "x$test_shortpath" = x; then
59382    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59383$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59384    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59385  fi
59386
59387  # Call helper function which possibly converts this using DOS-style short mode.
59388  # If so, the updated path is stored in $new_path.
59389
59390  input_path="$new_path"
59391  # Check if we need to convert this using DOS-style short mode. If the path
59392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59393  # take no chances and rewrite it.
59394  # Note: m4 eats our [], so we need to use [ and ] instead.
59395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59396  if test "x$has_forbidden_chars" != x; then
59397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59401      # Going to short mode and back again did indeed matter. Since short mode is
59402      # case insensitive, let's make it lowercase to improve readability.
59403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59404      # Now convert it back to Unix-style (cygpath)
59405      input_path=`$CYGPATH -u "$shortmode_path"`
59406      new_path="$input_path"
59407    fi
59408  fi
59409
59410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59411  if test "x$test_cygdrive_prefix" = x; then
59412    # As a simple fix, exclude /usr/bin since it's not a real path.
59413    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59415      # a path prefixed by /cygdrive for fixpath to work.
59416      new_path="$CYGWIN_ROOT_PATH$input_path"
59417    fi
59418  fi
59419
59420
59421  if test "x$path" != "x$new_path"; then
59422    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59424$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59425  fi
59426
59427    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59428
59429  path="$POTENTIAL_FREETYPE_LIB_PATH"
59430  has_colon=`$ECHO $path | $GREP ^.:`
59431  new_path="$path"
59432  if test "x$has_colon" = x; then
59433    # Not in mixed or Windows style, start by that.
59434    new_path=`cmd //c echo $path`
59435  fi
59436
59437
59438  input_path="$new_path"
59439  # Check if we need to convert this using DOS-style short mode. If the path
59440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59441  # take no chances and rewrite it.
59442  # Note: m4 eats our [], so we need to use [ and ] instead.
59443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59444  if test "x$has_forbidden_chars" != x; then
59445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59447  fi
59448
59449
59450  windows_path="$new_path"
59451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59452    unix_path=`$CYGPATH -u "$windows_path"`
59453    new_path="$unix_path"
59454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59456    new_path="$unix_path"
59457  fi
59458
59459  if test "x$path" != "x$new_path"; then
59460    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59462$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59463  fi
59464
59465  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59466  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59467
59468    else
59469      # We're on a unix platform. Hooray! :)
59470      path="$POTENTIAL_FREETYPE_LIB_PATH"
59471      has_space=`$ECHO "$path" | $GREP " "`
59472      if test "x$has_space" != x; then
59473        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59474$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59475        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59476      fi
59477
59478      # Use eval to expand a potential ~
59479      eval path="$path"
59480      if test ! -f "$path" && test ! -d "$path"; then
59481        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59482      fi
59483
59484      if test -d "$path"; then
59485        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59486      else
59487        dir="`$DIRNAME "$path"`"
59488        base="`$BASENAME "$path"`"
59489        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59490      fi
59491    fi
59492  fi
59493
59494
59495    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59497$as_echo_n "checking for freetype includes... " >&6; }
59498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59499$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59500    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59502$as_echo_n "checking for freetype libraries... " >&6; }
59503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59504$as_echo "$FREETYPE_LIB_PATH" >&6; }
59505  fi
59506
59507            else
59508
59509  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59510  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59511  METHOD="well-known location"
59512
59513  # Let's start with an optimistic view of the world :-)
59514  FOUND_FREETYPE=yes
59515
59516  # First look for the canonical freetype main include file ft2build.h.
59517  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59518    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59519    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59520    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59521      # Fail.
59522      FOUND_FREETYPE=no
59523    fi
59524  fi
59525
59526  if test "x$FOUND_FREETYPE" = xyes; then
59527    # Include file found, let's continue the sanity check.
59528    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59529$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59530
59531    # Reset to default value
59532    FREETYPE_BASE_NAME=freetype
59533    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59534    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59535      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59536          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59537        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59538        # for the .6 version explicitly.
59539        FREETYPE_BASE_NAME=freetype.6
59540        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59541        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59542$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59543      else
59544        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59545$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59546        FOUND_FREETYPE=no
59547      fi
59548    else
59549      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59550        # On Windows, we will need both .lib and .dll file.
59551        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59552          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59553$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59554          FOUND_FREETYPE=no
59555        fi
59556      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59557          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59558        # Found lib in isa dir, use that instead.
59559        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59560        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59561$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59562      fi
59563    fi
59564  fi
59565
59566  if test "x$FOUND_FREETYPE" = xyes; then
59567
59568  # Only process if variable expands to non-empty
59569
59570  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59571    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59572
59573  # Input might be given as Windows format, start by converting to
59574  # unix format.
59575  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59576  new_path=`$CYGPATH -u "$path"`
59577
59578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59581  # "foo.exe" is OK but "foo" is an error.
59582  #
59583  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59584  # It is also a way to make sure we got the proper file name for the real test later on.
59585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59586  if test "x$test_shortpath" = x; then
59587    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59588$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59589    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59590  fi
59591
59592  # Call helper function which possibly converts this using DOS-style short mode.
59593  # If so, the updated path is stored in $new_path.
59594
59595  input_path="$new_path"
59596  # Check if we need to convert this using DOS-style short mode. If the path
59597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59598  # take no chances and rewrite it.
59599  # Note: m4 eats our [], so we need to use [ and ] instead.
59600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59601  if test "x$has_forbidden_chars" != x; then
59602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59603    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59604    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59605    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59606      # Going to short mode and back again did indeed matter. Since short mode is
59607      # case insensitive, let's make it lowercase to improve readability.
59608      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59609      # Now convert it back to Unix-style (cygpath)
59610      input_path=`$CYGPATH -u "$shortmode_path"`
59611      new_path="$input_path"
59612    fi
59613  fi
59614
59615  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59616  if test "x$test_cygdrive_prefix" = x; then
59617    # As a simple fix, exclude /usr/bin since it's not a real path.
59618    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59619      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59620      # a path prefixed by /cygdrive for fixpath to work.
59621      new_path="$CYGWIN_ROOT_PATH$input_path"
59622    fi
59623  fi
59624
59625
59626  if test "x$path" != "x$new_path"; then
59627    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59629$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59630  fi
59631
59632    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59633
59634  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59635  has_colon=`$ECHO $path | $GREP ^.:`
59636  new_path="$path"
59637  if test "x$has_colon" = x; then
59638    # Not in mixed or Windows style, start by that.
59639    new_path=`cmd //c echo $path`
59640  fi
59641
59642
59643  input_path="$new_path"
59644  # Check if we need to convert this using DOS-style short mode. If the path
59645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59646  # take no chances and rewrite it.
59647  # Note: m4 eats our [], so we need to use [ and ] instead.
59648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59649  if test "x$has_forbidden_chars" != x; then
59650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59652  fi
59653
59654
59655  windows_path="$new_path"
59656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59657    unix_path=`$CYGPATH -u "$windows_path"`
59658    new_path="$unix_path"
59659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59661    new_path="$unix_path"
59662  fi
59663
59664  if test "x$path" != "x$new_path"; then
59665    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59667$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59668  fi
59669
59670  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59671  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59672
59673    else
59674      # We're on a unix platform. Hooray! :)
59675      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59676      has_space=`$ECHO "$path" | $GREP " "`
59677      if test "x$has_space" != x; then
59678        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59679$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59680        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59681      fi
59682
59683      # Use eval to expand a potential ~
59684      eval path="$path"
59685      if test ! -f "$path" && test ! -d "$path"; then
59686        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59687      fi
59688
59689      if test -d "$path"; then
59690        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59691      else
59692        dir="`$DIRNAME "$path"`"
59693        base="`$BASENAME "$path"`"
59694        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59695      fi
59696    fi
59697  fi
59698
59699
59700  # Only process if variable expands to non-empty
59701
59702  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59704
59705  # Input might be given as Windows format, start by converting to
59706  # unix format.
59707  path="$POTENTIAL_FREETYPE_LIB_PATH"
59708  new_path=`$CYGPATH -u "$path"`
59709
59710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59713  # "foo.exe" is OK but "foo" is an error.
59714  #
59715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59716  # It is also a way to make sure we got the proper file name for the real test later on.
59717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59718  if test "x$test_shortpath" = x; then
59719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59720$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59721    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59722  fi
59723
59724  # Call helper function which possibly converts this using DOS-style short mode.
59725  # If so, the updated path is stored in $new_path.
59726
59727  input_path="$new_path"
59728  # Check if we need to convert this using DOS-style short mode. If the path
59729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59730  # take no chances and rewrite it.
59731  # Note: m4 eats our [], so we need to use [ and ] instead.
59732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59733  if test "x$has_forbidden_chars" != x; then
59734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59738      # Going to short mode and back again did indeed matter. Since short mode is
59739      # case insensitive, let's make it lowercase to improve readability.
59740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59741      # Now convert it back to Unix-style (cygpath)
59742      input_path=`$CYGPATH -u "$shortmode_path"`
59743      new_path="$input_path"
59744    fi
59745  fi
59746
59747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59748  if test "x$test_cygdrive_prefix" = x; then
59749    # As a simple fix, exclude /usr/bin since it's not a real path.
59750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59752      # a path prefixed by /cygdrive for fixpath to work.
59753      new_path="$CYGWIN_ROOT_PATH$input_path"
59754    fi
59755  fi
59756
59757
59758  if test "x$path" != "x$new_path"; then
59759    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59761$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59762  fi
59763
59764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59765
59766  path="$POTENTIAL_FREETYPE_LIB_PATH"
59767  has_colon=`$ECHO $path | $GREP ^.:`
59768  new_path="$path"
59769  if test "x$has_colon" = x; then
59770    # Not in mixed or Windows style, start by that.
59771    new_path=`cmd //c echo $path`
59772  fi
59773
59774
59775  input_path="$new_path"
59776  # Check if we need to convert this using DOS-style short mode. If the path
59777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59778  # take no chances and rewrite it.
59779  # Note: m4 eats our [], so we need to use [ and ] instead.
59780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59781  if test "x$has_forbidden_chars" != x; then
59782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59784  fi
59785
59786
59787  windows_path="$new_path"
59788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59789    unix_path=`$CYGPATH -u "$windows_path"`
59790    new_path="$unix_path"
59791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59793    new_path="$unix_path"
59794  fi
59795
59796  if test "x$path" != "x$new_path"; then
59797    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59799$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59800  fi
59801
59802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59804
59805    else
59806      # We're on a unix platform. Hooray! :)
59807      path="$POTENTIAL_FREETYPE_LIB_PATH"
59808      has_space=`$ECHO "$path" | $GREP " "`
59809      if test "x$has_space" != x; then
59810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59811$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59812        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59813      fi
59814
59815      # Use eval to expand a potential ~
59816      eval path="$path"
59817      if test ! -f "$path" && test ! -d "$path"; then
59818        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59819      fi
59820
59821      if test -d "$path"; then
59822        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59823      else
59824        dir="`$DIRNAME "$path"`"
59825        base="`$BASENAME "$path"`"
59826        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59827      fi
59828    fi
59829  fi
59830
59831
59832    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59834$as_echo_n "checking for freetype includes... " >&6; }
59835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59836$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59837    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59839$as_echo_n "checking for freetype libraries... " >&6; }
59840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59841$as_echo "$FREETYPE_LIB_PATH" >&6; }
59842  fi
59843
59844            fi
59845            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59846                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59847              # Source is available, as a last resort try to build freetype in default location
59848
59849  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59850  BUILD_FREETYPE=yes
59851
59852  # Check if the freetype sources are acessible..
59853  if ! test -d $FREETYPE_SRC_PATH; then
59854    { $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
59855$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59856    BUILD_FREETYPE=no
59857  fi
59858  # ..and contain a vc2010 project file
59859  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59860  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59861    { $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
59862$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59863    BUILD_FREETYPE=no
59864  fi
59865  # Now check if configure found a version of 'msbuild.exe'
59866  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59867    { $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
59868$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;}
59869    BUILD_FREETYPE=no
59870  fi
59871
59872  # Ready to go..
59873  if test "x$BUILD_FREETYPE" = xyes; then
59874    # msbuild requires trailing slashes for output directories
59875    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59876    freetype_lib_path_unix="$freetype_lib_path"
59877    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59878
59879  unix_path="$vcxproj_path"
59880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59881    windows_path=`$CYGPATH -m "$unix_path"`
59882    vcxproj_path="$windows_path"
59883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59884    windows_path=`cmd //c echo $unix_path`
59885    vcxproj_path="$windows_path"
59886  fi
59887
59888
59889  unix_path="$freetype_lib_path"
59890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59891    windows_path=`$CYGPATH -m "$unix_path"`
59892    freetype_lib_path="$windows_path"
59893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59894    windows_path=`cmd //c echo $unix_path`
59895    freetype_lib_path="$windows_path"
59896  fi
59897
59898
59899  unix_path="$freetype_obj_path"
59900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59901    windows_path=`$CYGPATH -m "$unix_path"`
59902    freetype_obj_path="$windows_path"
59903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59904    windows_path=`cmd //c echo $unix_path`
59905    freetype_obj_path="$windows_path"
59906  fi
59907
59908    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59909      freetype_platform=x64
59910    else
59911      freetype_platform=win32
59912    fi
59913
59914    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59915    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59916    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59917    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59918    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59919$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59920
59921    # First we try to build the freetype.dll
59922    $ECHO -e "@echo off\n"\
59923        "$MSBUILD $vcxproj_path "\
59924        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59925        "/p:Configuration=\"Release Multithreaded\" "\
59926        "/p:Platform=$freetype_platform "\
59927        "/p:ConfigurationType=DynamicLibrary "\
59928        "/p:TargetName=freetype "\
59929        "/p:OutDir=\"$freetype_lib_path\" "\
59930        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59931    cmd /c freetype.bat
59932
59933    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59934      # If that succeeds we also build freetype.lib
59935      $ECHO -e "@echo off\n"\
59936          "$MSBUILD $vcxproj_path "\
59937          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59938          "/p:Configuration=\"Release Multithreaded\" "\
59939          "/p:Platform=$freetype_platform "\
59940          "/p:ConfigurationType=StaticLibrary "\
59941          "/p:TargetName=freetype "\
59942          "/p:OutDir=\"$freetype_lib_path\" "\
59943          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59944      cmd /c freetype.bat
59945
59946      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59947        # Once we build both, lib and dll, set freetype lib and include path appropriately
59948        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59949        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59950        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59951$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59952      else
59953        BUILD_FREETYPE=no
59954      fi
59955    else
59956      BUILD_FREETYPE=no
59957    fi
59958  fi
59959
59960              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59961
59962  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59963  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59964  METHOD="well-known location"
59965
59966  # Let's start with an optimistic view of the world :-)
59967  FOUND_FREETYPE=yes
59968
59969  # First look for the canonical freetype main include file ft2build.h.
59970  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59971    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59972    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59973    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59974      # Fail.
59975      FOUND_FREETYPE=no
59976    fi
59977  fi
59978
59979  if test "x$FOUND_FREETYPE" = xyes; then
59980    # Include file found, let's continue the sanity check.
59981    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59982$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59983
59984    # Reset to default value
59985    FREETYPE_BASE_NAME=freetype
59986    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59987    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59988      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59989          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59990        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59991        # for the .6 version explicitly.
59992        FREETYPE_BASE_NAME=freetype.6
59993        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59994        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59995$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59996      else
59997        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59998$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59999        FOUND_FREETYPE=no
60000      fi
60001    else
60002      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60003        # On Windows, we will need both .lib and .dll file.
60004        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60005          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60006$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60007          FOUND_FREETYPE=no
60008        fi
60009      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60010          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60011        # Found lib in isa dir, use that instead.
60012        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60013        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60014$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60015      fi
60016    fi
60017  fi
60018
60019  if test "x$FOUND_FREETYPE" = xyes; then
60020
60021  # Only process if variable expands to non-empty
60022
60023  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60025
60026  # Input might be given as Windows format, start by converting to
60027  # unix format.
60028  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60029  new_path=`$CYGPATH -u "$path"`
60030
60031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60034  # "foo.exe" is OK but "foo" is an error.
60035  #
60036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60037  # It is also a way to make sure we got the proper file name for the real test later on.
60038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60039  if test "x$test_shortpath" = x; then
60040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60041$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60042    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60043  fi
60044
60045  # Call helper function which possibly converts this using DOS-style short mode.
60046  # If so, the updated path is stored in $new_path.
60047
60048  input_path="$new_path"
60049  # Check if we need to convert this using DOS-style short mode. If the path
60050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60051  # take no chances and rewrite it.
60052  # Note: m4 eats our [], so we need to use [ and ] instead.
60053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60054  if test "x$has_forbidden_chars" != x; then
60055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60059      # Going to short mode and back again did indeed matter. Since short mode is
60060      # case insensitive, let's make it lowercase to improve readability.
60061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60062      # Now convert it back to Unix-style (cygpath)
60063      input_path=`$CYGPATH -u "$shortmode_path"`
60064      new_path="$input_path"
60065    fi
60066  fi
60067
60068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60069  if test "x$test_cygdrive_prefix" = x; then
60070    # As a simple fix, exclude /usr/bin since it's not a real path.
60071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60073      # a path prefixed by /cygdrive for fixpath to work.
60074      new_path="$CYGWIN_ROOT_PATH$input_path"
60075    fi
60076  fi
60077
60078
60079  if test "x$path" != "x$new_path"; then
60080    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60082$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60083  fi
60084
60085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60086
60087  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60088  has_colon=`$ECHO $path | $GREP ^.:`
60089  new_path="$path"
60090  if test "x$has_colon" = x; then
60091    # Not in mixed or Windows style, start by that.
60092    new_path=`cmd //c echo $path`
60093  fi
60094
60095
60096  input_path="$new_path"
60097  # Check if we need to convert this using DOS-style short mode. If the path
60098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60099  # take no chances and rewrite it.
60100  # Note: m4 eats our [], so we need to use [ and ] instead.
60101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60102  if test "x$has_forbidden_chars" != x; then
60103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60105  fi
60106
60107
60108  windows_path="$new_path"
60109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60110    unix_path=`$CYGPATH -u "$windows_path"`
60111    new_path="$unix_path"
60112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60114    new_path="$unix_path"
60115  fi
60116
60117  if test "x$path" != "x$new_path"; then
60118    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60120$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60121  fi
60122
60123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60125
60126    else
60127      # We're on a unix platform. Hooray! :)
60128      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60129      has_space=`$ECHO "$path" | $GREP " "`
60130      if test "x$has_space" != x; then
60131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60132$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60133        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60134      fi
60135
60136      # Use eval to expand a potential ~
60137      eval path="$path"
60138      if test ! -f "$path" && test ! -d "$path"; then
60139        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60140      fi
60141
60142      if test -d "$path"; then
60143        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60144      else
60145        dir="`$DIRNAME "$path"`"
60146        base="`$BASENAME "$path"`"
60147        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60148      fi
60149    fi
60150  fi
60151
60152
60153  # Only process if variable expands to non-empty
60154
60155  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60157
60158  # Input might be given as Windows format, start by converting to
60159  # unix format.
60160  path="$POTENTIAL_FREETYPE_LIB_PATH"
60161  new_path=`$CYGPATH -u "$path"`
60162
60163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60166  # "foo.exe" is OK but "foo" is an error.
60167  #
60168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60169  # It is also a way to make sure we got the proper file name for the real test later on.
60170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60171  if test "x$test_shortpath" = x; then
60172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60174    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60175  fi
60176
60177  # Call helper function which possibly converts this using DOS-style short mode.
60178  # If so, the updated path is stored in $new_path.
60179
60180  input_path="$new_path"
60181  # Check if we need to convert this using DOS-style short mode. If the path
60182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60183  # take no chances and rewrite it.
60184  # Note: m4 eats our [], so we need to use [ and ] instead.
60185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60186  if test "x$has_forbidden_chars" != x; then
60187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60191      # Going to short mode and back again did indeed matter. Since short mode is
60192      # case insensitive, let's make it lowercase to improve readability.
60193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60194      # Now convert it back to Unix-style (cygpath)
60195      input_path=`$CYGPATH -u "$shortmode_path"`
60196      new_path="$input_path"
60197    fi
60198  fi
60199
60200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60201  if test "x$test_cygdrive_prefix" = x; then
60202    # As a simple fix, exclude /usr/bin since it's not a real path.
60203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60205      # a path prefixed by /cygdrive for fixpath to work.
60206      new_path="$CYGWIN_ROOT_PATH$input_path"
60207    fi
60208  fi
60209
60210
60211  if test "x$path" != "x$new_path"; then
60212    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60214$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60215  fi
60216
60217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60218
60219  path="$POTENTIAL_FREETYPE_LIB_PATH"
60220  has_colon=`$ECHO $path | $GREP ^.:`
60221  new_path="$path"
60222  if test "x$has_colon" = x; then
60223    # Not in mixed or Windows style, start by that.
60224    new_path=`cmd //c echo $path`
60225  fi
60226
60227
60228  input_path="$new_path"
60229  # Check if we need to convert this using DOS-style short mode. If the path
60230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60231  # take no chances and rewrite it.
60232  # Note: m4 eats our [], so we need to use [ and ] instead.
60233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60234  if test "x$has_forbidden_chars" != x; then
60235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60237  fi
60238
60239
60240  windows_path="$new_path"
60241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60242    unix_path=`$CYGPATH -u "$windows_path"`
60243    new_path="$unix_path"
60244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60246    new_path="$unix_path"
60247  fi
60248
60249  if test "x$path" != "x$new_path"; then
60250    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60252$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60253  fi
60254
60255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60257
60258    else
60259      # We're on a unix platform. Hooray! :)
60260      path="$POTENTIAL_FREETYPE_LIB_PATH"
60261      has_space=`$ECHO "$path" | $GREP " "`
60262      if test "x$has_space" != x; then
60263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60264$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60265        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60266      fi
60267
60268      # Use eval to expand a potential ~
60269      eval path="$path"
60270      if test ! -f "$path" && test ! -d "$path"; then
60271        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60272      fi
60273
60274      if test -d "$path"; then
60275        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60276      else
60277        dir="`$DIRNAME "$path"`"
60278        base="`$BASENAME "$path"`"
60279        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60280      fi
60281    fi
60282  fi
60283
60284
60285    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60287$as_echo_n "checking for freetype includes... " >&6; }
60288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60289$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60290    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60292$as_echo_n "checking for freetype libraries... " >&6; }
60293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60294$as_echo "$FREETYPE_LIB_PATH" >&6; }
60295  fi
60296
60297              else
60298
60299  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60300  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60301  METHOD="well-known location"
60302
60303  # Let's start with an optimistic view of the world :-)
60304  FOUND_FREETYPE=yes
60305
60306  # First look for the canonical freetype main include file ft2build.h.
60307  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60308    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60309    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60310    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60311      # Fail.
60312      FOUND_FREETYPE=no
60313    fi
60314  fi
60315
60316  if test "x$FOUND_FREETYPE" = xyes; then
60317    # Include file found, let's continue the sanity check.
60318    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60319$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60320
60321    # Reset to default value
60322    FREETYPE_BASE_NAME=freetype
60323    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60324    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60325      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60326          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60327        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60328        # for the .6 version explicitly.
60329        FREETYPE_BASE_NAME=freetype.6
60330        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60331        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60332$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60333      else
60334        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60335$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60336        FOUND_FREETYPE=no
60337      fi
60338    else
60339      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60340        # On Windows, we will need both .lib and .dll file.
60341        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60342          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60343$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60344          FOUND_FREETYPE=no
60345        fi
60346      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60347          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60348        # Found lib in isa dir, use that instead.
60349        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60350        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60351$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60352      fi
60353    fi
60354  fi
60355
60356  if test "x$FOUND_FREETYPE" = xyes; then
60357
60358  # Only process if variable expands to non-empty
60359
60360  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60361    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60362
60363  # Input might be given as Windows format, start by converting to
60364  # unix format.
60365  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60366  new_path=`$CYGPATH -u "$path"`
60367
60368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60371  # "foo.exe" is OK but "foo" is an error.
60372  #
60373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60374  # It is also a way to make sure we got the proper file name for the real test later on.
60375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60376  if test "x$test_shortpath" = x; then
60377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60378$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60379    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60380  fi
60381
60382  # Call helper function which possibly converts this using DOS-style short mode.
60383  # If so, the updated path is stored in $new_path.
60384
60385  input_path="$new_path"
60386  # Check if we need to convert this using DOS-style short mode. If the path
60387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60388  # take no chances and rewrite it.
60389  # Note: m4 eats our [], so we need to use [ and ] instead.
60390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60391  if test "x$has_forbidden_chars" != x; then
60392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60396      # Going to short mode and back again did indeed matter. Since short mode is
60397      # case insensitive, let's make it lowercase to improve readability.
60398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60399      # Now convert it back to Unix-style (cygpath)
60400      input_path=`$CYGPATH -u "$shortmode_path"`
60401      new_path="$input_path"
60402    fi
60403  fi
60404
60405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60406  if test "x$test_cygdrive_prefix" = x; then
60407    # As a simple fix, exclude /usr/bin since it's not a real path.
60408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60410      # a path prefixed by /cygdrive for fixpath to work.
60411      new_path="$CYGWIN_ROOT_PATH$input_path"
60412    fi
60413  fi
60414
60415
60416  if test "x$path" != "x$new_path"; then
60417    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60419$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60420  fi
60421
60422    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60423
60424  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60425  has_colon=`$ECHO $path | $GREP ^.:`
60426  new_path="$path"
60427  if test "x$has_colon" = x; then
60428    # Not in mixed or Windows style, start by that.
60429    new_path=`cmd //c echo $path`
60430  fi
60431
60432
60433  input_path="$new_path"
60434  # Check if we need to convert this using DOS-style short mode. If the path
60435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60436  # take no chances and rewrite it.
60437  # Note: m4 eats our [], so we need to use [ and ] instead.
60438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60439  if test "x$has_forbidden_chars" != x; then
60440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60442  fi
60443
60444
60445  windows_path="$new_path"
60446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60447    unix_path=`$CYGPATH -u "$windows_path"`
60448    new_path="$unix_path"
60449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60451    new_path="$unix_path"
60452  fi
60453
60454  if test "x$path" != "x$new_path"; then
60455    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60457$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60458  fi
60459
60460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60462
60463    else
60464      # We're on a unix platform. Hooray! :)
60465      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60466      has_space=`$ECHO "$path" | $GREP " "`
60467      if test "x$has_space" != x; then
60468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60469$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60470        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60471      fi
60472
60473      # Use eval to expand a potential ~
60474      eval path="$path"
60475      if test ! -f "$path" && test ! -d "$path"; then
60476        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60477      fi
60478
60479      if test -d "$path"; then
60480        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60481      else
60482        dir="`$DIRNAME "$path"`"
60483        base="`$BASENAME "$path"`"
60484        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60485      fi
60486    fi
60487  fi
60488
60489
60490  # Only process if variable expands to non-empty
60491
60492  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60493    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60494
60495  # Input might be given as Windows format, start by converting to
60496  # unix format.
60497  path="$POTENTIAL_FREETYPE_LIB_PATH"
60498  new_path=`$CYGPATH -u "$path"`
60499
60500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60503  # "foo.exe" is OK but "foo" is an error.
60504  #
60505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60506  # It is also a way to make sure we got the proper file name for the real test later on.
60507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60508  if test "x$test_shortpath" = x; then
60509    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60510$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60511    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60512  fi
60513
60514  # Call helper function which possibly converts this using DOS-style short mode.
60515  # If so, the updated path is stored in $new_path.
60516
60517  input_path="$new_path"
60518  # Check if we need to convert this using DOS-style short mode. If the path
60519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60520  # take no chances and rewrite it.
60521  # Note: m4 eats our [], so we need to use [ and ] instead.
60522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60523  if test "x$has_forbidden_chars" != x; then
60524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60528      # Going to short mode and back again did indeed matter. Since short mode is
60529      # case insensitive, let's make it lowercase to improve readability.
60530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60531      # Now convert it back to Unix-style (cygpath)
60532      input_path=`$CYGPATH -u "$shortmode_path"`
60533      new_path="$input_path"
60534    fi
60535  fi
60536
60537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60538  if test "x$test_cygdrive_prefix" = x; then
60539    # As a simple fix, exclude /usr/bin since it's not a real path.
60540    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60542      # a path prefixed by /cygdrive for fixpath to work.
60543      new_path="$CYGWIN_ROOT_PATH$input_path"
60544    fi
60545  fi
60546
60547
60548  if test "x$path" != "x$new_path"; then
60549    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60551$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60552  fi
60553
60554    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60555
60556  path="$POTENTIAL_FREETYPE_LIB_PATH"
60557  has_colon=`$ECHO $path | $GREP ^.:`
60558  new_path="$path"
60559  if test "x$has_colon" = x; then
60560    # Not in mixed or Windows style, start by that.
60561    new_path=`cmd //c echo $path`
60562  fi
60563
60564
60565  input_path="$new_path"
60566  # Check if we need to convert this using DOS-style short mode. If the path
60567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60568  # take no chances and rewrite it.
60569  # Note: m4 eats our [], so we need to use [ and ] instead.
60570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60571  if test "x$has_forbidden_chars" != x; then
60572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60574  fi
60575
60576
60577  windows_path="$new_path"
60578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60579    unix_path=`$CYGPATH -u "$windows_path"`
60580    new_path="$unix_path"
60581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60583    new_path="$unix_path"
60584  fi
60585
60586  if test "x$path" != "x$new_path"; then
60587    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60589$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60590  fi
60591
60592  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60593  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60594
60595    else
60596      # We're on a unix platform. Hooray! :)
60597      path="$POTENTIAL_FREETYPE_LIB_PATH"
60598      has_space=`$ECHO "$path" | $GREP " "`
60599      if test "x$has_space" != x; then
60600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60601$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60602        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60603      fi
60604
60605      # Use eval to expand a potential ~
60606      eval path="$path"
60607      if test ! -f "$path" && test ! -d "$path"; then
60608        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60609      fi
60610
60611      if test -d "$path"; then
60612        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60613      else
60614        dir="`$DIRNAME "$path"`"
60615        base="`$BASENAME "$path"`"
60616        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60617      fi
60618    fi
60619  fi
60620
60621
60622    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60624$as_echo_n "checking for freetype includes... " >&6; }
60625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60626$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60627    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60628    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60629$as_echo_n "checking for freetype libraries... " >&6; }
60630    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60631$as_echo "$FREETYPE_LIB_PATH" >&6; }
60632  fi
60633
60634              fi
60635            fi
60636          fi
60637        else
60638          FREETYPE_BASE_DIR="$SYSROOT/usr"
60639
60640  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60641  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60642  METHOD="well-known location"
60643
60644  # Let's start with an optimistic view of the world :-)
60645  FOUND_FREETYPE=yes
60646
60647  # First look for the canonical freetype main include file ft2build.h.
60648  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60649    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60650    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60651    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60652      # Fail.
60653      FOUND_FREETYPE=no
60654    fi
60655  fi
60656
60657  if test "x$FOUND_FREETYPE" = xyes; then
60658    # Include file found, let's continue the sanity check.
60659    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60660$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60661
60662    # Reset to default value
60663    FREETYPE_BASE_NAME=freetype
60664    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60665    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60666      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60667          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60668        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60669        # for the .6 version explicitly.
60670        FREETYPE_BASE_NAME=freetype.6
60671        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60672        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60673$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60674      else
60675        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60676$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60677        FOUND_FREETYPE=no
60678      fi
60679    else
60680      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60681        # On Windows, we will need both .lib and .dll file.
60682        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60683          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60684$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60685          FOUND_FREETYPE=no
60686        fi
60687      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60688          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60689        # Found lib in isa dir, use that instead.
60690        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60691        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60692$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60693      fi
60694    fi
60695  fi
60696
60697  if test "x$FOUND_FREETYPE" = xyes; then
60698
60699  # Only process if variable expands to non-empty
60700
60701  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60702    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60703
60704  # Input might be given as Windows format, start by converting to
60705  # unix format.
60706  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60707  new_path=`$CYGPATH -u "$path"`
60708
60709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60712  # "foo.exe" is OK but "foo" is an error.
60713  #
60714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60715  # It is also a way to make sure we got the proper file name for the real test later on.
60716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60717  if test "x$test_shortpath" = x; then
60718    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60719$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60720    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60721  fi
60722
60723  # Call helper function which possibly converts this using DOS-style short mode.
60724  # If so, the updated path is stored in $new_path.
60725
60726  input_path="$new_path"
60727  # Check if we need to convert this using DOS-style short mode. If the path
60728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60729  # take no chances and rewrite it.
60730  # Note: m4 eats our [], so we need to use [ and ] instead.
60731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60732  if test "x$has_forbidden_chars" != x; then
60733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60737      # Going to short mode and back again did indeed matter. Since short mode is
60738      # case insensitive, let's make it lowercase to improve readability.
60739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60740      # Now convert it back to Unix-style (cygpath)
60741      input_path=`$CYGPATH -u "$shortmode_path"`
60742      new_path="$input_path"
60743    fi
60744  fi
60745
60746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60747  if test "x$test_cygdrive_prefix" = x; then
60748    # As a simple fix, exclude /usr/bin since it's not a real path.
60749    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60751      # a path prefixed by /cygdrive for fixpath to work.
60752      new_path="$CYGWIN_ROOT_PATH$input_path"
60753    fi
60754  fi
60755
60756
60757  if test "x$path" != "x$new_path"; then
60758    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60760$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60761  fi
60762
60763    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60764
60765  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60766  has_colon=`$ECHO $path | $GREP ^.:`
60767  new_path="$path"
60768  if test "x$has_colon" = x; then
60769    # Not in mixed or Windows style, start by that.
60770    new_path=`cmd //c echo $path`
60771  fi
60772
60773
60774  input_path="$new_path"
60775  # Check if we need to convert this using DOS-style short mode. If the path
60776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60777  # take no chances and rewrite it.
60778  # Note: m4 eats our [], so we need to use [ and ] instead.
60779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60780  if test "x$has_forbidden_chars" != x; then
60781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60783  fi
60784
60785
60786  windows_path="$new_path"
60787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60788    unix_path=`$CYGPATH -u "$windows_path"`
60789    new_path="$unix_path"
60790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60792    new_path="$unix_path"
60793  fi
60794
60795  if test "x$path" != "x$new_path"; then
60796    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60798$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60799  fi
60800
60801  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60802  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60803
60804    else
60805      # We're on a unix platform. Hooray! :)
60806      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60807      has_space=`$ECHO "$path" | $GREP " "`
60808      if test "x$has_space" != x; then
60809        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60810$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60811        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60812      fi
60813
60814      # Use eval to expand a potential ~
60815      eval path="$path"
60816      if test ! -f "$path" && test ! -d "$path"; then
60817        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60818      fi
60819
60820      if test -d "$path"; then
60821        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60822      else
60823        dir="`$DIRNAME "$path"`"
60824        base="`$BASENAME "$path"`"
60825        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60826      fi
60827    fi
60828  fi
60829
60830
60831  # Only process if variable expands to non-empty
60832
60833  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60835
60836  # Input might be given as Windows format, start by converting to
60837  # unix format.
60838  path="$POTENTIAL_FREETYPE_LIB_PATH"
60839  new_path=`$CYGPATH -u "$path"`
60840
60841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60844  # "foo.exe" is OK but "foo" is an error.
60845  #
60846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60847  # It is also a way to make sure we got the proper file name for the real test later on.
60848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60849  if test "x$test_shortpath" = x; then
60850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60851$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60852    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60853  fi
60854
60855  # Call helper function which possibly converts this using DOS-style short mode.
60856  # If so, the updated path is stored in $new_path.
60857
60858  input_path="$new_path"
60859  # Check if we need to convert this using DOS-style short mode. If the path
60860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60861  # take no chances and rewrite it.
60862  # Note: m4 eats our [], so we need to use [ and ] instead.
60863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60864  if test "x$has_forbidden_chars" != x; then
60865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60869      # Going to short mode and back again did indeed matter. Since short mode is
60870      # case insensitive, let's make it lowercase to improve readability.
60871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60872      # Now convert it back to Unix-style (cygpath)
60873      input_path=`$CYGPATH -u "$shortmode_path"`
60874      new_path="$input_path"
60875    fi
60876  fi
60877
60878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60879  if test "x$test_cygdrive_prefix" = x; then
60880    # As a simple fix, exclude /usr/bin since it's not a real path.
60881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60883      # a path prefixed by /cygdrive for fixpath to work.
60884      new_path="$CYGWIN_ROOT_PATH$input_path"
60885    fi
60886  fi
60887
60888
60889  if test "x$path" != "x$new_path"; then
60890    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60892$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60893  fi
60894
60895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60896
60897  path="$POTENTIAL_FREETYPE_LIB_PATH"
60898  has_colon=`$ECHO $path | $GREP ^.:`
60899  new_path="$path"
60900  if test "x$has_colon" = x; then
60901    # Not in mixed or Windows style, start by that.
60902    new_path=`cmd //c echo $path`
60903  fi
60904
60905
60906  input_path="$new_path"
60907  # Check if we need to convert this using DOS-style short mode. If the path
60908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60909  # take no chances and rewrite it.
60910  # Note: m4 eats our [], so we need to use [ and ] instead.
60911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60912  if test "x$has_forbidden_chars" != x; then
60913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60915  fi
60916
60917
60918  windows_path="$new_path"
60919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60920    unix_path=`$CYGPATH -u "$windows_path"`
60921    new_path="$unix_path"
60922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60924    new_path="$unix_path"
60925  fi
60926
60927  if test "x$path" != "x$new_path"; then
60928    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60930$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60931  fi
60932
60933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60935
60936    else
60937      # We're on a unix platform. Hooray! :)
60938      path="$POTENTIAL_FREETYPE_LIB_PATH"
60939      has_space=`$ECHO "$path" | $GREP " "`
60940      if test "x$has_space" != x; then
60941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60942$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60944      fi
60945
60946      # Use eval to expand a potential ~
60947      eval path="$path"
60948      if test ! -f "$path" && test ! -d "$path"; then
60949        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60950      fi
60951
60952      if test -d "$path"; then
60953        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60954      else
60955        dir="`$DIRNAME "$path"`"
60956        base="`$BASENAME "$path"`"
60957        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60958      fi
60959    fi
60960  fi
60961
60962
60963    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60965$as_echo_n "checking for freetype includes... " >&6; }
60966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60967$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60968    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60969    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60970$as_echo_n "checking for freetype libraries... " >&6; }
60971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60972$as_echo "$FREETYPE_LIB_PATH" >&6; }
60973  fi
60974
60975
60976          if test "x$FOUND_FREETYPE" != xyes; then
60977            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60978
60979  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60980  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60981  METHOD="well-known location"
60982
60983  # Let's start with an optimistic view of the world :-)
60984  FOUND_FREETYPE=yes
60985
60986  # First look for the canonical freetype main include file ft2build.h.
60987  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60988    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60989    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60990    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60991      # Fail.
60992      FOUND_FREETYPE=no
60993    fi
60994  fi
60995
60996  if test "x$FOUND_FREETYPE" = xyes; then
60997    # Include file found, let's continue the sanity check.
60998    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60999$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61000
61001    # Reset to default value
61002    FREETYPE_BASE_NAME=freetype
61003    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61004    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61005      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61006          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61007        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61008        # for the .6 version explicitly.
61009        FREETYPE_BASE_NAME=freetype.6
61010        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61011        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61012$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61013      else
61014        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61015$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61016        FOUND_FREETYPE=no
61017      fi
61018    else
61019      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61020        # On Windows, we will need both .lib and .dll file.
61021        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61022          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61023$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61024          FOUND_FREETYPE=no
61025        fi
61026      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61027          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61028        # Found lib in isa dir, use that instead.
61029        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61030        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61031$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61032      fi
61033    fi
61034  fi
61035
61036  if test "x$FOUND_FREETYPE" = xyes; then
61037
61038  # Only process if variable expands to non-empty
61039
61040  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61042
61043  # Input might be given as Windows format, start by converting to
61044  # unix format.
61045  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61046  new_path=`$CYGPATH -u "$path"`
61047
61048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61051  # "foo.exe" is OK but "foo" is an error.
61052  #
61053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61054  # It is also a way to make sure we got the proper file name for the real test later on.
61055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61056  if test "x$test_shortpath" = x; then
61057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61058$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61059    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61060  fi
61061
61062  # Call helper function which possibly converts this using DOS-style short mode.
61063  # If so, the updated path is stored in $new_path.
61064
61065  input_path="$new_path"
61066  # Check if we need to convert this using DOS-style short mode. If the path
61067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61068  # take no chances and rewrite it.
61069  # Note: m4 eats our [], so we need to use [ and ] instead.
61070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61071  if test "x$has_forbidden_chars" != x; then
61072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61076      # Going to short mode and back again did indeed matter. Since short mode is
61077      # case insensitive, let's make it lowercase to improve readability.
61078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61079      # Now convert it back to Unix-style (cygpath)
61080      input_path=`$CYGPATH -u "$shortmode_path"`
61081      new_path="$input_path"
61082    fi
61083  fi
61084
61085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61086  if test "x$test_cygdrive_prefix" = x; then
61087    # As a simple fix, exclude /usr/bin since it's not a real path.
61088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61090      # a path prefixed by /cygdrive for fixpath to work.
61091      new_path="$CYGWIN_ROOT_PATH$input_path"
61092    fi
61093  fi
61094
61095
61096  if test "x$path" != "x$new_path"; then
61097    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61099$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61100  fi
61101
61102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61103
61104  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61105  has_colon=`$ECHO $path | $GREP ^.:`
61106  new_path="$path"
61107  if test "x$has_colon" = x; then
61108    # Not in mixed or Windows style, start by that.
61109    new_path=`cmd //c echo $path`
61110  fi
61111
61112
61113  input_path="$new_path"
61114  # Check if we need to convert this using DOS-style short mode. If the path
61115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61116  # take no chances and rewrite it.
61117  # Note: m4 eats our [], so we need to use [ and ] instead.
61118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61119  if test "x$has_forbidden_chars" != x; then
61120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61122  fi
61123
61124
61125  windows_path="$new_path"
61126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61127    unix_path=`$CYGPATH -u "$windows_path"`
61128    new_path="$unix_path"
61129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61131    new_path="$unix_path"
61132  fi
61133
61134  if test "x$path" != "x$new_path"; then
61135    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61137$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61138  fi
61139
61140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61142
61143    else
61144      # We're on a unix platform. Hooray! :)
61145      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61146      has_space=`$ECHO "$path" | $GREP " "`
61147      if test "x$has_space" != x; then
61148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61149$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61150        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61151      fi
61152
61153      # Use eval to expand a potential ~
61154      eval path="$path"
61155      if test ! -f "$path" && test ! -d "$path"; then
61156        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61157      fi
61158
61159      if test -d "$path"; then
61160        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61161      else
61162        dir="`$DIRNAME "$path"`"
61163        base="`$BASENAME "$path"`"
61164        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61165      fi
61166    fi
61167  fi
61168
61169
61170  # Only process if variable expands to non-empty
61171
61172  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61174
61175  # Input might be given as Windows format, start by converting to
61176  # unix format.
61177  path="$POTENTIAL_FREETYPE_LIB_PATH"
61178  new_path=`$CYGPATH -u "$path"`
61179
61180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61183  # "foo.exe" is OK but "foo" is an error.
61184  #
61185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61186  # It is also a way to make sure we got the proper file name for the real test later on.
61187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61188  if test "x$test_shortpath" = x; then
61189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61190$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61191    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61192  fi
61193
61194  # Call helper function which possibly converts this using DOS-style short mode.
61195  # If so, the updated path is stored in $new_path.
61196
61197  input_path="$new_path"
61198  # Check if we need to convert this using DOS-style short mode. If the path
61199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61200  # take no chances and rewrite it.
61201  # Note: m4 eats our [], so we need to use [ and ] instead.
61202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61203  if test "x$has_forbidden_chars" != x; then
61204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61208      # Going to short mode and back again did indeed matter. Since short mode is
61209      # case insensitive, let's make it lowercase to improve readability.
61210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61211      # Now convert it back to Unix-style (cygpath)
61212      input_path=`$CYGPATH -u "$shortmode_path"`
61213      new_path="$input_path"
61214    fi
61215  fi
61216
61217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61218  if test "x$test_cygdrive_prefix" = x; then
61219    # As a simple fix, exclude /usr/bin since it's not a real path.
61220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61222      # a path prefixed by /cygdrive for fixpath to work.
61223      new_path="$CYGWIN_ROOT_PATH$input_path"
61224    fi
61225  fi
61226
61227
61228  if test "x$path" != "x$new_path"; then
61229    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61232  fi
61233
61234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61235
61236  path="$POTENTIAL_FREETYPE_LIB_PATH"
61237  has_colon=`$ECHO $path | $GREP ^.:`
61238  new_path="$path"
61239  if test "x$has_colon" = x; then
61240    # Not in mixed or Windows style, start by that.
61241    new_path=`cmd //c echo $path`
61242  fi
61243
61244
61245  input_path="$new_path"
61246  # Check if we need to convert this using DOS-style short mode. If the path
61247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61248  # take no chances and rewrite it.
61249  # Note: m4 eats our [], so we need to use [ and ] instead.
61250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61251  if test "x$has_forbidden_chars" != x; then
61252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61254  fi
61255
61256
61257  windows_path="$new_path"
61258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61259    unix_path=`$CYGPATH -u "$windows_path"`
61260    new_path="$unix_path"
61261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61263    new_path="$unix_path"
61264  fi
61265
61266  if test "x$path" != "x$new_path"; then
61267    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61269$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61270  fi
61271
61272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61274
61275    else
61276      # We're on a unix platform. Hooray! :)
61277      path="$POTENTIAL_FREETYPE_LIB_PATH"
61278      has_space=`$ECHO "$path" | $GREP " "`
61279      if test "x$has_space" != x; then
61280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61281$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61283      fi
61284
61285      # Use eval to expand a potential ~
61286      eval path="$path"
61287      if test ! -f "$path" && test ! -d "$path"; then
61288        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61289      fi
61290
61291      if test -d "$path"; then
61292        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61293      else
61294        dir="`$DIRNAME "$path"`"
61295        base="`$BASENAME "$path"`"
61296        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61297      fi
61298    fi
61299  fi
61300
61301
61302    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61304$as_echo_n "checking for freetype includes... " >&6; }
61305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61306$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61307    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61309$as_echo_n "checking for freetype libraries... " >&6; }
61310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61311$as_echo "$FREETYPE_LIB_PATH" >&6; }
61312  fi
61313
61314          fi
61315
61316          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61317            if test "x$FOUND_FREETYPE" != xyes; then
61318              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61319              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61320
61321  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61322  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61323  METHOD="well-known location"
61324
61325  # Let's start with an optimistic view of the world :-)
61326  FOUND_FREETYPE=yes
61327
61328  # First look for the canonical freetype main include file ft2build.h.
61329  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61330    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61331    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61332    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61333      # Fail.
61334      FOUND_FREETYPE=no
61335    fi
61336  fi
61337
61338  if test "x$FOUND_FREETYPE" = xyes; then
61339    # Include file found, let's continue the sanity check.
61340    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61341$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61342
61343    # Reset to default value
61344    FREETYPE_BASE_NAME=freetype
61345    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61346    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61347      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61348          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61349        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61350        # for the .6 version explicitly.
61351        FREETYPE_BASE_NAME=freetype.6
61352        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61353        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61354$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61355      else
61356        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61357$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61358        FOUND_FREETYPE=no
61359      fi
61360    else
61361      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61362        # On Windows, we will need both .lib and .dll file.
61363        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61364          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61365$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61366          FOUND_FREETYPE=no
61367        fi
61368      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61369          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61370        # Found lib in isa dir, use that instead.
61371        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61372        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61373$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61374      fi
61375    fi
61376  fi
61377
61378  if test "x$FOUND_FREETYPE" = xyes; then
61379
61380  # Only process if variable expands to non-empty
61381
61382  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61384
61385  # Input might be given as Windows format, start by converting to
61386  # unix format.
61387  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61388  new_path=`$CYGPATH -u "$path"`
61389
61390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61393  # "foo.exe" is OK but "foo" is an error.
61394  #
61395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61396  # It is also a way to make sure we got the proper file name for the real test later on.
61397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61398  if test "x$test_shortpath" = x; then
61399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61400$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61401    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61402  fi
61403
61404  # Call helper function which possibly converts this using DOS-style short mode.
61405  # If so, the updated path is stored in $new_path.
61406
61407  input_path="$new_path"
61408  # Check if we need to convert this using DOS-style short mode. If the path
61409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61410  # take no chances and rewrite it.
61411  # Note: m4 eats our [], so we need to use [ and ] instead.
61412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61413  if test "x$has_forbidden_chars" != x; then
61414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61418      # Going to short mode and back again did indeed matter. Since short mode is
61419      # case insensitive, let's make it lowercase to improve readability.
61420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61421      # Now convert it back to Unix-style (cygpath)
61422      input_path=`$CYGPATH -u "$shortmode_path"`
61423      new_path="$input_path"
61424    fi
61425  fi
61426
61427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61428  if test "x$test_cygdrive_prefix" = x; then
61429    # As a simple fix, exclude /usr/bin since it's not a real path.
61430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61432      # a path prefixed by /cygdrive for fixpath to work.
61433      new_path="$CYGWIN_ROOT_PATH$input_path"
61434    fi
61435  fi
61436
61437
61438  if test "x$path" != "x$new_path"; then
61439    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61441$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61442  fi
61443
61444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61445
61446  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61447  has_colon=`$ECHO $path | $GREP ^.:`
61448  new_path="$path"
61449  if test "x$has_colon" = x; then
61450    # Not in mixed or Windows style, start by that.
61451    new_path=`cmd //c echo $path`
61452  fi
61453
61454
61455  input_path="$new_path"
61456  # Check if we need to convert this using DOS-style short mode. If the path
61457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61458  # take no chances and rewrite it.
61459  # Note: m4 eats our [], so we need to use [ and ] instead.
61460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61461  if test "x$has_forbidden_chars" != x; then
61462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61464  fi
61465
61466
61467  windows_path="$new_path"
61468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61469    unix_path=`$CYGPATH -u "$windows_path"`
61470    new_path="$unix_path"
61471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61473    new_path="$unix_path"
61474  fi
61475
61476  if test "x$path" != "x$new_path"; then
61477    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61479$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61480  fi
61481
61482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61484
61485    else
61486      # We're on a unix platform. Hooray! :)
61487      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61488      has_space=`$ECHO "$path" | $GREP " "`
61489      if test "x$has_space" != x; then
61490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61491$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61492        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61493      fi
61494
61495      # Use eval to expand a potential ~
61496      eval path="$path"
61497      if test ! -f "$path" && test ! -d "$path"; then
61498        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61499      fi
61500
61501      if test -d "$path"; then
61502        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61503      else
61504        dir="`$DIRNAME "$path"`"
61505        base="`$BASENAME "$path"`"
61506        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61507      fi
61508    fi
61509  fi
61510
61511
61512  # Only process if variable expands to non-empty
61513
61514  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61516
61517  # Input might be given as Windows format, start by converting to
61518  # unix format.
61519  path="$POTENTIAL_FREETYPE_LIB_PATH"
61520  new_path=`$CYGPATH -u "$path"`
61521
61522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61525  # "foo.exe" is OK but "foo" is an error.
61526  #
61527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61528  # It is also a way to make sure we got the proper file name for the real test later on.
61529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61530  if test "x$test_shortpath" = x; then
61531    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61532$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61533    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61534  fi
61535
61536  # Call helper function which possibly converts this using DOS-style short mode.
61537  # If so, the updated path is stored in $new_path.
61538
61539  input_path="$new_path"
61540  # Check if we need to convert this using DOS-style short mode. If the path
61541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61542  # take no chances and rewrite it.
61543  # Note: m4 eats our [], so we need to use [ and ] instead.
61544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61545  if test "x$has_forbidden_chars" != x; then
61546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61550      # Going to short mode and back again did indeed matter. Since short mode is
61551      # case insensitive, let's make it lowercase to improve readability.
61552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61553      # Now convert it back to Unix-style (cygpath)
61554      input_path=`$CYGPATH -u "$shortmode_path"`
61555      new_path="$input_path"
61556    fi
61557  fi
61558
61559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61560  if test "x$test_cygdrive_prefix" = x; then
61561    # As a simple fix, exclude /usr/bin since it's not a real path.
61562    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61564      # a path prefixed by /cygdrive for fixpath to work.
61565      new_path="$CYGWIN_ROOT_PATH$input_path"
61566    fi
61567  fi
61568
61569
61570  if test "x$path" != "x$new_path"; then
61571    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61573$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61574  fi
61575
61576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61577
61578  path="$POTENTIAL_FREETYPE_LIB_PATH"
61579  has_colon=`$ECHO $path | $GREP ^.:`
61580  new_path="$path"
61581  if test "x$has_colon" = x; then
61582    # Not in mixed or Windows style, start by that.
61583    new_path=`cmd //c echo $path`
61584  fi
61585
61586
61587  input_path="$new_path"
61588  # Check if we need to convert this using DOS-style short mode. If the path
61589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61590  # take no chances and rewrite it.
61591  # Note: m4 eats our [], so we need to use [ and ] instead.
61592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61593  if test "x$has_forbidden_chars" != x; then
61594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61595    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61596  fi
61597
61598
61599  windows_path="$new_path"
61600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61601    unix_path=`$CYGPATH -u "$windows_path"`
61602    new_path="$unix_path"
61603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61605    new_path="$unix_path"
61606  fi
61607
61608  if test "x$path" != "x$new_path"; then
61609    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61611$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61612  fi
61613
61614  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61615  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61616
61617    else
61618      # We're on a unix platform. Hooray! :)
61619      path="$POTENTIAL_FREETYPE_LIB_PATH"
61620      has_space=`$ECHO "$path" | $GREP " "`
61621      if test "x$has_space" != x; then
61622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61623$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61624        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61625      fi
61626
61627      # Use eval to expand a potential ~
61628      eval path="$path"
61629      if test ! -f "$path" && test ! -d "$path"; then
61630        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61631      fi
61632
61633      if test -d "$path"; then
61634        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61635      else
61636        dir="`$DIRNAME "$path"`"
61637        base="`$BASENAME "$path"`"
61638        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61639      fi
61640    fi
61641  fi
61642
61643
61644    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61646$as_echo_n "checking for freetype includes... " >&6; }
61647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61648$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61649    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61651$as_echo_n "checking for freetype libraries... " >&6; }
61652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61653$as_echo "$FREETYPE_LIB_PATH" >&6; }
61654  fi
61655
61656            fi
61657          fi
61658
61659          if test "x$FOUND_FREETYPE" != xyes; then
61660            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
61661
61662  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61663  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61664  METHOD="well-known location"
61665
61666  # Let's start with an optimistic view of the world :-)
61667  FOUND_FREETYPE=yes
61668
61669  # First look for the canonical freetype main include file ft2build.h.
61670  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61671    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61672    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61673    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61674      # Fail.
61675      FOUND_FREETYPE=no
61676    fi
61677  fi
61678
61679  if test "x$FOUND_FREETYPE" = xyes; then
61680    # Include file found, let's continue the sanity check.
61681    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61682$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61683
61684    # Reset to default value
61685    FREETYPE_BASE_NAME=freetype
61686    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61687    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61688      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61689          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61690        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61691        # for the .6 version explicitly.
61692        FREETYPE_BASE_NAME=freetype.6
61693        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61694        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61695$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61696      else
61697        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61698$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61699        FOUND_FREETYPE=no
61700      fi
61701    else
61702      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61703        # On Windows, we will need both .lib and .dll file.
61704        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61705          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61706$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61707          FOUND_FREETYPE=no
61708        fi
61709      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61710          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61711        # Found lib in isa dir, use that instead.
61712        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61713        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61714$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61715      fi
61716    fi
61717  fi
61718
61719  if test "x$FOUND_FREETYPE" = xyes; then
61720
61721  # Only process if variable expands to non-empty
61722
61723  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61725
61726  # Input might be given as Windows format, start by converting to
61727  # unix format.
61728  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61729  new_path=`$CYGPATH -u "$path"`
61730
61731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61734  # "foo.exe" is OK but "foo" is an error.
61735  #
61736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61737  # It is also a way to make sure we got the proper file name for the real test later on.
61738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61739  if test "x$test_shortpath" = x; then
61740    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61741$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61742    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61743  fi
61744
61745  # Call helper function which possibly converts this using DOS-style short mode.
61746  # If so, the updated path is stored in $new_path.
61747
61748  input_path="$new_path"
61749  # Check if we need to convert this using DOS-style short mode. If the path
61750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61751  # take no chances and rewrite it.
61752  # Note: m4 eats our [], so we need to use [ and ] instead.
61753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61754  if test "x$has_forbidden_chars" != x; then
61755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61759      # Going to short mode and back again did indeed matter. Since short mode is
61760      # case insensitive, let's make it lowercase to improve readability.
61761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61762      # Now convert it back to Unix-style (cygpath)
61763      input_path=`$CYGPATH -u "$shortmode_path"`
61764      new_path="$input_path"
61765    fi
61766  fi
61767
61768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61769  if test "x$test_cygdrive_prefix" = x; then
61770    # As a simple fix, exclude /usr/bin since it's not a real path.
61771    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61773      # a path prefixed by /cygdrive for fixpath to work.
61774      new_path="$CYGWIN_ROOT_PATH$input_path"
61775    fi
61776  fi
61777
61778
61779  if test "x$path" != "x$new_path"; then
61780    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61783  fi
61784
61785    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61786
61787  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61788  has_colon=`$ECHO $path | $GREP ^.:`
61789  new_path="$path"
61790  if test "x$has_colon" = x; then
61791    # Not in mixed or Windows style, start by that.
61792    new_path=`cmd //c echo $path`
61793  fi
61794
61795
61796  input_path="$new_path"
61797  # Check if we need to convert this using DOS-style short mode. If the path
61798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61799  # take no chances and rewrite it.
61800  # Note: m4 eats our [], so we need to use [ and ] instead.
61801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61802  if test "x$has_forbidden_chars" != x; then
61803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61805  fi
61806
61807
61808  windows_path="$new_path"
61809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61810    unix_path=`$CYGPATH -u "$windows_path"`
61811    new_path="$unix_path"
61812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61814    new_path="$unix_path"
61815  fi
61816
61817  if test "x$path" != "x$new_path"; then
61818    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61820$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61821  fi
61822
61823  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61824  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61825
61826    else
61827      # We're on a unix platform. Hooray! :)
61828      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61829      has_space=`$ECHO "$path" | $GREP " "`
61830      if test "x$has_space" != x; then
61831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61832$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61833        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61834      fi
61835
61836      # Use eval to expand a potential ~
61837      eval path="$path"
61838      if test ! -f "$path" && test ! -d "$path"; then
61839        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61840      fi
61841
61842      if test -d "$path"; then
61843        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61844      else
61845        dir="`$DIRNAME "$path"`"
61846        base="`$BASENAME "$path"`"
61847        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61848      fi
61849    fi
61850  fi
61851
61852
61853  # Only process if variable expands to non-empty
61854
61855  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61857
61858  # Input might be given as Windows format, start by converting to
61859  # unix format.
61860  path="$POTENTIAL_FREETYPE_LIB_PATH"
61861  new_path=`$CYGPATH -u "$path"`
61862
61863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61866  # "foo.exe" is OK but "foo" is an error.
61867  #
61868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61869  # It is also a way to make sure we got the proper file name for the real test later on.
61870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61871  if test "x$test_shortpath" = x; then
61872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61873$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61874    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61875  fi
61876
61877  # Call helper function which possibly converts this using DOS-style short mode.
61878  # If so, the updated path is stored in $new_path.
61879
61880  input_path="$new_path"
61881  # Check if we need to convert this using DOS-style short mode. If the path
61882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61883  # take no chances and rewrite it.
61884  # Note: m4 eats our [], so we need to use [ and ] instead.
61885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61886  if test "x$has_forbidden_chars" != x; then
61887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61891      # Going to short mode and back again did indeed matter. Since short mode is
61892      # case insensitive, let's make it lowercase to improve readability.
61893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61894      # Now convert it back to Unix-style (cygpath)
61895      input_path=`$CYGPATH -u "$shortmode_path"`
61896      new_path="$input_path"
61897    fi
61898  fi
61899
61900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61901  if test "x$test_cygdrive_prefix" = x; then
61902    # As a simple fix, exclude /usr/bin since it's not a real path.
61903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61905      # a path prefixed by /cygdrive for fixpath to work.
61906      new_path="$CYGWIN_ROOT_PATH$input_path"
61907    fi
61908  fi
61909
61910
61911  if test "x$path" != "x$new_path"; then
61912    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61915  fi
61916
61917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61918
61919  path="$POTENTIAL_FREETYPE_LIB_PATH"
61920  has_colon=`$ECHO $path | $GREP ^.:`
61921  new_path="$path"
61922  if test "x$has_colon" = x; then
61923    # Not in mixed or Windows style, start by that.
61924    new_path=`cmd //c echo $path`
61925  fi
61926
61927
61928  input_path="$new_path"
61929  # Check if we need to convert this using DOS-style short mode. If the path
61930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61931  # take no chances and rewrite it.
61932  # Note: m4 eats our [], so we need to use [ and ] instead.
61933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61934  if test "x$has_forbidden_chars" != x; then
61935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61937  fi
61938
61939
61940  windows_path="$new_path"
61941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61942    unix_path=`$CYGPATH -u "$windows_path"`
61943    new_path="$unix_path"
61944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61946    new_path="$unix_path"
61947  fi
61948
61949  if test "x$path" != "x$new_path"; then
61950    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61952$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61953  fi
61954
61955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61957
61958    else
61959      # We're on a unix platform. Hooray! :)
61960      path="$POTENTIAL_FREETYPE_LIB_PATH"
61961      has_space=`$ECHO "$path" | $GREP " "`
61962      if test "x$has_space" != x; then
61963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61966      fi
61967
61968      # Use eval to expand a potential ~
61969      eval path="$path"
61970      if test ! -f "$path" && test ! -d "$path"; then
61971        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61972      fi
61973
61974      if test -d "$path"; then
61975        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61976      else
61977        dir="`$DIRNAME "$path"`"
61978        base="`$BASENAME "$path"`"
61979        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61980      fi
61981    fi
61982  fi
61983
61984
61985    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61987$as_echo_n "checking for freetype includes... " >&6; }
61988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61989$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61990    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61992$as_echo_n "checking for freetype libraries... " >&6; }
61993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61994$as_echo "$FREETYPE_LIB_PATH" >&6; }
61995  fi
61996
61997          fi
61998
61999          if test "x$FOUND_FREETYPE" != xyes; then
62000            FREETYPE_BASE_DIR="$SYSROOT/usr"
62001            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62002
62003  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62004  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62005  METHOD="well-known location"
62006
62007  # Let's start with an optimistic view of the world :-)
62008  FOUND_FREETYPE=yes
62009
62010  # First look for the canonical freetype main include file ft2build.h.
62011  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62012    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62013    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62014    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62015      # Fail.
62016      FOUND_FREETYPE=no
62017    fi
62018  fi
62019
62020  if test "x$FOUND_FREETYPE" = xyes; then
62021    # Include file found, let's continue the sanity check.
62022    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62023$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62024
62025    # Reset to default value
62026    FREETYPE_BASE_NAME=freetype
62027    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62028    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62029      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62030          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62031        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62032        # for the .6 version explicitly.
62033        FREETYPE_BASE_NAME=freetype.6
62034        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62035        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62036$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62037      else
62038        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62039$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62040        FOUND_FREETYPE=no
62041      fi
62042    else
62043      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62044        # On Windows, we will need both .lib and .dll file.
62045        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62046          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62047$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62048          FOUND_FREETYPE=no
62049        fi
62050      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62051          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62052        # Found lib in isa dir, use that instead.
62053        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62054        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62055$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62056      fi
62057    fi
62058  fi
62059
62060  if test "x$FOUND_FREETYPE" = xyes; then
62061
62062  # Only process if variable expands to non-empty
62063
62064  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62066
62067  # Input might be given as Windows format, start by converting to
62068  # unix format.
62069  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62070  new_path=`$CYGPATH -u "$path"`
62071
62072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62075  # "foo.exe" is OK but "foo" is an error.
62076  #
62077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62078  # It is also a way to make sure we got the proper file name for the real test later on.
62079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62080  if test "x$test_shortpath" = x; then
62081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62082$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62083    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62084  fi
62085
62086  # Call helper function which possibly converts this using DOS-style short mode.
62087  # If so, the updated path is stored in $new_path.
62088
62089  input_path="$new_path"
62090  # Check if we need to convert this using DOS-style short mode. If the path
62091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62092  # take no chances and rewrite it.
62093  # Note: m4 eats our [], so we need to use [ and ] instead.
62094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62095  if test "x$has_forbidden_chars" != x; then
62096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62100      # Going to short mode and back again did indeed matter. Since short mode is
62101      # case insensitive, let's make it lowercase to improve readability.
62102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62103      # Now convert it back to Unix-style (cygpath)
62104      input_path=`$CYGPATH -u "$shortmode_path"`
62105      new_path="$input_path"
62106    fi
62107  fi
62108
62109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62110  if test "x$test_cygdrive_prefix" = x; then
62111    # As a simple fix, exclude /usr/bin since it's not a real path.
62112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62114      # a path prefixed by /cygdrive for fixpath to work.
62115      new_path="$CYGWIN_ROOT_PATH$input_path"
62116    fi
62117  fi
62118
62119
62120  if test "x$path" != "x$new_path"; then
62121    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62123$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62124  fi
62125
62126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62127
62128  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62129  has_colon=`$ECHO $path | $GREP ^.:`
62130  new_path="$path"
62131  if test "x$has_colon" = x; then
62132    # Not in mixed or Windows style, start by that.
62133    new_path=`cmd //c echo $path`
62134  fi
62135
62136
62137  input_path="$new_path"
62138  # Check if we need to convert this using DOS-style short mode. If the path
62139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62140  # take no chances and rewrite it.
62141  # Note: m4 eats our [], so we need to use [ and ] instead.
62142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62143  if test "x$has_forbidden_chars" != x; then
62144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62146  fi
62147
62148
62149  windows_path="$new_path"
62150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62151    unix_path=`$CYGPATH -u "$windows_path"`
62152    new_path="$unix_path"
62153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62155    new_path="$unix_path"
62156  fi
62157
62158  if test "x$path" != "x$new_path"; then
62159    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62161$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62162  fi
62163
62164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62166
62167    else
62168      # We're on a unix platform. Hooray! :)
62169      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62170      has_space=`$ECHO "$path" | $GREP " "`
62171      if test "x$has_space" != x; then
62172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62175      fi
62176
62177      # Use eval to expand a potential ~
62178      eval path="$path"
62179      if test ! -f "$path" && test ! -d "$path"; then
62180        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62181      fi
62182
62183      if test -d "$path"; then
62184        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62185      else
62186        dir="`$DIRNAME "$path"`"
62187        base="`$BASENAME "$path"`"
62188        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62189      fi
62190    fi
62191  fi
62192
62193
62194  # Only process if variable expands to non-empty
62195
62196  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62197    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62198
62199  # Input might be given as Windows format, start by converting to
62200  # unix format.
62201  path="$POTENTIAL_FREETYPE_LIB_PATH"
62202  new_path=`$CYGPATH -u "$path"`
62203
62204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62207  # "foo.exe" is OK but "foo" is an error.
62208  #
62209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62210  # It is also a way to make sure we got the proper file name for the real test later on.
62211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62212  if test "x$test_shortpath" = x; then
62213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62214$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62215    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62216  fi
62217
62218  # Call helper function which possibly converts this using DOS-style short mode.
62219  # If so, the updated path is stored in $new_path.
62220
62221  input_path="$new_path"
62222  # Check if we need to convert this using DOS-style short mode. If the path
62223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62224  # take no chances and rewrite it.
62225  # Note: m4 eats our [], so we need to use [ and ] instead.
62226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62227  if test "x$has_forbidden_chars" != x; then
62228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62232      # Going to short mode and back again did indeed matter. Since short mode is
62233      # case insensitive, let's make it lowercase to improve readability.
62234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62235      # Now convert it back to Unix-style (cygpath)
62236      input_path=`$CYGPATH -u "$shortmode_path"`
62237      new_path="$input_path"
62238    fi
62239  fi
62240
62241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62242  if test "x$test_cygdrive_prefix" = x; then
62243    # As a simple fix, exclude /usr/bin since it's not a real path.
62244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62246      # a path prefixed by /cygdrive for fixpath to work.
62247      new_path="$CYGWIN_ROOT_PATH$input_path"
62248    fi
62249  fi
62250
62251
62252  if test "x$path" != "x$new_path"; then
62253    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62255$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62256  fi
62257
62258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62259
62260  path="$POTENTIAL_FREETYPE_LIB_PATH"
62261  has_colon=`$ECHO $path | $GREP ^.:`
62262  new_path="$path"
62263  if test "x$has_colon" = x; then
62264    # Not in mixed or Windows style, start by that.
62265    new_path=`cmd //c echo $path`
62266  fi
62267
62268
62269  input_path="$new_path"
62270  # Check if we need to convert this using DOS-style short mode. If the path
62271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62272  # take no chances and rewrite it.
62273  # Note: m4 eats our [], so we need to use [ and ] instead.
62274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62275  if test "x$has_forbidden_chars" != x; then
62276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62278  fi
62279
62280
62281  windows_path="$new_path"
62282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62283    unix_path=`$CYGPATH -u "$windows_path"`
62284    new_path="$unix_path"
62285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62287    new_path="$unix_path"
62288  fi
62289
62290  if test "x$path" != "x$new_path"; then
62291    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62293$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62294  fi
62295
62296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62298
62299    else
62300      # We're on a unix platform. Hooray! :)
62301      path="$POTENTIAL_FREETYPE_LIB_PATH"
62302      has_space=`$ECHO "$path" | $GREP " "`
62303      if test "x$has_space" != x; then
62304        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62305$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62306        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62307      fi
62308
62309      # Use eval to expand a potential ~
62310      eval path="$path"
62311      if test ! -f "$path" && test ! -d "$path"; then
62312        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62313      fi
62314
62315      if test -d "$path"; then
62316        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62317      else
62318        dir="`$DIRNAME "$path"`"
62319        base="`$BASENAME "$path"`"
62320        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62321      fi
62322    fi
62323  fi
62324
62325
62326    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62327    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62328$as_echo_n "checking for freetype includes... " >&6; }
62329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62330$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62331    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62333$as_echo_n "checking for freetype libraries... " >&6; }
62334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62335$as_echo "$FREETYPE_LIB_PATH" >&6; }
62336  fi
62337
62338            else
62339
62340  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62341  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62342  METHOD="well-known location"
62343
62344  # Let's start with an optimistic view of the world :-)
62345  FOUND_FREETYPE=yes
62346
62347  # First look for the canonical freetype main include file ft2build.h.
62348  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62349    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62350    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62351    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62352      # Fail.
62353      FOUND_FREETYPE=no
62354    fi
62355  fi
62356
62357  if test "x$FOUND_FREETYPE" = xyes; then
62358    # Include file found, let's continue the sanity check.
62359    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62360$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62361
62362    # Reset to default value
62363    FREETYPE_BASE_NAME=freetype
62364    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62365    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62366      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62367          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62368        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62369        # for the .6 version explicitly.
62370        FREETYPE_BASE_NAME=freetype.6
62371        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62372        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62373$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62374      else
62375        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62376$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62377        FOUND_FREETYPE=no
62378      fi
62379    else
62380      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62381        # On Windows, we will need both .lib and .dll file.
62382        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62383          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62384$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62385          FOUND_FREETYPE=no
62386        fi
62387      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62388          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62389        # Found lib in isa dir, use that instead.
62390        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62391        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62392$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62393      fi
62394    fi
62395  fi
62396
62397  if test "x$FOUND_FREETYPE" = xyes; then
62398
62399  # Only process if variable expands to non-empty
62400
62401  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62403
62404  # Input might be given as Windows format, start by converting to
62405  # unix format.
62406  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62407  new_path=`$CYGPATH -u "$path"`
62408
62409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62412  # "foo.exe" is OK but "foo" is an error.
62413  #
62414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62415  # It is also a way to make sure we got the proper file name for the real test later on.
62416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62417  if test "x$test_shortpath" = x; then
62418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62419$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62420    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62421  fi
62422
62423  # Call helper function which possibly converts this using DOS-style short mode.
62424  # If so, the updated path is stored in $new_path.
62425
62426  input_path="$new_path"
62427  # Check if we need to convert this using DOS-style short mode. If the path
62428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62429  # take no chances and rewrite it.
62430  # Note: m4 eats our [], so we need to use [ and ] instead.
62431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62432  if test "x$has_forbidden_chars" != x; then
62433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62437      # Going to short mode and back again did indeed matter. Since short mode is
62438      # case insensitive, let's make it lowercase to improve readability.
62439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62440      # Now convert it back to Unix-style (cygpath)
62441      input_path=`$CYGPATH -u "$shortmode_path"`
62442      new_path="$input_path"
62443    fi
62444  fi
62445
62446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62447  if test "x$test_cygdrive_prefix" = x; then
62448    # As a simple fix, exclude /usr/bin since it's not a real path.
62449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62451      # a path prefixed by /cygdrive for fixpath to work.
62452      new_path="$CYGWIN_ROOT_PATH$input_path"
62453    fi
62454  fi
62455
62456
62457  if test "x$path" != "x$new_path"; then
62458    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62460$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62461  fi
62462
62463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62464
62465  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62466  has_colon=`$ECHO $path | $GREP ^.:`
62467  new_path="$path"
62468  if test "x$has_colon" = x; then
62469    # Not in mixed or Windows style, start by that.
62470    new_path=`cmd //c echo $path`
62471  fi
62472
62473
62474  input_path="$new_path"
62475  # Check if we need to convert this using DOS-style short mode. If the path
62476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62477  # take no chances and rewrite it.
62478  # Note: m4 eats our [], so we need to use [ and ] instead.
62479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62480  if test "x$has_forbidden_chars" != x; then
62481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62483  fi
62484
62485
62486  windows_path="$new_path"
62487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62488    unix_path=`$CYGPATH -u "$windows_path"`
62489    new_path="$unix_path"
62490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62492    new_path="$unix_path"
62493  fi
62494
62495  if test "x$path" != "x$new_path"; then
62496    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62498$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62499  fi
62500
62501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62503
62504    else
62505      # We're on a unix platform. Hooray! :)
62506      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62507      has_space=`$ECHO "$path" | $GREP " "`
62508      if test "x$has_space" != x; then
62509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62510$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62512      fi
62513
62514      # Use eval to expand a potential ~
62515      eval path="$path"
62516      if test ! -f "$path" && test ! -d "$path"; then
62517        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62518      fi
62519
62520      if test -d "$path"; then
62521        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62522      else
62523        dir="`$DIRNAME "$path"`"
62524        base="`$BASENAME "$path"`"
62525        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62526      fi
62527    fi
62528  fi
62529
62530
62531  # Only process if variable expands to non-empty
62532
62533  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62535
62536  # Input might be given as Windows format, start by converting to
62537  # unix format.
62538  path="$POTENTIAL_FREETYPE_LIB_PATH"
62539  new_path=`$CYGPATH -u "$path"`
62540
62541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62544  # "foo.exe" is OK but "foo" is an error.
62545  #
62546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62547  # It is also a way to make sure we got the proper file name for the real test later on.
62548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62549  if test "x$test_shortpath" = x; then
62550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62551$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62552    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62553  fi
62554
62555  # Call helper function which possibly converts this using DOS-style short mode.
62556  # If so, the updated path is stored in $new_path.
62557
62558  input_path="$new_path"
62559  # Check if we need to convert this using DOS-style short mode. If the path
62560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62561  # take no chances and rewrite it.
62562  # Note: m4 eats our [], so we need to use [ and ] instead.
62563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62564  if test "x$has_forbidden_chars" != x; then
62565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62569      # Going to short mode and back again did indeed matter. Since short mode is
62570      # case insensitive, let's make it lowercase to improve readability.
62571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62572      # Now convert it back to Unix-style (cygpath)
62573      input_path=`$CYGPATH -u "$shortmode_path"`
62574      new_path="$input_path"
62575    fi
62576  fi
62577
62578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62579  if test "x$test_cygdrive_prefix" = x; then
62580    # As a simple fix, exclude /usr/bin since it's not a real path.
62581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62583      # a path prefixed by /cygdrive for fixpath to work.
62584      new_path="$CYGWIN_ROOT_PATH$input_path"
62585    fi
62586  fi
62587
62588
62589  if test "x$path" != "x$new_path"; then
62590    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62592$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62593  fi
62594
62595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62596
62597  path="$POTENTIAL_FREETYPE_LIB_PATH"
62598  has_colon=`$ECHO $path | $GREP ^.:`
62599  new_path="$path"
62600  if test "x$has_colon" = x; then
62601    # Not in mixed or Windows style, start by that.
62602    new_path=`cmd //c echo $path`
62603  fi
62604
62605
62606  input_path="$new_path"
62607  # Check if we need to convert this using DOS-style short mode. If the path
62608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62609  # take no chances and rewrite it.
62610  # Note: m4 eats our [], so we need to use [ and ] instead.
62611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62612  if test "x$has_forbidden_chars" != x; then
62613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62615  fi
62616
62617
62618  windows_path="$new_path"
62619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62620    unix_path=`$CYGPATH -u "$windows_path"`
62621    new_path="$unix_path"
62622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62624    new_path="$unix_path"
62625  fi
62626
62627  if test "x$path" != "x$new_path"; then
62628    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62630$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62631  fi
62632
62633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62635
62636    else
62637      # We're on a unix platform. Hooray! :)
62638      path="$POTENTIAL_FREETYPE_LIB_PATH"
62639      has_space=`$ECHO "$path" | $GREP " "`
62640      if test "x$has_space" != x; then
62641        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62642$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62643        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62644      fi
62645
62646      # Use eval to expand a potential ~
62647      eval path="$path"
62648      if test ! -f "$path" && test ! -d "$path"; then
62649        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62650      fi
62651
62652      if test -d "$path"; then
62653        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62654      else
62655        dir="`$DIRNAME "$path"`"
62656        base="`$BASENAME "$path"`"
62657        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62658      fi
62659    fi
62660  fi
62661
62662
62663    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62664    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62665$as_echo_n "checking for freetype includes... " >&6; }
62666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62667$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62668    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62670$as_echo_n "checking for freetype libraries... " >&6; }
62671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62672$as_echo "$FREETYPE_LIB_PATH" >&6; }
62673  fi
62674
62675              if test "x$FOUND_FREETYPE" != xyes; then
62676
62677  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62678  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62679  METHOD="well-known location"
62680
62681  # Let's start with an optimistic view of the world :-)
62682  FOUND_FREETYPE=yes
62683
62684  # First look for the canonical freetype main include file ft2build.h.
62685  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62686    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62687    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62688    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62689      # Fail.
62690      FOUND_FREETYPE=no
62691    fi
62692  fi
62693
62694  if test "x$FOUND_FREETYPE" = xyes; then
62695    # Include file found, let's continue the sanity check.
62696    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62697$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62698
62699    # Reset to default value
62700    FREETYPE_BASE_NAME=freetype
62701    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62702    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62703      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62704          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62705        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62706        # for the .6 version explicitly.
62707        FREETYPE_BASE_NAME=freetype.6
62708        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62709        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62710$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62711      else
62712        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62713$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62714        FOUND_FREETYPE=no
62715      fi
62716    else
62717      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62718        # On Windows, we will need both .lib and .dll file.
62719        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62720          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62721$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62722          FOUND_FREETYPE=no
62723        fi
62724      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62725          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62726        # Found lib in isa dir, use that instead.
62727        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62728        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62729$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62730      fi
62731    fi
62732  fi
62733
62734  if test "x$FOUND_FREETYPE" = xyes; then
62735
62736  # Only process if variable expands to non-empty
62737
62738  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62740
62741  # Input might be given as Windows format, start by converting to
62742  # unix format.
62743  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62744  new_path=`$CYGPATH -u "$path"`
62745
62746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62749  # "foo.exe" is OK but "foo" is an error.
62750  #
62751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62752  # It is also a way to make sure we got the proper file name for the real test later on.
62753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62754  if test "x$test_shortpath" = x; then
62755    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62756$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62757    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62758  fi
62759
62760  # Call helper function which possibly converts this using DOS-style short mode.
62761  # If so, the updated path is stored in $new_path.
62762
62763  input_path="$new_path"
62764  # Check if we need to convert this using DOS-style short mode. If the path
62765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62766  # take no chances and rewrite it.
62767  # Note: m4 eats our [], so we need to use [ and ] instead.
62768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62769  if test "x$has_forbidden_chars" != x; then
62770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62774      # Going to short mode and back again did indeed matter. Since short mode is
62775      # case insensitive, let's make it lowercase to improve readability.
62776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62777      # Now convert it back to Unix-style (cygpath)
62778      input_path=`$CYGPATH -u "$shortmode_path"`
62779      new_path="$input_path"
62780    fi
62781  fi
62782
62783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62784  if test "x$test_cygdrive_prefix" = x; then
62785    # As a simple fix, exclude /usr/bin since it's not a real path.
62786    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62788      # a path prefixed by /cygdrive for fixpath to work.
62789      new_path="$CYGWIN_ROOT_PATH$input_path"
62790    fi
62791  fi
62792
62793
62794  if test "x$path" != "x$new_path"; then
62795    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62797$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62798  fi
62799
62800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62801
62802  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62803  has_colon=`$ECHO $path | $GREP ^.:`
62804  new_path="$path"
62805  if test "x$has_colon" = x; then
62806    # Not in mixed or Windows style, start by that.
62807    new_path=`cmd //c echo $path`
62808  fi
62809
62810
62811  input_path="$new_path"
62812  # Check if we need to convert this using DOS-style short mode. If the path
62813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62814  # take no chances and rewrite it.
62815  # Note: m4 eats our [], so we need to use [ and ] instead.
62816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62817  if test "x$has_forbidden_chars" != x; then
62818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62820  fi
62821
62822
62823  windows_path="$new_path"
62824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62825    unix_path=`$CYGPATH -u "$windows_path"`
62826    new_path="$unix_path"
62827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62829    new_path="$unix_path"
62830  fi
62831
62832  if test "x$path" != "x$new_path"; then
62833    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62835$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62836  fi
62837
62838  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62839  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62840
62841    else
62842      # We're on a unix platform. Hooray! :)
62843      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62844      has_space=`$ECHO "$path" | $GREP " "`
62845      if test "x$has_space" != x; then
62846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62847$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62848        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62849      fi
62850
62851      # Use eval to expand a potential ~
62852      eval path="$path"
62853      if test ! -f "$path" && test ! -d "$path"; then
62854        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62855      fi
62856
62857      if test -d "$path"; then
62858        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62859      else
62860        dir="`$DIRNAME "$path"`"
62861        base="`$BASENAME "$path"`"
62862        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62863      fi
62864    fi
62865  fi
62866
62867
62868  # Only process if variable expands to non-empty
62869
62870  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62871    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62872
62873  # Input might be given as Windows format, start by converting to
62874  # unix format.
62875  path="$POTENTIAL_FREETYPE_LIB_PATH"
62876  new_path=`$CYGPATH -u "$path"`
62877
62878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62881  # "foo.exe" is OK but "foo" is an error.
62882  #
62883  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62884  # It is also a way to make sure we got the proper file name for the real test later on.
62885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62886  if test "x$test_shortpath" = x; then
62887    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62888$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62889    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62890  fi
62891
62892  # Call helper function which possibly converts this using DOS-style short mode.
62893  # If so, the updated path is stored in $new_path.
62894
62895  input_path="$new_path"
62896  # Check if we need to convert this using DOS-style short mode. If the path
62897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62898  # take no chances and rewrite it.
62899  # Note: m4 eats our [], so we need to use [ and ] instead.
62900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62901  if test "x$has_forbidden_chars" != x; then
62902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62906      # Going to short mode and back again did indeed matter. Since short mode is
62907      # case insensitive, let's make it lowercase to improve readability.
62908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62909      # Now convert it back to Unix-style (cygpath)
62910      input_path=`$CYGPATH -u "$shortmode_path"`
62911      new_path="$input_path"
62912    fi
62913  fi
62914
62915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62916  if test "x$test_cygdrive_prefix" = x; then
62917    # As a simple fix, exclude /usr/bin since it's not a real path.
62918    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62920      # a path prefixed by /cygdrive for fixpath to work.
62921      new_path="$CYGWIN_ROOT_PATH$input_path"
62922    fi
62923  fi
62924
62925
62926  if test "x$path" != "x$new_path"; then
62927    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62929$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62930  fi
62931
62932    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62933
62934  path="$POTENTIAL_FREETYPE_LIB_PATH"
62935  has_colon=`$ECHO $path | $GREP ^.:`
62936  new_path="$path"
62937  if test "x$has_colon" = x; then
62938    # Not in mixed or Windows style, start by that.
62939    new_path=`cmd //c echo $path`
62940  fi
62941
62942
62943  input_path="$new_path"
62944  # Check if we need to convert this using DOS-style short mode. If the path
62945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62946  # take no chances and rewrite it.
62947  # Note: m4 eats our [], so we need to use [ and ] instead.
62948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62949  if test "x$has_forbidden_chars" != x; then
62950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62952  fi
62953
62954
62955  windows_path="$new_path"
62956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62957    unix_path=`$CYGPATH -u "$windows_path"`
62958    new_path="$unix_path"
62959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62961    new_path="$unix_path"
62962  fi
62963
62964  if test "x$path" != "x$new_path"; then
62965    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62967$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62968  fi
62969
62970  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62971  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62972
62973    else
62974      # We're on a unix platform. Hooray! :)
62975      path="$POTENTIAL_FREETYPE_LIB_PATH"
62976      has_space=`$ECHO "$path" | $GREP " "`
62977      if test "x$has_space" != x; then
62978        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62979$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62980        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62981      fi
62982
62983      # Use eval to expand a potential ~
62984      eval path="$path"
62985      if test ! -f "$path" && test ! -d "$path"; then
62986        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62987      fi
62988
62989      if test -d "$path"; then
62990        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62991      else
62992        dir="`$DIRNAME "$path"`"
62993        base="`$BASENAME "$path"`"
62994        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62995      fi
62996    fi
62997  fi
62998
62999
63000    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63002$as_echo_n "checking for freetype includes... " >&6; }
63003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63004$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63005    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63007$as_echo_n "checking for freetype libraries... " >&6; }
63008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63009$as_echo "$FREETYPE_LIB_PATH" >&6; }
63010  fi
63011
63012              fi
63013            fi
63014          fi
63015        fi
63016      fi # end check in well-known locations
63017
63018      if test "x$FOUND_FREETYPE" != xyes; then
63019
63020  # Print a helpful message on how to acquire the necessary build dependency.
63021  # freetype is the help tag: freetype, cups, alsa etc
63022  MISSING_DEPENDENCY=freetype
63023
63024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63025    cygwin_help $MISSING_DEPENDENCY
63026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63027    msys_help $MISSING_DEPENDENCY
63028  else
63029    PKGHANDLER_COMMAND=
63030
63031    case $PKGHANDLER in
63032      apt-get)
63033        apt_help     $MISSING_DEPENDENCY ;;
63034      yum)
63035        yum_help     $MISSING_DEPENDENCY ;;
63036      port)
63037        port_help    $MISSING_DEPENDENCY ;;
63038      pkgutil)
63039        pkgutil_help $MISSING_DEPENDENCY ;;
63040      pkgadd)
63041        pkgadd_help  $MISSING_DEPENDENCY ;;
63042    esac
63043
63044    if test "x$PKGHANDLER_COMMAND" != x; then
63045      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63046    fi
63047  fi
63048
63049        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63050      fi
63051    fi # end user specified settings
63052
63053    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63054    if test "x$FREETYPE_CFLAGS" = x; then
63055
63056  # Only process if variable expands to non-empty
63057
63058  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63059    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63060
63061  # Input might be given as Windows format, start by converting to
63062  # unix format.
63063  path="$FREETYPE_INCLUDE_PATH"
63064  new_path=`$CYGPATH -u "$path"`
63065
63066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63069  # "foo.exe" is OK but "foo" is an error.
63070  #
63071  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63072  # It is also a way to make sure we got the proper file name for the real test later on.
63073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63074  if test "x$test_shortpath" = x; then
63075    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63076$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63077    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63078  fi
63079
63080  # Call helper function which possibly converts this using DOS-style short mode.
63081  # If so, the updated path is stored in $new_path.
63082
63083  input_path="$new_path"
63084  # Check if we need to convert this using DOS-style short mode. If the path
63085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63086  # take no chances and rewrite it.
63087  # Note: m4 eats our [], so we need to use [ and ] instead.
63088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63089  if test "x$has_forbidden_chars" != x; then
63090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63094      # Going to short mode and back again did indeed matter. Since short mode is
63095      # case insensitive, let's make it lowercase to improve readability.
63096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63097      # Now convert it back to Unix-style (cygpath)
63098      input_path=`$CYGPATH -u "$shortmode_path"`
63099      new_path="$input_path"
63100    fi
63101  fi
63102
63103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63104  if test "x$test_cygdrive_prefix" = x; then
63105    # As a simple fix, exclude /usr/bin since it's not a real path.
63106    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63108      # a path prefixed by /cygdrive for fixpath to work.
63109      new_path="$CYGWIN_ROOT_PATH$input_path"
63110    fi
63111  fi
63112
63113
63114  if test "x$path" != "x$new_path"; then
63115    FREETYPE_INCLUDE_PATH="$new_path"
63116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63117$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63118  fi
63119
63120    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63121
63122  path="$FREETYPE_INCLUDE_PATH"
63123  has_colon=`$ECHO $path | $GREP ^.:`
63124  new_path="$path"
63125  if test "x$has_colon" = x; then
63126    # Not in mixed or Windows style, start by that.
63127    new_path=`cmd //c echo $path`
63128  fi
63129
63130
63131  input_path="$new_path"
63132  # Check if we need to convert this using DOS-style short mode. If the path
63133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63134  # take no chances and rewrite it.
63135  # Note: m4 eats our [], so we need to use [ and ] instead.
63136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63137  if test "x$has_forbidden_chars" != x; then
63138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63140  fi
63141
63142
63143  windows_path="$new_path"
63144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63145    unix_path=`$CYGPATH -u "$windows_path"`
63146    new_path="$unix_path"
63147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63149    new_path="$unix_path"
63150  fi
63151
63152  if test "x$path" != "x$new_path"; then
63153    FREETYPE_INCLUDE_PATH="$new_path"
63154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63155$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63156  fi
63157
63158  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63159  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63160
63161    else
63162      # We're on a unix platform. Hooray! :)
63163      path="$FREETYPE_INCLUDE_PATH"
63164      has_space=`$ECHO "$path" | $GREP " "`
63165      if test "x$has_space" != x; then
63166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63167$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63168        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63169      fi
63170
63171      # Use eval to expand a potential ~
63172      eval path="$path"
63173      if test ! -f "$path" && test ! -d "$path"; then
63174        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63175      fi
63176
63177      if test -d "$path"; then
63178        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63179      else
63180        dir="`$DIRNAME "$path"`"
63181        base="`$BASENAME "$path"`"
63182        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63183      fi
63184    fi
63185  fi
63186
63187      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63188        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63189      else
63190        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63191      fi
63192    fi
63193
63194    if test "x$FREETYPE_LIBS" = x; then
63195
63196  # Only process if variable expands to non-empty
63197
63198  if test "x$FREETYPE_LIB_PATH" != x; then
63199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63200
63201  # Input might be given as Windows format, start by converting to
63202  # unix format.
63203  path="$FREETYPE_LIB_PATH"
63204  new_path=`$CYGPATH -u "$path"`
63205
63206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63209  # "foo.exe" is OK but "foo" is an error.
63210  #
63211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63212  # It is also a way to make sure we got the proper file name for the real test later on.
63213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63214  if test "x$test_shortpath" = x; then
63215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63216$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63217    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63218  fi
63219
63220  # Call helper function which possibly converts this using DOS-style short mode.
63221  # If so, the updated path is stored in $new_path.
63222
63223  input_path="$new_path"
63224  # Check if we need to convert this using DOS-style short mode. If the path
63225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63226  # take no chances and rewrite it.
63227  # Note: m4 eats our [], so we need to use [ and ] instead.
63228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63229  if test "x$has_forbidden_chars" != x; then
63230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63234      # Going to short mode and back again did indeed matter. Since short mode is
63235      # case insensitive, let's make it lowercase to improve readability.
63236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63237      # Now convert it back to Unix-style (cygpath)
63238      input_path=`$CYGPATH -u "$shortmode_path"`
63239      new_path="$input_path"
63240    fi
63241  fi
63242
63243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63244  if test "x$test_cygdrive_prefix" = x; then
63245    # As a simple fix, exclude /usr/bin since it's not a real path.
63246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63248      # a path prefixed by /cygdrive for fixpath to work.
63249      new_path="$CYGWIN_ROOT_PATH$input_path"
63250    fi
63251  fi
63252
63253
63254  if test "x$path" != "x$new_path"; then
63255    FREETYPE_LIB_PATH="$new_path"
63256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63257$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63258  fi
63259
63260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63261
63262  path="$FREETYPE_LIB_PATH"
63263  has_colon=`$ECHO $path | $GREP ^.:`
63264  new_path="$path"
63265  if test "x$has_colon" = x; then
63266    # Not in mixed or Windows style, start by that.
63267    new_path=`cmd //c echo $path`
63268  fi
63269
63270
63271  input_path="$new_path"
63272  # Check if we need to convert this using DOS-style short mode. If the path
63273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63274  # take no chances and rewrite it.
63275  # Note: m4 eats our [], so we need to use [ and ] instead.
63276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63277  if test "x$has_forbidden_chars" != x; then
63278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63280  fi
63281
63282
63283  windows_path="$new_path"
63284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63285    unix_path=`$CYGPATH -u "$windows_path"`
63286    new_path="$unix_path"
63287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63289    new_path="$unix_path"
63290  fi
63291
63292  if test "x$path" != "x$new_path"; then
63293    FREETYPE_LIB_PATH="$new_path"
63294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63295$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63296  fi
63297
63298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63300
63301    else
63302      # We're on a unix platform. Hooray! :)
63303      path="$FREETYPE_LIB_PATH"
63304      has_space=`$ECHO "$path" | $GREP " "`
63305      if test "x$has_space" != x; then
63306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63307$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63309      fi
63310
63311      # Use eval to expand a potential ~
63312      eval path="$path"
63313      if test ! -f "$path" && test ! -d "$path"; then
63314        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63315      fi
63316
63317      if test -d "$path"; then
63318        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63319      else
63320        dir="`$DIRNAME "$path"`"
63321        base="`$BASENAME "$path"`"
63322        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63323      fi
63324    fi
63325  fi
63326
63327      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63328        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63329      else
63330        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63331      fi
63332    fi
63333
63334    # Try to compile it
63335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63336$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63337    ac_ext=cpp
63338ac_cpp='$CXXCPP $CPPFLAGS'
63339ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63340ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63341ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63342
63343    PREV_CXXCFLAGS="$CXXFLAGS"
63344    PREV_LIBS="$LIBS"
63345    PREV_CXX="$CXX"
63346    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63347    LIBS="$LIBS $FREETYPE_LIBS"
63348    CXX="$FIXPATH $CXX"
63349    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63350/* end confdefs.h.  */
63351
63352          #include<ft2build.h>
63353          #include FT_FREETYPE_H
63354          int main () {
63355            FT_Init_FreeType(NULL);
63356            return 0;
63357          }
63358
63359_ACEOF
63360if ac_fn_cxx_try_link "$LINENO"; then :
63361
63362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63363$as_echo "yes" >&6; }
63364
63365else
63366
63367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63368$as_echo "no" >&6; }
63369          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63370$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63371          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63372$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63373
63374
63375  # Print a helpful message on how to acquire the necessary build dependency.
63376  # freetype is the help tag: freetype, cups, alsa etc
63377  MISSING_DEPENDENCY=freetype
63378
63379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63380    cygwin_help $MISSING_DEPENDENCY
63381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63382    msys_help $MISSING_DEPENDENCY
63383  else
63384    PKGHANDLER_COMMAND=
63385
63386    case $PKGHANDLER in
63387      apt-get)
63388        apt_help     $MISSING_DEPENDENCY ;;
63389      yum)
63390        yum_help     $MISSING_DEPENDENCY ;;
63391      port)
63392        port_help    $MISSING_DEPENDENCY ;;
63393      pkgutil)
63394        pkgutil_help $MISSING_DEPENDENCY ;;
63395      pkgadd)
63396        pkgadd_help  $MISSING_DEPENDENCY ;;
63397    esac
63398
63399    if test "x$PKGHANDLER_COMMAND" != x; then
63400      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63401    fi
63402  fi
63403
63404
63405          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63406
63407
63408fi
63409rm -f core conftest.err conftest.$ac_objext \
63410    conftest$ac_exeext conftest.$ac_ext
63411    CXXCFLAGS="$PREV_CXXFLAGS"
63412    LIBS="$PREV_LIBS"
63413    CXX="$PREV_CXX"
63414    ac_ext=cpp
63415ac_cpp='$CXXCPP $CPPFLAGS'
63416ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63417ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63418ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63419
63420
63421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63422$as_echo_n "checking if we should bundle freetype... " >&6; }
63423    if test "x$BUNDLE_FREETYPE" = xyes; then
63424      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63425    fi
63426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63427$as_echo "$BUNDLE_FREETYPE" >&6; }
63428
63429  fi # end freetype needed
63430
63431
63432
63433
63434
63435
63436
63437# Check whether --with-alsa was given.
63438if test "${with_alsa+set}" = set; then :
63439  withval=$with_alsa;
63440fi
63441
63442
63443# Check whether --with-alsa-include was given.
63444if test "${with_alsa_include+set}" = set; then :
63445  withval=$with_alsa_include;
63446fi
63447
63448
63449# Check whether --with-alsa-lib was given.
63450if test "${with_alsa_lib+set}" = set; then :
63451  withval=$with_alsa_lib;
63452fi
63453
63454
63455  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63456    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63457        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63458        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63459      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63460$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63461    fi
63462    ALSA_CFLAGS=
63463    ALSA_LIBS=
63464  else
63465    ALSA_FOUND=no
63466
63467    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63468      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63469    fi
63470
63471    if test "x${with_alsa}" != x; then
63472      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63473      ALSA_CFLAGS="-I${with_alsa}/include"
63474      ALSA_FOUND=yes
63475    fi
63476    if test "x${with_alsa_include}" != x; then
63477      ALSA_CFLAGS="-I${with_alsa_include}"
63478      ALSA_FOUND=yes
63479    fi
63480    if test "x${with_alsa_lib}" != x; then
63481      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63482      ALSA_FOUND=yes
63483    fi
63484    # Do not try pkg-config if we have a sysroot set.
63485    if test "x$SYSROOT" = x; then
63486      if test "x$ALSA_FOUND" = xno; then
63487
63488pkg_failed=no
63489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63490$as_echo_n "checking for ALSA... " >&6; }
63491
63492if test -n "$ALSA_CFLAGS"; then
63493    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63494 elif test -n "$PKG_CONFIG"; then
63495    if test -n "$PKG_CONFIG" && \
63496    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63497  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63498  ac_status=$?
63499  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63500  test $ac_status = 0; }; then
63501  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63502else
63503  pkg_failed=yes
63504fi
63505 else
63506    pkg_failed=untried
63507fi
63508if test -n "$ALSA_LIBS"; then
63509    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63510 elif test -n "$PKG_CONFIG"; then
63511    if test -n "$PKG_CONFIG" && \
63512    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63513  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63514  ac_status=$?
63515  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63516  test $ac_status = 0; }; then
63517  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63518else
63519  pkg_failed=yes
63520fi
63521 else
63522    pkg_failed=untried
63523fi
63524
63525
63526
63527if test $pkg_failed = yes; then
63528
63529if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63530        _pkg_short_errors_supported=yes
63531else
63532        _pkg_short_errors_supported=no
63533fi
63534        if test $_pkg_short_errors_supported = yes; then
63535	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63536        else
63537	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63538        fi
63539	# Put the nasty error message in config.log where it belongs
63540	echo "$ALSA_PKG_ERRORS" >&5
63541
63542	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63543$as_echo "no" >&6; }
63544                ALSA_FOUND=no
63545elif test $pkg_failed = untried; then
63546	ALSA_FOUND=no
63547else
63548	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63549	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63551$as_echo "yes" >&6; }
63552	ALSA_FOUND=yes
63553fi
63554      fi
63555    fi
63556    if test "x$ALSA_FOUND" = xno; then
63557      for ac_header in alsa/asoundlib.h
63558do :
63559  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63560if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63561  cat >>confdefs.h <<_ACEOF
63562#define HAVE_ALSA_ASOUNDLIB_H 1
63563_ACEOF
63564
63565            ALSA_FOUND=yes
63566            ALSA_CFLAGS=-Iignoreme
63567            ALSA_LIBS=-lasound
63568            DEFAULT_ALSA=yes
63569
63570else
63571  ALSA_FOUND=no
63572
63573fi
63574
63575done
63576
63577    fi
63578    if test "x$ALSA_FOUND" = xno; then
63579
63580  # Print a helpful message on how to acquire the necessary build dependency.
63581  # alsa is the help tag: freetype, cups, alsa etc
63582  MISSING_DEPENDENCY=alsa
63583
63584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63585    cygwin_help $MISSING_DEPENDENCY
63586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63587    msys_help $MISSING_DEPENDENCY
63588  else
63589    PKGHANDLER_COMMAND=
63590
63591    case $PKGHANDLER in
63592      apt-get)
63593        apt_help     $MISSING_DEPENDENCY ;;
63594      yum)
63595        yum_help     $MISSING_DEPENDENCY ;;
63596      port)
63597        port_help    $MISSING_DEPENDENCY ;;
63598      pkgutil)
63599        pkgutil_help $MISSING_DEPENDENCY ;;
63600      pkgadd)
63601        pkgadd_help  $MISSING_DEPENDENCY ;;
63602    esac
63603
63604    if test "x$PKGHANDLER_COMMAND" != x; then
63605      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63606    fi
63607  fi
63608
63609      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63610    fi
63611  fi
63612
63613
63614
63615
63616
63617
63618# Check whether --with-libffi was given.
63619if test "${with_libffi+set}" = set; then :
63620  withval=$with_libffi;
63621fi
63622
63623
63624# Check whether --with-libffi-include was given.
63625if test "${with_libffi_include+set}" = set; then :
63626  withval=$with_libffi_include;
63627fi
63628
63629
63630# Check whether --with-libffi-lib was given.
63631if test "${with_libffi_lib+set}" = set; then :
63632  withval=$with_libffi_lib;
63633fi
63634
63635
63636  if test "x$NEEDS_LIB_FFI" = xfalse; then
63637    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63638        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63639        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63640      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63641$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63642    fi
63643    LIBFFI_CFLAGS=
63644    LIBFFI_LIBS=
63645  else
63646    LIBFFI_FOUND=no
63647
63648    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63649      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63650    fi
63651
63652    if test "x${with_libffi}" != x; then
63653      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63654      LIBFFI_CFLAGS="-I${with_libffi}/include"
63655      LIBFFI_FOUND=yes
63656    fi
63657    if test "x${with_libffi_include}" != x; then
63658      LIBFFI_CFLAGS="-I${with_libffi_include}"
63659      LIBFFI_FOUND=yes
63660    fi
63661    if test "x${with_libffi_lib}" != x; then
63662      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63663      LIBFFI_FOUND=yes
63664    fi
63665    # Do not try pkg-config if we have a sysroot set.
63666    if test "x$SYSROOT" = x; then
63667      if test "x$LIBFFI_FOUND" = xno; then
63668        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63669
63670pkg_failed=no
63671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63672$as_echo_n "checking for LIBFFI... " >&6; }
63673
63674if test -n "$LIBFFI_CFLAGS"; then
63675    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63676 elif test -n "$PKG_CONFIG"; then
63677    if test -n "$PKG_CONFIG" && \
63678    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63679  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63680  ac_status=$?
63681  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63682  test $ac_status = 0; }; then
63683  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63684else
63685  pkg_failed=yes
63686fi
63687 else
63688    pkg_failed=untried
63689fi
63690if test -n "$LIBFFI_LIBS"; then
63691    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63692 elif test -n "$PKG_CONFIG"; then
63693    if test -n "$PKG_CONFIG" && \
63694    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63695  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63696  ac_status=$?
63697  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63698  test $ac_status = 0; }; then
63699  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63700else
63701  pkg_failed=yes
63702fi
63703 else
63704    pkg_failed=untried
63705fi
63706
63707
63708
63709if test $pkg_failed = yes; then
63710
63711if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63712        _pkg_short_errors_supported=yes
63713else
63714        _pkg_short_errors_supported=no
63715fi
63716        if test $_pkg_short_errors_supported = yes; then
63717	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63718        else
63719	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63720        fi
63721	# Put the nasty error message in config.log where it belongs
63722	echo "$LIBFFI_PKG_ERRORS" >&5
63723
63724	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63725$as_echo "no" >&6; }
63726                LIBFFI_FOUND=no
63727elif test $pkg_failed = untried; then
63728	LIBFFI_FOUND=no
63729else
63730	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63731	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63733$as_echo "yes" >&6; }
63734	LIBFFI_FOUND=yes
63735fi
63736      fi
63737    fi
63738    if test "x$LIBFFI_FOUND" = xno; then
63739      for ac_header in ffi.h
63740do :
63741  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63742if test "x$ac_cv_header_ffi_h" = xyes; then :
63743  cat >>confdefs.h <<_ACEOF
63744#define HAVE_FFI_H 1
63745_ACEOF
63746
63747            LIBFFI_FOUND=yes
63748            LIBFFI_CFLAGS=
63749            LIBFFI_LIBS=-lffi
63750
63751else
63752  LIBFFI_FOUND=no
63753
63754fi
63755
63756done
63757
63758    fi
63759    if test "x$LIBFFI_FOUND" = xno; then
63760
63761  # Print a helpful message on how to acquire the necessary build dependency.
63762  # ffi is the help tag: freetype, cups, alsa etc
63763  MISSING_DEPENDENCY=ffi
63764
63765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63766    cygwin_help $MISSING_DEPENDENCY
63767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63768    msys_help $MISSING_DEPENDENCY
63769  else
63770    PKGHANDLER_COMMAND=
63771
63772    case $PKGHANDLER in
63773      apt-get)
63774        apt_help     $MISSING_DEPENDENCY ;;
63775      yum)
63776        yum_help     $MISSING_DEPENDENCY ;;
63777      port)
63778        port_help    $MISSING_DEPENDENCY ;;
63779      pkgutil)
63780        pkgutil_help $MISSING_DEPENDENCY ;;
63781      pkgadd)
63782        pkgadd_help  $MISSING_DEPENDENCY ;;
63783    esac
63784
63785    if test "x$PKGHANDLER_COMMAND" != x; then
63786      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63787    fi
63788  fi
63789
63790      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63791    fi
63792
63793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63794$as_echo_n "checking if libffi works... " >&6; }
63795    ac_ext=c
63796ac_cpp='$CPP $CPPFLAGS'
63797ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63798ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63799ac_compiler_gnu=$ac_cv_c_compiler_gnu
63800
63801    OLD_CFLAGS="$CFLAGS"
63802    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63803    OLD_LIBS="$LIBS"
63804    LIBS="$LIBS $LIBFFI_LIBS"
63805    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63806/* end confdefs.h.  */
63807#include <ffi.h>
63808int
63809main ()
63810{
63811
63812          ffi_call(NULL, NULL, NULL, NULL);
63813          return 0;
63814
63815  ;
63816  return 0;
63817}
63818_ACEOF
63819if ac_fn_c_try_link "$LINENO"; then :
63820  LIBFFI_WORKS=yes
63821else
63822  LIBFFI_WORKS=no
63823
63824fi
63825rm -f core conftest.err conftest.$ac_objext \
63826    conftest$ac_exeext conftest.$ac_ext
63827    CFLAGS="$OLD_CFLAGS"
63828    LIBS="$OLD_LIBS"
63829    ac_ext=cpp
63830ac_cpp='$CXXCPP $CPPFLAGS'
63831ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63832ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63833ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63834
63835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63836$as_echo "$LIBFFI_WORKS" >&6; }
63837
63838    if test "x$LIBFFI_WORKS" = xno; then
63839
63840  # Print a helpful message on how to acquire the necessary build dependency.
63841  # ffi is the help tag: freetype, cups, alsa etc
63842  MISSING_DEPENDENCY=ffi
63843
63844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63845    cygwin_help $MISSING_DEPENDENCY
63846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63847    msys_help $MISSING_DEPENDENCY
63848  else
63849    PKGHANDLER_COMMAND=
63850
63851    case $PKGHANDLER in
63852      apt-get)
63853        apt_help     $MISSING_DEPENDENCY ;;
63854      yum)
63855        yum_help     $MISSING_DEPENDENCY ;;
63856      port)
63857        port_help    $MISSING_DEPENDENCY ;;
63858      pkgutil)
63859        pkgutil_help $MISSING_DEPENDENCY ;;
63860      pkgadd)
63861        pkgadd_help  $MISSING_DEPENDENCY ;;
63862    esac
63863
63864    if test "x$PKGHANDLER_COMMAND" != x; then
63865      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63866    fi
63867  fi
63868
63869      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63870    fi
63871  fi
63872
63873
63874
63875
63876
63877  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63878    # Extract the first word of "llvm-config", so it can be a program name with args.
63879set dummy llvm-config; ac_word=$2
63880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63881$as_echo_n "checking for $ac_word... " >&6; }
63882if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63883  $as_echo_n "(cached) " >&6
63884else
63885  if test -n "$LLVM_CONFIG"; then
63886  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63887else
63888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63889for as_dir in $PATH
63890do
63891  IFS=$as_save_IFS
63892  test -z "$as_dir" && as_dir=.
63893    for ac_exec_ext in '' $ac_executable_extensions; do
63894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63895    ac_cv_prog_LLVM_CONFIG="llvm-config"
63896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63897    break 2
63898  fi
63899done
63900  done
63901IFS=$as_save_IFS
63902
63903fi
63904fi
63905LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63906if test -n "$LLVM_CONFIG"; then
63907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63908$as_echo "$LLVM_CONFIG" >&6; }
63909else
63910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63911$as_echo "no" >&6; }
63912fi
63913
63914
63915
63916    if test "x$LLVM_CONFIG" != xllvm-config; then
63917      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63918    fi
63919
63920    llvm_components="jit mcjit engine nativecodegen native"
63921    unset LLVM_CFLAGS
63922    for flag in $("$LLVM_CONFIG" --cxxflags); do
63923      if echo "${flag}" | grep -q '^-[ID]'; then
63924        if test "${flag}" != "-D_DEBUG" ; then
63925          if test "${LLVM_CFLAGS}" != "" ; then
63926            LLVM_CFLAGS="${LLVM_CFLAGS} "
63927          fi
63928          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63929        fi
63930      fi
63931    done
63932    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63933    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63934
63935    unset LLVM_LDFLAGS
63936    for flag in $("${LLVM_CONFIG}" --ldflags); do
63937      if echo "${flag}" | grep -q '^-L'; then
63938        if test "${LLVM_LDFLAGS}" != ""; then
63939          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63940        fi
63941        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63942      fi
63943    done
63944
63945    unset LLVM_LIBS
63946    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63947      if echo "${flag}" | grep -q '^-l'; then
63948        if test "${LLVM_LIBS}" != ""; then
63949          LLVM_LIBS="${LLVM_LIBS} "
63950        fi
63951        LLVM_LIBS="${LLVM_LIBS}${flag}"
63952      fi
63953    done
63954
63955    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63956    # always properly detect -ltinfo
63957    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63958
63959
63960
63961
63962  fi
63963
63964
63965
63966# Check whether --with-libjpeg was given.
63967if test "${with_libjpeg+set}" = set; then :
63968  withval=$with_libjpeg;
63969fi
63970
63971
63972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63973$as_echo_n "checking for which libjpeg to use... " >&6; }
63974  # default is bundled
63975  DEFAULT_LIBJPEG=bundled
63976  # if user didn't specify, use DEFAULT_LIBJPEG
63977  if test "x${with_libjpeg}" = "x"; then
63978    with_libjpeg=${DEFAULT_LIBJPEG}
63979  fi
63980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63981$as_echo "${with_libjpeg}" >&6; }
63982
63983  if test "x${with_libjpeg}" = "xbundled"; then
63984    USE_EXTERNAL_LIBJPEG=false
63985  elif test "x${with_libjpeg}" = "xsystem"; then
63986    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63987if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63988
63989else
63990   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63991fi
63992
63993
63994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63995$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63996if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63997  $as_echo_n "(cached) " >&6
63998else
63999  ac_check_lib_save_LIBS=$LIBS
64000LIBS="-ljpeg  $LIBS"
64001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64002/* end confdefs.h.  */
64003
64004/* Override any GCC internal prototype to avoid an error.
64005   Use char because int might match the return type of a GCC
64006   builtin and then its argument prototype would still apply.  */
64007#ifdef __cplusplus
64008extern "C"
64009#endif
64010char jpeg_CreateDecompress ();
64011int
64012main ()
64013{
64014return jpeg_CreateDecompress ();
64015  ;
64016  return 0;
64017}
64018_ACEOF
64019if ac_fn_cxx_try_link "$LINENO"; then :
64020  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64021else
64022  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64023fi
64024rm -f core conftest.err conftest.$ac_objext \
64025    conftest$ac_exeext conftest.$ac_ext
64026LIBS=$ac_check_lib_save_LIBS
64027fi
64028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64029$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64030if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64031  cat >>confdefs.h <<_ACEOF
64032#define HAVE_LIBJPEG 1
64033_ACEOF
64034
64035  LIBS="-ljpeg $LIBS"
64036
64037else
64038   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64039fi
64040
64041
64042    USE_EXTERNAL_LIBJPEG=true
64043  else
64044    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64045  fi
64046
64047
64048
64049
64050
64051# Check whether --with-giflib was given.
64052if test "${with_giflib+set}" = set; then :
64053  withval=$with_giflib;
64054fi
64055
64056
64057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64058$as_echo_n "checking for which giflib to use... " >&6; }
64059  # default is bundled
64060  DEFAULT_GIFLIB=bundled
64061  # if user didn't specify, use DEFAULT_GIFLIB
64062  if test "x${with_giflib}" = "x"; then
64063    with_giflib=${DEFAULT_GIFLIB}
64064  fi
64065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64066$as_echo "${with_giflib}" >&6; }
64067
64068  if test "x${with_giflib}" = "xbundled"; then
64069    USE_EXTERNAL_LIBGIF=false
64070  elif test "x${with_giflib}" = "xsystem"; then
64071    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64072if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64073
64074else
64075   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64076fi
64077
64078
64079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64080$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64081if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64082  $as_echo_n "(cached) " >&6
64083else
64084  ac_check_lib_save_LIBS=$LIBS
64085LIBS="-lgif  $LIBS"
64086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64087/* end confdefs.h.  */
64088
64089/* Override any GCC internal prototype to avoid an error.
64090   Use char because int might match the return type of a GCC
64091   builtin and then its argument prototype would still apply.  */
64092#ifdef __cplusplus
64093extern "C"
64094#endif
64095char DGifGetCode ();
64096int
64097main ()
64098{
64099return DGifGetCode ();
64100  ;
64101  return 0;
64102}
64103_ACEOF
64104if ac_fn_cxx_try_link "$LINENO"; then :
64105  ac_cv_lib_gif_DGifGetCode=yes
64106else
64107  ac_cv_lib_gif_DGifGetCode=no
64108fi
64109rm -f core conftest.err conftest.$ac_objext \
64110    conftest$ac_exeext conftest.$ac_ext
64111LIBS=$ac_check_lib_save_LIBS
64112fi
64113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64114$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64115if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64116  cat >>confdefs.h <<_ACEOF
64117#define HAVE_LIBGIF 1
64118_ACEOF
64119
64120  LIBS="-lgif $LIBS"
64121
64122else
64123   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64124fi
64125
64126
64127    USE_EXTERNAL_LIBGIF=true
64128  else
64129    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64130  fi
64131
64132
64133
64134
64135
64136# Check whether --with-libpng was given.
64137if test "${with_libpng+set}" = set; then :
64138  withval=$with_libpng;
64139fi
64140
64141
64142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64143$as_echo_n "checking for which libpng to use... " >&6; }
64144
64145  # default is bundled
64146  DEFAULT_LIBPNG=bundled
64147  # if user didn't specify, use DEFAULT_LIBPNG
64148  if test "x${with_libpng}" = "x"; then
64149      with_libpng=${DEFAULT_LIBPNG}
64150  fi
64151
64152  if test "x${with_libpng}" = "xbundled"; then
64153      USE_EXTERNAL_LIBPNG=false
64154      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64155$as_echo "bundled" >&6; }
64156  elif test "x${with_libpng}" = "xsystem"; then
64157
64158pkg_failed=no
64159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64160$as_echo_n "checking for PNG... " >&6; }
64161
64162if test -n "$PNG_CFLAGS"; then
64163    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64164 elif test -n "$PKG_CONFIG"; then
64165    if test -n "$PKG_CONFIG" && \
64166    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64167  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64168  ac_status=$?
64169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64170  test $ac_status = 0; }; then
64171  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64172else
64173  pkg_failed=yes
64174fi
64175 else
64176    pkg_failed=untried
64177fi
64178if test -n "$PNG_LIBS"; then
64179    pkg_cv_PNG_LIBS="$PNG_LIBS"
64180 elif test -n "$PKG_CONFIG"; then
64181    if test -n "$PKG_CONFIG" && \
64182    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64183  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64184  ac_status=$?
64185  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64186  test $ac_status = 0; }; then
64187  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64188else
64189  pkg_failed=yes
64190fi
64191 else
64192    pkg_failed=untried
64193fi
64194
64195
64196
64197if test $pkg_failed = yes; then
64198
64199if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64200        _pkg_short_errors_supported=yes
64201else
64202        _pkg_short_errors_supported=no
64203fi
64204        if test $_pkg_short_errors_supported = yes; then
64205	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64206        else
64207	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64208        fi
64209	# Put the nasty error message in config.log where it belongs
64210	echo "$PNG_PKG_ERRORS" >&5
64211
64212	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64213$as_echo "no" >&6; }
64214                 LIBPNG_FOUND=no
64215elif test $pkg_failed = untried; then
64216	 LIBPNG_FOUND=no
64217else
64218	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64219	PNG_LIBS=$pkg_cv_PNG_LIBS
64220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64221$as_echo "yes" >&6; }
64222	 LIBPNG_FOUND=yes
64223fi
64224      if test "x${LIBPNG_FOUND}" = "xyes"; then
64225          USE_EXTERNAL_LIBPNG=true
64226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64227$as_echo "system" >&6; }
64228      else
64229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64230$as_echo "system not found" >&6; }
64231          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64232      fi
64233  else
64234      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64235  fi
64236
64237
64238
64239
64240
64241# Check whether --with-zlib was given.
64242if test "${with_zlib+set}" = set; then :
64243  withval=$with_zlib;
64244fi
64245
64246
64247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64248$as_echo_n "checking for compress in -lz... " >&6; }
64249if ${ac_cv_lib_z_compress+:} false; then :
64250  $as_echo_n "(cached) " >&6
64251else
64252  ac_check_lib_save_LIBS=$LIBS
64253LIBS="-lz  $LIBS"
64254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64255/* end confdefs.h.  */
64256
64257/* Override any GCC internal prototype to avoid an error.
64258   Use char because int might match the return type of a GCC
64259   builtin and then its argument prototype would still apply.  */
64260#ifdef __cplusplus
64261extern "C"
64262#endif
64263char compress ();
64264int
64265main ()
64266{
64267return compress ();
64268  ;
64269  return 0;
64270}
64271_ACEOF
64272if ac_fn_cxx_try_link "$LINENO"; then :
64273  ac_cv_lib_z_compress=yes
64274else
64275  ac_cv_lib_z_compress=no
64276fi
64277rm -f core conftest.err conftest.$ac_objext \
64278    conftest$ac_exeext conftest.$ac_ext
64279LIBS=$ac_check_lib_save_LIBS
64280fi
64281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64282$as_echo "$ac_cv_lib_z_compress" >&6; }
64283if test "x$ac_cv_lib_z_compress" = xyes; then :
64284   ZLIB_FOUND=yes
64285else
64286   ZLIB_FOUND=no
64287fi
64288
64289
64290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64291$as_echo_n "checking for which zlib to use... " >&6; }
64292
64293  DEFAULT_ZLIB=system
64294  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64295    # On windows default is bundled...on others default is system
64296    DEFAULT_ZLIB=bundled
64297  fi
64298
64299  if test "x${ZLIB_FOUND}" != "xyes"; then
64300    # If we don't find any system...set default to bundled
64301    DEFAULT_ZLIB=bundled
64302  fi
64303
64304  # If user didn't specify, use DEFAULT_ZLIB
64305  if test "x${with_zlib}" = "x"; then
64306    with_zlib=${DEFAULT_ZLIB}
64307  fi
64308
64309  if test "x${with_zlib}" = "xbundled"; then
64310    USE_EXTERNAL_LIBZ=false
64311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64312$as_echo "bundled" >&6; }
64313  elif test "x${with_zlib}" = "xsystem"; then
64314    if test "x${ZLIB_FOUND}" = "xyes"; then
64315      USE_EXTERNAL_LIBZ=true
64316      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64317$as_echo "system" >&6; }
64318    else
64319      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64320$as_echo "system not found" >&6; }
64321      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64322    fi
64323  else
64324    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64325  fi
64326
64327
64328
64329
64330
64331# Check whether --with-lcms was given.
64332if test "${with_lcms+set}" = set; then :
64333  withval=$with_lcms;
64334fi
64335
64336
64337  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64338$as_echo_n "checking for which lcms to use... " >&6; }
64339
64340  DEFAULT_LCMS=bundled
64341  # If user didn't specify, use DEFAULT_LCMS
64342  if test "x${with_lcms}" = "x"; then
64343      with_lcms=${DEFAULT_LCMS}
64344  fi
64345
64346  if test "x${with_lcms}" = "xbundled"; then
64347    USE_EXTERNAL_LCMS=false
64348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64349$as_echo "bundled" >&6; }
64350  elif test "x${with_lcms}" = "xsystem"; then
64351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64352$as_echo "system" >&6; }
64353
64354pkg_failed=no
64355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64356$as_echo_n "checking for LCMS... " >&6; }
64357
64358if test -n "$LCMS_CFLAGS"; then
64359    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64360 elif test -n "$PKG_CONFIG"; then
64361    if test -n "$PKG_CONFIG" && \
64362    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64363  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64364  ac_status=$?
64365  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64366  test $ac_status = 0; }; then
64367  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64368else
64369  pkg_failed=yes
64370fi
64371 else
64372    pkg_failed=untried
64373fi
64374if test -n "$LCMS_LIBS"; then
64375    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64376 elif test -n "$PKG_CONFIG"; then
64377    if test -n "$PKG_CONFIG" && \
64378    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64379  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64380  ac_status=$?
64381  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64382  test $ac_status = 0; }; then
64383  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64384else
64385  pkg_failed=yes
64386fi
64387 else
64388    pkg_failed=untried
64389fi
64390
64391
64392
64393if test $pkg_failed = yes; then
64394
64395if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64396        _pkg_short_errors_supported=yes
64397else
64398        _pkg_short_errors_supported=no
64399fi
64400        if test $_pkg_short_errors_supported = yes; then
64401	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64402        else
64403	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64404        fi
64405	# Put the nasty error message in config.log where it belongs
64406	echo "$LCMS_PKG_ERRORS" >&5
64407
64408	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64409$as_echo "no" >&6; }
64410                LCMS_FOUND=no
64411elif test $pkg_failed = untried; then
64412	LCMS_FOUND=no
64413else
64414	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64415	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64417$as_echo "yes" >&6; }
64418	LCMS_FOUND=yes
64419fi
64420    if test "x${LCMS_FOUND}" = "xyes"; then
64421      USE_EXTERNAL_LCMS=true
64422    else
64423      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64424    fi
64425  else
64426    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64427  fi
64428
64429
64430
64431
64432
64433
64434
64435
64436
64437
64438
64439  # Setup libm (the maths library)
64440  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64442$as_echo_n "checking for cos in -lm... " >&6; }
64443if ${ac_cv_lib_m_cos+:} false; then :
64444  $as_echo_n "(cached) " >&6
64445else
64446  ac_check_lib_save_LIBS=$LIBS
64447LIBS="-lm  $LIBS"
64448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64449/* end confdefs.h.  */
64450
64451/* Override any GCC internal prototype to avoid an error.
64452   Use char because int might match the return type of a GCC
64453   builtin and then its argument prototype would still apply.  */
64454#ifdef __cplusplus
64455extern "C"
64456#endif
64457char cos ();
64458int
64459main ()
64460{
64461return cos ();
64462  ;
64463  return 0;
64464}
64465_ACEOF
64466if ac_fn_cxx_try_link "$LINENO"; then :
64467  ac_cv_lib_m_cos=yes
64468else
64469  ac_cv_lib_m_cos=no
64470fi
64471rm -f core conftest.err conftest.$ac_objext \
64472    conftest$ac_exeext conftest.$ac_ext
64473LIBS=$ac_check_lib_save_LIBS
64474fi
64475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64476$as_echo "$ac_cv_lib_m_cos" >&6; }
64477if test "x$ac_cv_lib_m_cos" = xyes; then :
64478  cat >>confdefs.h <<_ACEOF
64479#define HAVE_LIBM 1
64480_ACEOF
64481
64482  LIBS="-lm $LIBS"
64483
64484else
64485
64486        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64487$as_echo "$as_me: Maths library was not found" >&6;}
64488
64489fi
64490
64491    LIBM="-lm"
64492  else
64493    LIBM=""
64494  fi
64495
64496
64497  # Setup libdl (for dynamic library loading)
64498  save_LIBS="$LIBS"
64499  LIBS=""
64500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64501$as_echo_n "checking for dlopen in -ldl... " >&6; }
64502if ${ac_cv_lib_dl_dlopen+:} false; then :
64503  $as_echo_n "(cached) " >&6
64504else
64505  ac_check_lib_save_LIBS=$LIBS
64506LIBS="-ldl  $LIBS"
64507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64508/* end confdefs.h.  */
64509
64510/* Override any GCC internal prototype to avoid an error.
64511   Use char because int might match the return type of a GCC
64512   builtin and then its argument prototype would still apply.  */
64513#ifdef __cplusplus
64514extern "C"
64515#endif
64516char dlopen ();
64517int
64518main ()
64519{
64520return dlopen ();
64521  ;
64522  return 0;
64523}
64524_ACEOF
64525if ac_fn_cxx_try_link "$LINENO"; then :
64526  ac_cv_lib_dl_dlopen=yes
64527else
64528  ac_cv_lib_dl_dlopen=no
64529fi
64530rm -f core conftest.err conftest.$ac_objext \
64531    conftest$ac_exeext conftest.$ac_ext
64532LIBS=$ac_check_lib_save_LIBS
64533fi
64534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64535$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64536if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64537  cat >>confdefs.h <<_ACEOF
64538#define HAVE_LIBDL 1
64539_ACEOF
64540
64541  LIBS="-ldl $LIBS"
64542
64543fi
64544
64545  LIBDL="$LIBS"
64546
64547  LIBS="$save_LIBS"
64548
64549  # Deprecated libraries, keep the flags for backwards compatibility
64550  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64551
64552
64553# Check whether --with-dxsdk was given.
64554if test "${with_dxsdk+set}" = set; then :
64555  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64556$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64557fi
64558
64559
64560
64561
64562# Check whether --with-dxsdk-lib was given.
64563if test "${with_dxsdk_lib+set}" = set; then :
64564  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64565$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64566fi
64567
64568
64569
64570
64571# Check whether --with-dxsdk-include was given.
64572if test "${with_dxsdk_include+set}" = set; then :
64573  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64574$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64575fi
64576
64577
64578  fi
64579
64580  # Control if libzip can use mmap. Available for purposes of overriding.
64581  LIBZIP_CAN_USE_MMAP=true
64582
64583
64584
64585  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64586    # Find the root of the Solaris Studio installation from the compiler path
64587    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64588    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64590$as_echo_n "checking for libstlport.so.1... " >&6; }
64591    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64592      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64593      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64594    fi
64595    if test -f "$STLPORT_LIB"; then
64596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64597$as_echo "yes, $STLPORT_LIB" >&6; }
64598
64599  # Only process if variable expands to non-empty
64600
64601  if test "x$STLPORT_LIB" != x; then
64602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64603
64604  # Input might be given as Windows format, start by converting to
64605  # unix format.
64606  path="$STLPORT_LIB"
64607  new_path=`$CYGPATH -u "$path"`
64608
64609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64612  # "foo.exe" is OK but "foo" is an error.
64613  #
64614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64615  # It is also a way to make sure we got the proper file name for the real test later on.
64616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64617  if test "x$test_shortpath" = x; then
64618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64619$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64620    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64621  fi
64622
64623  # Call helper function which possibly converts this using DOS-style short mode.
64624  # If so, the updated path is stored in $new_path.
64625
64626  input_path="$new_path"
64627  # Check if we need to convert this using DOS-style short mode. If the path
64628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64629  # take no chances and rewrite it.
64630  # Note: m4 eats our [], so we need to use [ and ] instead.
64631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64632  if test "x$has_forbidden_chars" != x; then
64633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64637      # Going to short mode and back again did indeed matter. Since short mode is
64638      # case insensitive, let's make it lowercase to improve readability.
64639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64640      # Now convert it back to Unix-style (cygpath)
64641      input_path=`$CYGPATH -u "$shortmode_path"`
64642      new_path="$input_path"
64643    fi
64644  fi
64645
64646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64647  if test "x$test_cygdrive_prefix" = x; then
64648    # As a simple fix, exclude /usr/bin since it's not a real path.
64649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64651      # a path prefixed by /cygdrive for fixpath to work.
64652      new_path="$CYGWIN_ROOT_PATH$input_path"
64653    fi
64654  fi
64655
64656
64657  if test "x$path" != "x$new_path"; then
64658    STLPORT_LIB="$new_path"
64659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64660$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64661  fi
64662
64663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64664
64665  path="$STLPORT_LIB"
64666  has_colon=`$ECHO $path | $GREP ^.:`
64667  new_path="$path"
64668  if test "x$has_colon" = x; then
64669    # Not in mixed or Windows style, start by that.
64670    new_path=`cmd //c echo $path`
64671  fi
64672
64673
64674  input_path="$new_path"
64675  # Check if we need to convert this using DOS-style short mode. If the path
64676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64677  # take no chances and rewrite it.
64678  # Note: m4 eats our [], so we need to use [ and ] instead.
64679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64680  if test "x$has_forbidden_chars" != x; then
64681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64683  fi
64684
64685
64686  windows_path="$new_path"
64687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64688    unix_path=`$CYGPATH -u "$windows_path"`
64689    new_path="$unix_path"
64690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64692    new_path="$unix_path"
64693  fi
64694
64695  if test "x$path" != "x$new_path"; then
64696    STLPORT_LIB="$new_path"
64697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64698$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64699  fi
64700
64701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64703
64704    else
64705      # We're on a unix platform. Hooray! :)
64706      path="$STLPORT_LIB"
64707      has_space=`$ECHO "$path" | $GREP " "`
64708      if test "x$has_space" != x; then
64709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64710$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64711        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64712      fi
64713
64714      # Use eval to expand a potential ~
64715      eval path="$path"
64716      if test ! -f "$path" && test ! -d "$path"; then
64717        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64718      fi
64719
64720      if test -d "$path"; then
64721        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64722      else
64723        dir="`$DIRNAME "$path"`"
64724        base="`$BASENAME "$path"`"
64725        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64726      fi
64727    fi
64728  fi
64729
64730    else
64731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64732$as_echo "no, not found at $STLPORT_LIB" >&6; }
64733      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64734    fi
64735
64736  fi
64737
64738
64739
64740
64741
64742
64743
64744
64745
64746
64747
64748
64749
64750
64751###############################################################################
64752#
64753# We need to do some final tweaking, when everything else is done.
64754#
64755###############################################################################
64756
64757
64758  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64759$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64760
64761  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64762    ENABLE_INTREE_EC=yes
64763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64764$as_echo "yes" >&6; }
64765  else
64766    ENABLE_INTREE_EC=no
64767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64768$as_echo "no" >&6; }
64769  fi
64770
64771
64772
64773
64774  # Check whether --enable-jtreg-failure-handler was given.
64775if test "${enable_jtreg_failure_handler+set}" = set; then :
64776  enableval=$enable_jtreg_failure_handler;
64777fi
64778
64779
64780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64781$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64782
64783  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64784    if test "x$JT_HOME" = "x"; then
64785      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64786    else
64787      BUILD_FAILURE_HANDLER=true
64788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64789$as_echo "yes, forced" >&6; }
64790    fi
64791  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64792    BUILD_FAILURE_HANDLER=false
64793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64794$as_echo "no, forced" >&6; }
64795  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64796      || test "x$enable_jtreg_failure_handler" = "x"; then
64797    if test "x$JT_HOME" = "x"; then
64798      BUILD_FAILURE_HANDLER=false
64799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64800$as_echo "no, missing jtreg" >&6; }
64801    else
64802      BUILD_FAILURE_HANDLER=true
64803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64804$as_echo "yes, jtreg present" >&6; }
64805    fi
64806  else
64807    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64808  fi
64809
64810
64811
64812
64813  # Check whether --enable-generate-classlist was given.
64814if test "${enable_generate_classlist+set}" = set; then :
64815  enableval=$enable_generate_classlist;
64816fi
64817
64818
64819  # Check if it's likely that it's possible to generate the classlist. Depending
64820  # on exact jvm configuration it could be possible anyway.
64821  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64822    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64823  else
64824    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64825  fi
64826
64827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64828$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64829  if test "x$enable_generate_classlist" = "xyes"; then
64830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64831$as_echo "yes, forced" >&6; }
64832    ENABLE_GENERATE_CLASSLIST="true"
64833    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64834      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64835$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64836    fi
64837  elif test "x$enable_generate_classlist" = "xno"; then
64838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64839$as_echo "no, forced" >&6; }
64840    ENABLE_GENERATE_CLASSLIST="false"
64841  elif test "x$enable_generate_classlist" = "x"; then
64842    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64844$as_echo "yes" >&6; }
64845      ENABLE_GENERATE_CLASSLIST="true"
64846    else
64847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64848$as_echo "no" >&6; }
64849      ENABLE_GENERATE_CLASSLIST="false"
64850    fi
64851  else
64852    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64853  fi
64854
64855
64856
64857
64858###############################################################################
64859#
64860# Configure parts of the build that only affect the build performance,
64861# not the result.
64862#
64863###############################################################################
64864
64865
64866  # How many cores do we have on this build system?
64867
64868# Check whether --with-num-cores was given.
64869if test "${with_num_cores+set}" = set; then :
64870  withval=$with_num_cores;
64871fi
64872
64873  if test "x$with_num_cores" = x; then
64874    # The number of cores were not specified, try to probe them.
64875
64876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64877$as_echo_n "checking for number of cores... " >&6; }
64878  NUM_CORES=1
64879  FOUND_CORES=no
64880
64881  if test -f /proc/cpuinfo; then
64882    # Looks like a Linux (or cygwin) system
64883    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64884    FOUND_CORES=yes
64885  elif test -x /usr/sbin/psrinfo; then
64886    # Looks like a Solaris system
64887    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64888    FOUND_CORES=yes
64889  elif test -x /usr/sbin/sysctl; then
64890    # Looks like a MacOSX system
64891    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64892    FOUND_CORES=yes
64893  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64894    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64895    FOUND_CORES=yes
64896  elif test -n "$NUMBER_OF_PROCESSORS"; then
64897    # On windows, look in the env
64898    NUM_CORES=$NUMBER_OF_PROCESSORS
64899    FOUND_CORES=yes
64900  fi
64901
64902  if test "x$FOUND_CORES" = xyes; then
64903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64904$as_echo "$NUM_CORES" >&6; }
64905  else
64906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64907$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64908    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64909$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64910  fi
64911
64912  else
64913    NUM_CORES=$with_num_cores
64914  fi
64915
64916
64917
64918  # How much memory do we have on this build system?
64919
64920# Check whether --with-memory-size was given.
64921if test "${with_memory_size+set}" = set; then :
64922  withval=$with_memory_size;
64923fi
64924
64925  if test "x$with_memory_size" = x; then
64926    # The memory size was not specified, try to probe it.
64927
64928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64929$as_echo_n "checking for memory size... " >&6; }
64930  # Default to 1024 MB
64931  MEMORY_SIZE=1024
64932  FOUND_MEM=no
64933
64934  if test -f /proc/meminfo; then
64935    # Looks like a Linux (or cygwin) system
64936    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64937    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64938    FOUND_MEM=yes
64939  elif test -x /usr/sbin/prtconf; then
64940    # Looks like a Solaris or AIX system
64941    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64942    FOUND_MEM=yes
64943  elif test -x /usr/sbin/sysctl; then
64944    # Looks like a MacOSX system
64945    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64946    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64947    FOUND_MEM=yes
64948  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64949    # Windows, but without cygwin
64950    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64951    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64952    FOUND_MEM=yes
64953  fi
64954
64955  if test "x$FOUND_MEM" = xyes; then
64956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64957$as_echo "$MEMORY_SIZE MB" >&6; }
64958  else
64959    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64960$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64961    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64962$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64963  fi
64964
64965  else
64966    MEMORY_SIZE=$with_memory_size
64967  fi
64968
64969
64970
64971  # Provide a decent default number of parallel jobs for make depending on
64972  # number of cores, amount of memory and machine architecture.
64973
64974# Check whether --with-jobs was given.
64975if test "${with_jobs+set}" = set; then :
64976  withval=$with_jobs;
64977fi
64978
64979  if test "x$with_jobs" = x; then
64980    # Number of jobs was not specified, calculate.
64981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64982$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64983    # Approximate memory in GB.
64984    memory_gb=`expr $MEMORY_SIZE / 1024`
64985    # Pick the lowest of memory in gb and number of cores.
64986    if test "$memory_gb" -lt "$NUM_CORES"; then
64987      JOBS="$memory_gb"
64988    else
64989      JOBS="$NUM_CORES"
64990    fi
64991    if test "$JOBS" -eq "0"; then
64992      JOBS=1
64993    fi
64994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64995$as_echo "$JOBS" >&6; }
64996  else
64997    JOBS=$with_jobs
64998  fi
64999
65000
65001
65002  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65003
65004# Check whether --with-test-jobs was given.
65005if test "${with_test_jobs+set}" = set; then :
65006  withval=$with_test_jobs;
65007fi
65008
65009  if test "x$with_test_jobs" = x; then
65010      TEST_JOBS=0
65011  else
65012      TEST_JOBS=$with_test_jobs
65013  fi
65014
65015
65016
65017# Setup arguments for the boot jdk (after cores and memory have been setup)
65018
65019  ##############################################################################
65020  #
65021  # Specify jvm options for anything that is run with the Boot JDK.
65022  # Not all JVM:s accept the same arguments on the command line.
65023  #
65024
65025# Check whether --with-boot-jdk-jvmargs was given.
65026if test "${with_boot_jdk_jvmargs+set}" = set; then :
65027  withval=$with_boot_jdk_jvmargs;
65028fi
65029
65030
65031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65032$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65033
65034  # Disable special log output when a debug build is used as Boot JDK...
65035
65036  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65037  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65038  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65039  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65040  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65041  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65042    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65043    JVM_ARG_OK=true
65044  else
65045    $ECHO "Arg failed:" >&5
65046    $ECHO "$OUTPUT" >&5
65047    JVM_ARG_OK=false
65048  fi
65049
65050
65051  # Apply user provided options.
65052
65053  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65054  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65055  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65056  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65057  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65058  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65059    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65060    JVM_ARG_OK=true
65061  else
65062    $ECHO "Arg failed:" >&5
65063    $ECHO "$OUTPUT" >&5
65064    JVM_ARG_OK=false
65065  fi
65066
65067
65068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65069$as_echo "$boot_jdk_jvmargs" >&6; }
65070
65071  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65072  JAVA_FLAGS=$boot_jdk_jvmargs
65073
65074
65075
65076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65077$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65078
65079  # Starting amount of heap memory.
65080
65081  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65082  $ECHO "Command: $JAVA -Xms64M -version" >&5
65083  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65084  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65085  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65086  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65087    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65088    JVM_ARG_OK=true
65089  else
65090    $ECHO "Arg failed:" >&5
65091    $ECHO "$OUTPUT" >&5
65092    JVM_ARG_OK=false
65093  fi
65094
65095  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65096
65097  # Maximum amount of heap memory and stack size.
65098  JVM_HEAP_LIMIT_32="1024"
65099  # Running a 64 bit JVM allows for and requires a bigger heap
65100  JVM_HEAP_LIMIT_64="1600"
65101  STACK_SIZE_32=768
65102  STACK_SIZE_64=1536
65103  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65104  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65105    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65106  fi
65107  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65108    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65109  fi
65110  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65111    JVM_HEAP_LIMIT_32=512
65112    JVM_HEAP_LIMIT_64=512
65113  fi
65114
65115  if test "x$BOOT_JDK_BITS" = "x32"; then
65116    STACK_SIZE=$STACK_SIZE_32
65117    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65118  else
65119    STACK_SIZE=$STACK_SIZE_64
65120    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65121  fi
65122
65123  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65124  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65125  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65126  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65127  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65128  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65129    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65130    JVM_ARG_OK=true
65131  else
65132    $ECHO "Arg failed:" >&5
65133    $ECHO "$OUTPUT" >&5
65134    JVM_ARG_OK=false
65135  fi
65136
65137
65138  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65139  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65140  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65141  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65142  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65143  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65144    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65145    JVM_ARG_OK=true
65146  else
65147    $ECHO "Arg failed:" >&5
65148    $ECHO "$OUTPUT" >&5
65149    JVM_ARG_OK=false
65150  fi
65151
65152
65153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65154$as_echo "$boot_jdk_jvmargs_big" >&6; }
65155
65156  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65157
65158
65159  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65160    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65161    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65162  else
65163    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65164    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65165  fi
65166  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65167  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65169$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65171$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65172
65173
65174  # By default, the main javac compilations use big
65175  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65176
65177
65178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65179$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65180
65181  # Use serial gc for small short lived tools if possible
65182
65183  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65184  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65185  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65186  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65187  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65188  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65189    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65190    JVM_ARG_OK=true
65191  else
65192    $ECHO "Arg failed:" >&5
65193    $ECHO "$OUTPUT" >&5
65194    JVM_ARG_OK=false
65195  fi
65196
65197
65198  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65199  $ECHO "Command: $JAVA -Xms32M -version" >&5
65200  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65201  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65202  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65203  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65204    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65205    JVM_ARG_OK=true
65206  else
65207    $ECHO "Arg failed:" >&5
65208    $ECHO "$OUTPUT" >&5
65209    JVM_ARG_OK=false
65210  fi
65211
65212
65213  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65214  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65215  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65216  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65217  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65218  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65219    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65220    JVM_ARG_OK=true
65221  else
65222    $ECHO "Arg failed:" >&5
65223    $ECHO "$OUTPUT" >&5
65224    JVM_ARG_OK=false
65225  fi
65226
65227
65228  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65229  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65230  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65231  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65232  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65233  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65234    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65235    JVM_ARG_OK=true
65236  else
65237    $ECHO "Arg failed:" >&5
65238    $ECHO "$OUTPUT" >&5
65239    JVM_ARG_OK=false
65240  fi
65241
65242
65243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65244$as_echo "$boot_jdk_jvmargs_small" >&6; }
65245
65246  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65247
65248
65249  JAVA_TOOL_FLAGS_SMALL=""
65250  for f in $JAVA_FLAGS_SMALL; do
65251    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65252  done
65253
65254
65255
65256# Setup smart javac (after cores and memory have been setup)
65257
65258
65259# Check whether --with-sjavac-server-java was given.
65260if test "${with_sjavac_server_java+set}" = set; then :
65261  withval=$with_sjavac_server_java;
65262fi
65263
65264
65265  if test "x$with_sjavac_server_java" != x; then
65266    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65267    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65268    if test "x$FOUND_VERSION" = x; then
65269      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65270    fi
65271  else
65272    SJAVAC_SERVER_JAVA="$JAVA"
65273  fi
65274
65275
65276  if test "$MEMORY_SIZE" -gt "3000"; then
65277
65278  $ECHO "Check if jvm arg is ok: -d64" >&5
65279  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65280  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65281  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65282  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65283  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65284    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65285    JVM_ARG_OK=true
65286  else
65287    $ECHO "Arg failed:" >&5
65288    $ECHO "$OUTPUT" >&5
65289    JVM_ARG_OK=false
65290  fi
65291
65292    if test "$JVM_ARG_OK" = true; then
65293      JVM_64BIT=true
65294      JVM_ARG_OK=false
65295    fi
65296  fi
65297
65298  MX_VALUE=`expr $MEMORY_SIZE / 2`
65299  if test "$JVM_64BIT" = true; then
65300    # Set ms lower than mx since more than one instance of the server might
65301    # get launched at the same time before they figure out which instance won.
65302    MS_VALUE=512
65303    if test "$MX_VALUE" -gt "2048"; then
65304      MX_VALUE=2048
65305    fi
65306  else
65307    MS_VALUE=256
65308    if test "$MX_VALUE" -gt "1500"; then
65309      MX_VALUE=1500
65310    fi
65311  fi
65312  if test "$MX_VALUE" -lt "512"; then
65313    MX_VALUE=512
65314  fi
65315
65316  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65317  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65318  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65319  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65320  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65321  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65322    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65323    JVM_ARG_OK=true
65324  else
65325    $ECHO "Arg failed:" >&5
65326    $ECHO "$OUTPUT" >&5
65327    JVM_ARG_OK=false
65328  fi
65329
65330
65331
65332  # Check whether --enable-sjavac was given.
65333if test "${enable_sjavac+set}" = set; then :
65334  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65335else
65336  ENABLE_SJAVAC="no"
65337fi
65338
65339  if test "x$JVM_ARG_OK" = "xfalse"; then
65340    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65341$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65342    ENABLE_SJAVAC="no"
65343  fi
65344  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65345$as_echo_n "checking whether to use sjavac... " >&6; }
65346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65347$as_echo "$ENABLE_SJAVAC" >&6; }
65348
65349
65350  # Check whether --enable-javac-server was given.
65351if test "${enable_javac_server+set}" = set; then :
65352  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65353else
65354  ENABLE_JAVAC_SERVER="yes"
65355fi
65356
65357  if test "x$JVM_ARG_OK" = "xfalse"; then
65358    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65359$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65360    ENABLE_JAVAC_SERVER="no"
65361  fi
65362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65363$as_echo_n "checking whether to use javac server... " >&6; }
65364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65365$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65366
65367
65368  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65369    # When using a server javac, the small client instances do not need much
65370    # resources.
65371    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65372  fi
65373
65374
65375# Setup use of icecc if requested
65376
65377  # Check whether --enable-icecc was given.
65378if test "${enable_icecc+set}" = set; then :
65379  enableval=$enable_icecc;
65380fi
65381
65382
65383  if test "x${enable_icecc}" = "xyes"; then
65384
65385
65386
65387  # Publish this variable in the help.
65388
65389
65390  if [ -z "${ICECC_CMD+x}" ]; then
65391    # The variable is not set by user, try to locate tool using the code snippet
65392    for ac_prog in icecc
65393do
65394  # Extract the first word of "$ac_prog", so it can be a program name with args.
65395set dummy $ac_prog; ac_word=$2
65396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65397$as_echo_n "checking for $ac_word... " >&6; }
65398if ${ac_cv_path_ICECC_CMD+:} false; then :
65399  $as_echo_n "(cached) " >&6
65400else
65401  case $ICECC_CMD in
65402  [\\/]* | ?:[\\/]*)
65403  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65404  ;;
65405  *)
65406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65407for as_dir in $PATH
65408do
65409  IFS=$as_save_IFS
65410  test -z "$as_dir" && as_dir=.
65411    for ac_exec_ext in '' $ac_executable_extensions; do
65412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65413    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65415    break 2
65416  fi
65417done
65418  done
65419IFS=$as_save_IFS
65420
65421  ;;
65422esac
65423fi
65424ICECC_CMD=$ac_cv_path_ICECC_CMD
65425if test -n "$ICECC_CMD"; then
65426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65427$as_echo "$ICECC_CMD" >&6; }
65428else
65429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65430$as_echo "no" >&6; }
65431fi
65432
65433
65434  test -n "$ICECC_CMD" && break
65435done
65436
65437  else
65438    # The variable is set, but is it from the command line or the environment?
65439
65440    # Try to remove the string !ICECC_CMD! from our list.
65441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65443      # If it failed, the variable was not from the command line. Ignore it,
65444      # but warn the user (except for BASH, which is always set by the calling BASH).
65445      if test "xICECC_CMD" != xBASH; then
65446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65447$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65448      fi
65449      # Try to locate tool using the code snippet
65450      for ac_prog in icecc
65451do
65452  # Extract the first word of "$ac_prog", so it can be a program name with args.
65453set dummy $ac_prog; ac_word=$2
65454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65455$as_echo_n "checking for $ac_word... " >&6; }
65456if ${ac_cv_path_ICECC_CMD+:} false; then :
65457  $as_echo_n "(cached) " >&6
65458else
65459  case $ICECC_CMD in
65460  [\\/]* | ?:[\\/]*)
65461  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65462  ;;
65463  *)
65464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65465for as_dir in $PATH
65466do
65467  IFS=$as_save_IFS
65468  test -z "$as_dir" && as_dir=.
65469    for ac_exec_ext in '' $ac_executable_extensions; do
65470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65471    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65473    break 2
65474  fi
65475done
65476  done
65477IFS=$as_save_IFS
65478
65479  ;;
65480esac
65481fi
65482ICECC_CMD=$ac_cv_path_ICECC_CMD
65483if test -n "$ICECC_CMD"; then
65484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65485$as_echo "$ICECC_CMD" >&6; }
65486else
65487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65488$as_echo "no" >&6; }
65489fi
65490
65491
65492  test -n "$ICECC_CMD" && break
65493done
65494
65495    else
65496      # If it succeeded, then it was overridden by the user. We will use it
65497      # for the tool.
65498
65499      # First remove it from the list of overridden variables, so we can test
65500      # for unknown variables in the end.
65501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65502
65503      # Check if we try to supply an empty value
65504      if test "x$ICECC_CMD" = x; then
65505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65506$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65508$as_echo_n "checking for ICECC_CMD... " >&6; }
65509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65510$as_echo "disabled" >&6; }
65511      else
65512        # Check if the provided tool contains a complete path.
65513        tool_specified="$ICECC_CMD"
65514        tool_basename="${tool_specified##*/}"
65515        if test "x$tool_basename" = "x$tool_specified"; then
65516          # A command without a complete path is provided, search $PATH.
65517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65518$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65519          # Extract the first word of "$tool_basename", so it can be a program name with args.
65520set dummy $tool_basename; ac_word=$2
65521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65522$as_echo_n "checking for $ac_word... " >&6; }
65523if ${ac_cv_path_ICECC_CMD+:} false; then :
65524  $as_echo_n "(cached) " >&6
65525else
65526  case $ICECC_CMD in
65527  [\\/]* | ?:[\\/]*)
65528  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65529  ;;
65530  *)
65531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65532for as_dir in $PATH
65533do
65534  IFS=$as_save_IFS
65535  test -z "$as_dir" && as_dir=.
65536    for ac_exec_ext in '' $ac_executable_extensions; do
65537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65538    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65540    break 2
65541  fi
65542done
65543  done
65544IFS=$as_save_IFS
65545
65546  ;;
65547esac
65548fi
65549ICECC_CMD=$ac_cv_path_ICECC_CMD
65550if test -n "$ICECC_CMD"; then
65551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65552$as_echo "$ICECC_CMD" >&6; }
65553else
65554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65555$as_echo "no" >&6; }
65556fi
65557
65558
65559          if test "x$ICECC_CMD" = x; then
65560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65561          fi
65562        else
65563          # Otherwise we believe it is a complete path. Use it as it is.
65564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65565$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65567$as_echo_n "checking for ICECC_CMD... " >&6; }
65568          if test ! -x "$tool_specified"; then
65569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65570$as_echo "not found" >&6; }
65571            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65572          fi
65573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65574$as_echo "$tool_specified" >&6; }
65575        fi
65576      fi
65577    fi
65578
65579  fi
65580
65581
65582
65583  if test "x$ICECC_CMD" = x; then
65584    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65585  fi
65586
65587
65588    old_path="$PATH"
65589
65590    # Look for icecc-create-env in some known places
65591    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65592
65593
65594
65595  # Publish this variable in the help.
65596
65597
65598  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65599    # The variable is not set by user, try to locate tool using the code snippet
65600    for ac_prog in icecc-create-env
65601do
65602  # Extract the first word of "$ac_prog", so it can be a program name with args.
65603set dummy $ac_prog; ac_word=$2
65604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65605$as_echo_n "checking for $ac_word... " >&6; }
65606if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65607  $as_echo_n "(cached) " >&6
65608else
65609  case $ICECC_CREATE_ENV in
65610  [\\/]* | ?:[\\/]*)
65611  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65612  ;;
65613  *)
65614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65615for as_dir in $PATH
65616do
65617  IFS=$as_save_IFS
65618  test -z "$as_dir" && as_dir=.
65619    for ac_exec_ext in '' $ac_executable_extensions; do
65620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65621    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65623    break 2
65624  fi
65625done
65626  done
65627IFS=$as_save_IFS
65628
65629  ;;
65630esac
65631fi
65632ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65633if test -n "$ICECC_CREATE_ENV"; then
65634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65635$as_echo "$ICECC_CREATE_ENV" >&6; }
65636else
65637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65638$as_echo "no" >&6; }
65639fi
65640
65641
65642  test -n "$ICECC_CREATE_ENV" && break
65643done
65644
65645  else
65646    # The variable is set, but is it from the command line or the environment?
65647
65648    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65651      # If it failed, the variable was not from the command line. Ignore it,
65652      # but warn the user (except for BASH, which is always set by the calling BASH).
65653      if test "xICECC_CREATE_ENV" != xBASH; then
65654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65655$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65656      fi
65657      # Try to locate tool using the code snippet
65658      for ac_prog in icecc-create-env
65659do
65660  # Extract the first word of "$ac_prog", so it can be a program name with args.
65661set dummy $ac_prog; ac_word=$2
65662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65663$as_echo_n "checking for $ac_word... " >&6; }
65664if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65665  $as_echo_n "(cached) " >&6
65666else
65667  case $ICECC_CREATE_ENV in
65668  [\\/]* | ?:[\\/]*)
65669  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65670  ;;
65671  *)
65672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65673for as_dir in $PATH
65674do
65675  IFS=$as_save_IFS
65676  test -z "$as_dir" && as_dir=.
65677    for ac_exec_ext in '' $ac_executable_extensions; do
65678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65679    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65681    break 2
65682  fi
65683done
65684  done
65685IFS=$as_save_IFS
65686
65687  ;;
65688esac
65689fi
65690ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65691if test -n "$ICECC_CREATE_ENV"; then
65692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65693$as_echo "$ICECC_CREATE_ENV" >&6; }
65694else
65695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65696$as_echo "no" >&6; }
65697fi
65698
65699
65700  test -n "$ICECC_CREATE_ENV" && break
65701done
65702
65703    else
65704      # If it succeeded, then it was overridden by the user. We will use it
65705      # for the tool.
65706
65707      # First remove it from the list of overridden variables, so we can test
65708      # for unknown variables in the end.
65709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65710
65711      # Check if we try to supply an empty value
65712      if test "x$ICECC_CREATE_ENV" = x; then
65713        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65714$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65716$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65718$as_echo "disabled" >&6; }
65719      else
65720        # Check if the provided tool contains a complete path.
65721        tool_specified="$ICECC_CREATE_ENV"
65722        tool_basename="${tool_specified##*/}"
65723        if test "x$tool_basename" = "x$tool_specified"; then
65724          # A command without a complete path is provided, search $PATH.
65725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65726$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65727          # Extract the first word of "$tool_basename", so it can be a program name with args.
65728set dummy $tool_basename; ac_word=$2
65729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65730$as_echo_n "checking for $ac_word... " >&6; }
65731if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65732  $as_echo_n "(cached) " >&6
65733else
65734  case $ICECC_CREATE_ENV in
65735  [\\/]* | ?:[\\/]*)
65736  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65737  ;;
65738  *)
65739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65740for as_dir in $PATH
65741do
65742  IFS=$as_save_IFS
65743  test -z "$as_dir" && as_dir=.
65744    for ac_exec_ext in '' $ac_executable_extensions; do
65745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65746    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65748    break 2
65749  fi
65750done
65751  done
65752IFS=$as_save_IFS
65753
65754  ;;
65755esac
65756fi
65757ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65758if test -n "$ICECC_CREATE_ENV"; then
65759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65760$as_echo "$ICECC_CREATE_ENV" >&6; }
65761else
65762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65763$as_echo "no" >&6; }
65764fi
65765
65766
65767          if test "x$ICECC_CREATE_ENV" = x; then
65768            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65769          fi
65770        else
65771          # Otherwise we believe it is a complete path. Use it as it is.
65772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65773$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65774          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65775$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65776          if test ! -x "$tool_specified"; then
65777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65778$as_echo "not found" >&6; }
65779            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65780          fi
65781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65782$as_echo "$tool_specified" >&6; }
65783        fi
65784      fi
65785    fi
65786
65787  fi
65788
65789
65790
65791  if test "x$ICECC_CREATE_ENV" = x; then
65792    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65793  fi
65794
65795
65796    # Use icecc-create-env to create a minimal compilation environment that can
65797    # be sent to the other hosts in the icecream cluster.
65798    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65799    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65800    # Older versions of icecc does not have the --gcc parameter
65801    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65802      icecc_gcc_arg="--gcc"
65803    fi
65804    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65805
65806  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65807      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65808          ${icecc_create_env_log} 2>&1 )
65809  if test "$?" != "0"; then
65810    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65811$as_echo "$as_me: icecc-create-env output:" >&6;}
65812    cat \
65813          ${icecc_create_env_log}
65814    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65815  fi
65816
65817    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65818      # For clang, the icecc compilerwrapper is needed. It usually resides next
65819      # to icecc-create-env.
65820
65821
65822
65823  # Publish this variable in the help.
65824
65825
65826  if [ -z "${ICECC_WRAPPER+x}" ]; then
65827    # The variable is not set by user, try to locate tool using the code snippet
65828    for ac_prog in compilerwrapper
65829do
65830  # Extract the first word of "$ac_prog", so it can be a program name with args.
65831set dummy $ac_prog; ac_word=$2
65832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65833$as_echo_n "checking for $ac_word... " >&6; }
65834if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65835  $as_echo_n "(cached) " >&6
65836else
65837  case $ICECC_WRAPPER in
65838  [\\/]* | ?:[\\/]*)
65839  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65840  ;;
65841  *)
65842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65843for as_dir in $PATH
65844do
65845  IFS=$as_save_IFS
65846  test -z "$as_dir" && as_dir=.
65847    for ac_exec_ext in '' $ac_executable_extensions; do
65848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65849    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65851    break 2
65852  fi
65853done
65854  done
65855IFS=$as_save_IFS
65856
65857  ;;
65858esac
65859fi
65860ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65861if test -n "$ICECC_WRAPPER"; then
65862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65863$as_echo "$ICECC_WRAPPER" >&6; }
65864else
65865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65866$as_echo "no" >&6; }
65867fi
65868
65869
65870  test -n "$ICECC_WRAPPER" && break
65871done
65872
65873  else
65874    # The variable is set, but is it from the command line or the environment?
65875
65876    # Try to remove the string !ICECC_WRAPPER! from our list.
65877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65879      # If it failed, the variable was not from the command line. Ignore it,
65880      # but warn the user (except for BASH, which is always set by the calling BASH).
65881      if test "xICECC_WRAPPER" != xBASH; then
65882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65883$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65884      fi
65885      # Try to locate tool using the code snippet
65886      for ac_prog in compilerwrapper
65887do
65888  # Extract the first word of "$ac_prog", so it can be a program name with args.
65889set dummy $ac_prog; ac_word=$2
65890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65891$as_echo_n "checking for $ac_word... " >&6; }
65892if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65893  $as_echo_n "(cached) " >&6
65894else
65895  case $ICECC_WRAPPER in
65896  [\\/]* | ?:[\\/]*)
65897  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65898  ;;
65899  *)
65900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65901for as_dir in $PATH
65902do
65903  IFS=$as_save_IFS
65904  test -z "$as_dir" && as_dir=.
65905    for ac_exec_ext in '' $ac_executable_extensions; do
65906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65907    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65909    break 2
65910  fi
65911done
65912  done
65913IFS=$as_save_IFS
65914
65915  ;;
65916esac
65917fi
65918ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65919if test -n "$ICECC_WRAPPER"; then
65920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65921$as_echo "$ICECC_WRAPPER" >&6; }
65922else
65923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65924$as_echo "no" >&6; }
65925fi
65926
65927
65928  test -n "$ICECC_WRAPPER" && break
65929done
65930
65931    else
65932      # If it succeeded, then it was overridden by the user. We will use it
65933      # for the tool.
65934
65935      # First remove it from the list of overridden variables, so we can test
65936      # for unknown variables in the end.
65937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65938
65939      # Check if we try to supply an empty value
65940      if test "x$ICECC_WRAPPER" = x; then
65941        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65942$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65944$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65946$as_echo "disabled" >&6; }
65947      else
65948        # Check if the provided tool contains a complete path.
65949        tool_specified="$ICECC_WRAPPER"
65950        tool_basename="${tool_specified##*/}"
65951        if test "x$tool_basename" = "x$tool_specified"; then
65952          # A command without a complete path is provided, search $PATH.
65953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65954$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65955          # Extract the first word of "$tool_basename", so it can be a program name with args.
65956set dummy $tool_basename; ac_word=$2
65957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65958$as_echo_n "checking for $ac_word... " >&6; }
65959if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65960  $as_echo_n "(cached) " >&6
65961else
65962  case $ICECC_WRAPPER in
65963  [\\/]* | ?:[\\/]*)
65964  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65965  ;;
65966  *)
65967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65968for as_dir in $PATH
65969do
65970  IFS=$as_save_IFS
65971  test -z "$as_dir" && as_dir=.
65972    for ac_exec_ext in '' $ac_executable_extensions; do
65973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65974    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65976    break 2
65977  fi
65978done
65979  done
65980IFS=$as_save_IFS
65981
65982  ;;
65983esac
65984fi
65985ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65986if test -n "$ICECC_WRAPPER"; then
65987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65988$as_echo "$ICECC_WRAPPER" >&6; }
65989else
65990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65991$as_echo "no" >&6; }
65992fi
65993
65994
65995          if test "x$ICECC_WRAPPER" = x; then
65996            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65997          fi
65998        else
65999          # Otherwise we believe it is a complete path. Use it as it is.
66000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66001$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66002          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66003$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66004          if test ! -x "$tool_specified"; then
66005            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66006$as_echo "not found" >&6; }
66007            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66008          fi
66009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66010$as_echo "$tool_specified" >&6; }
66011        fi
66012      fi
66013    fi
66014
66015  fi
66016
66017
66018
66019  if test "x$ICECC_WRAPPER" = x; then
66020    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66021  fi
66022
66023
66024
66025  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66026      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66027  if test "$?" != "0"; then
66028    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66029$as_echo "$as_me: icecc-create-env output:" >&6;}
66030    cat ${icecc_create_env_log}
66031    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66032  fi
66033
66034    else
66035      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66036    fi
66037    PATH="$old_path"
66038    # The bundle with the compiler gets a name based on checksums. Parse log file
66039    # to find it.
66040    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66041    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66042    if test ! -f ${ICECC_ENV_BUNDLE}; then
66043      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66044    fi
66045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66046$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66048$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66049    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66050
66051    if test "x${COMPILE_TYPE}" = "xcross"; then
66052      # If cross compiling, create a separate env package for the build compiler
66053      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66054      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66055      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66056
66057  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66058      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66059            ${icecc_create_env_log_build} 2>&1 )
66060  if test "$?" != "0"; then
66061    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66062$as_echo "$as_me: icecc-create-env output:" >&6;}
66063    cat \
66064            ${icecc_create_env_log_build}
66065    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66066  fi
66067
66068      elif test "x${BUILD_CC##*/}" = "xclang"; then
66069
66070  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66071      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66072  if test "$?" != "0"; then
66073    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66074$as_echo "$as_me: icecc-create-env output:" >&6;}
66075    cat ${icecc_create_env_log_build}
66076    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66077  fi
66078
66079      else
66080        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66081      fi
66082      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66083      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66084      if test ! -f ${ICECC_ENV_BUNDLE}; then
66085        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66086      fi
66087      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66088$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66090$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66091      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66092          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66093    else
66094      BUILD_ICECC="${ICECC}"
66095    fi
66096
66097
66098  fi
66099
66100
66101# Can the C/C++ compiler use precompiled headers?
66102
66103
66104  ###############################################################################
66105  #
66106  # Can the C/C++ compiler use precompiled headers?
66107  #
66108  # Check whether --enable-precompiled-headers was given.
66109if test "${enable_precompiled_headers+set}" = set; then :
66110  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66111else
66112  ENABLE_PRECOMPH=yes
66113fi
66114
66115
66116  USE_PRECOMPILED_HEADER=1
66117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66118$as_echo_n "checking If precompiled header is enabled... " >&6; }
66119  if test "x$ENABLE_PRECOMPH" = xno; then
66120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66121$as_echo "no, forced" >&6; }
66122    USE_PRECOMPILED_HEADER=0
66123  elif test "x$ICECC" != "x"; then
66124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66125$as_echo "no, does not work effectively with icecc" >&6; }
66126    USE_PRECOMPILED_HEADER=0
66127  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66129$as_echo "no, does not work with Solaris Studio" >&6; }
66130    USE_PRECOMPILED_HEADER=0
66131  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66133$as_echo "no, does not work with xlc" >&6; }
66134    USE_PRECOMPILED_HEADER=0
66135  else
66136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66137$as_echo "yes" >&6; }
66138  fi
66139
66140  if test "x$ENABLE_PRECOMPH" = xyes; then
66141    # Check that the compiler actually supports precomp headers.
66142    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66143      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66144$as_echo_n "checking that precompiled headers work... " >&6; }
66145      echo "int alfa();" > conftest.h
66146      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66147      if test ! -f conftest.hpp.gch; then
66148        USE_PRECOMPILED_HEADER=0
66149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66150$as_echo "no" >&6; }
66151      else
66152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66153$as_echo "yes" >&6; }
66154      fi
66155      $RM conftest.h conftest.hpp.gch
66156    fi
66157  fi
66158
66159
66160
66161
66162# Setup use of ccache, if available
66163
66164  # Check whether --enable-ccache was given.
66165if test "${enable_ccache+set}" = set; then :
66166  enableval=$enable_ccache;
66167fi
66168
66169
66170  CCACHE=
66171  CCACHE_STATUS=
66172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66173$as_echo_n "checking is ccache enabled... " >&6; }
66174  if test "x$enable_ccache" = xyes; then
66175    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66177$as_echo "yes" >&6; }
66178      OLD_PATH="$PATH"
66179      if test "x$TOOLCHAIN_PATH" != x; then
66180        PATH=$TOOLCHAIN_PATH:$PATH
66181      fi
66182
66183
66184
66185  # Publish this variable in the help.
66186
66187
66188  if [ -z "${CCACHE+x}" ]; then
66189    # The variable is not set by user, try to locate tool using the code snippet
66190    for ac_prog in ccache
66191do
66192  # Extract the first word of "$ac_prog", so it can be a program name with args.
66193set dummy $ac_prog; ac_word=$2
66194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66195$as_echo_n "checking for $ac_word... " >&6; }
66196if ${ac_cv_path_CCACHE+:} false; then :
66197  $as_echo_n "(cached) " >&6
66198else
66199  case $CCACHE in
66200  [\\/]* | ?:[\\/]*)
66201  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66202  ;;
66203  *)
66204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66205for as_dir in $PATH
66206do
66207  IFS=$as_save_IFS
66208  test -z "$as_dir" && as_dir=.
66209    for ac_exec_ext in '' $ac_executable_extensions; do
66210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66211    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66213    break 2
66214  fi
66215done
66216  done
66217IFS=$as_save_IFS
66218
66219  ;;
66220esac
66221fi
66222CCACHE=$ac_cv_path_CCACHE
66223if test -n "$CCACHE"; then
66224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66225$as_echo "$CCACHE" >&6; }
66226else
66227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66228$as_echo "no" >&6; }
66229fi
66230
66231
66232  test -n "$CCACHE" && break
66233done
66234
66235  else
66236    # The variable is set, but is it from the command line or the environment?
66237
66238    # Try to remove the string !CCACHE! from our list.
66239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66241      # If it failed, the variable was not from the command line. Ignore it,
66242      # but warn the user (except for BASH, which is always set by the calling BASH).
66243      if test "xCCACHE" != xBASH; then
66244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66245$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66246      fi
66247      # Try to locate tool using the code snippet
66248      for ac_prog in ccache
66249do
66250  # Extract the first word of "$ac_prog", so it can be a program name with args.
66251set dummy $ac_prog; ac_word=$2
66252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66253$as_echo_n "checking for $ac_word... " >&6; }
66254if ${ac_cv_path_CCACHE+:} false; then :
66255  $as_echo_n "(cached) " >&6
66256else
66257  case $CCACHE in
66258  [\\/]* | ?:[\\/]*)
66259  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66260  ;;
66261  *)
66262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66263for as_dir in $PATH
66264do
66265  IFS=$as_save_IFS
66266  test -z "$as_dir" && as_dir=.
66267    for ac_exec_ext in '' $ac_executable_extensions; do
66268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66269    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66271    break 2
66272  fi
66273done
66274  done
66275IFS=$as_save_IFS
66276
66277  ;;
66278esac
66279fi
66280CCACHE=$ac_cv_path_CCACHE
66281if test -n "$CCACHE"; then
66282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66283$as_echo "$CCACHE" >&6; }
66284else
66285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66286$as_echo "no" >&6; }
66287fi
66288
66289
66290  test -n "$CCACHE" && break
66291done
66292
66293    else
66294      # If it succeeded, then it was overridden by the user. We will use it
66295      # for the tool.
66296
66297      # First remove it from the list of overridden variables, so we can test
66298      # for unknown variables in the end.
66299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66300
66301      # Check if we try to supply an empty value
66302      if test "x$CCACHE" = x; then
66303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66304$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66306$as_echo_n "checking for CCACHE... " >&6; }
66307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66308$as_echo "disabled" >&6; }
66309      else
66310        # Check if the provided tool contains a complete path.
66311        tool_specified="$CCACHE"
66312        tool_basename="${tool_specified##*/}"
66313        if test "x$tool_basename" = "x$tool_specified"; then
66314          # A command without a complete path is provided, search $PATH.
66315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66316$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66317          # Extract the first word of "$tool_basename", so it can be a program name with args.
66318set dummy $tool_basename; ac_word=$2
66319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66320$as_echo_n "checking for $ac_word... " >&6; }
66321if ${ac_cv_path_CCACHE+:} false; then :
66322  $as_echo_n "(cached) " >&6
66323else
66324  case $CCACHE in
66325  [\\/]* | ?:[\\/]*)
66326  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66327  ;;
66328  *)
66329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66330for as_dir in $PATH
66331do
66332  IFS=$as_save_IFS
66333  test -z "$as_dir" && as_dir=.
66334    for ac_exec_ext in '' $ac_executable_extensions; do
66335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66336    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66338    break 2
66339  fi
66340done
66341  done
66342IFS=$as_save_IFS
66343
66344  ;;
66345esac
66346fi
66347CCACHE=$ac_cv_path_CCACHE
66348if test -n "$CCACHE"; then
66349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66350$as_echo "$CCACHE" >&6; }
66351else
66352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66353$as_echo "no" >&6; }
66354fi
66355
66356
66357          if test "x$CCACHE" = x; then
66358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66359          fi
66360        else
66361          # Otherwise we believe it is a complete path. Use it as it is.
66362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66363$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66365$as_echo_n "checking for CCACHE... " >&6; }
66366          if test ! -x "$tool_specified"; then
66367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66368$as_echo "not found" >&6; }
66369            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66370          fi
66371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66372$as_echo "$tool_specified" >&6; }
66373        fi
66374      fi
66375    fi
66376
66377  fi
66378
66379
66380
66381  if test "x$CCACHE" = x; then
66382    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66383  fi
66384
66385
66386      PATH="$OLD_PATH"
66387      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66388      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66389    else
66390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66391$as_echo "no" >&6; }
66392      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66393$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66394    fi
66395  elif test "x$enable_ccache" = xno; then
66396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66397$as_echo "no, explicitly disabled" >&6; }
66398    CCACHE_STATUS="Disabled"
66399  elif test "x$enable_ccache" = x; then
66400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66401$as_echo "no" >&6; }
66402  else
66403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66404$as_echo "unknown" >&6; }
66405    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66406  fi
66407
66408
66409
66410# Check whether --with-ccache-dir was given.
66411if test "${with_ccache_dir+set}" = set; then :
66412  withval=$with_ccache_dir;
66413fi
66414
66415
66416  if test "x$with_ccache_dir" != x; then
66417    # When using a non home ccache directory, assume the use is to share ccache files
66418    # with other users. Thus change the umask.
66419    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66420    if test "x$CCACHE" = x; then
66421      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66422$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66423    fi
66424  fi
66425
66426  if test "x$CCACHE" != x; then
66427
66428  if test "x$CCACHE" != x; then
66429    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66430      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66431          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66432      if test "x$HAS_BAD_CCACHE" != "x"; then
66433        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66434      fi
66435      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66436$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66437      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66438      PUSHED_FLAGS="$CXXFLAGS"
66439      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66440      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66441/* end confdefs.h.  */
66442
66443int
66444main ()
66445{
66446
66447  ;
66448  return 0;
66449}
66450_ACEOF
66451if ac_fn_cxx_try_compile "$LINENO"; then :
66452  CC_KNOWS_CCACHE_TRICK=yes
66453else
66454  CC_KNOWS_CCACHE_TRICK=no
66455fi
66456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66457      CXXFLAGS="$PUSHED_FLAGS"
66458      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66460$as_echo "yes" >&6; }
66461        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66462
66463        CCACHE_SLOPPINESS=pch_defines,time_macros
66464      else
66465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66466$as_echo "no" >&6; }
66467        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66468      fi
66469    fi
66470
66471    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66472        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66473
66474    if test "x$SET_CCACHE_DIR" != x; then
66475      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66476      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66477    fi
66478  fi
66479
66480  fi
66481
66482
66483###############################################################################
66484#
66485# And now the finish...
66486#
66487###############################################################################
66488
66489# Check for some common pitfalls
66490
66491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66492    file_to_test="$SRC_ROOT/LICENSE"
66493    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66494      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
66495    fi
66496  fi
66497
66498
66499  # Did user specify any unknown variables?
66500
66501  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66502    # Replace the separating ! with spaces before presenting for end user.
66503    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66504    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66505$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66506  fi
66507
66508
66509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66510$as_echo_n "checking if build directory is on local disk... " >&6; }
66511
66512  # df -l lists only local disks; if the given directory is not found then
66513  # a non-zero exit code is given
66514  if test "x$DF" = x; then
66515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66516      # msys does not have df; use Windows "net use" instead.
66517      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66518      if test "x$IS_NETWORK_DISK" = x; then
66519        OUTPUT_DIR_IS_LOCAL="yes"
66520      else
66521        OUTPUT_DIR_IS_LOCAL="no"
66522      fi
66523    else
66524      # No df here, say it's local
66525      OUTPUT_DIR_IS_LOCAL="yes"
66526    fi
66527  else
66528    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66529      OUTPUT_DIR_IS_LOCAL="yes"
66530    else
66531      OUTPUT_DIR_IS_LOCAL="no"
66532    fi
66533  fi
66534
66535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66536$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66537
66538
66539
66540  # Check if the user has any old-style ALT_ variables set.
66541  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66542
66543  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66544  # Since we can't properly handle the dependencies for this, warn the user about the situation
66545  if test -e $OUTPUT_ROOT/spec.gmk; then
66546    IS_RECONFIGURE=yes
66547  else
66548    IS_RECONFIGURE=no
66549  fi
66550
66551
66552# At the end, call the custom hook. (Dummy macro if no custom sources available)
66553
66554
66555# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66556
66557  # Keep feature lists sorted and free of duplicates
66558  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66559  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66560  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66561  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66562  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66563  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66564  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66565
66566  # Validate features
66567  for variant in $JVM_VARIANTS; do
66568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66569$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66570    features_var_name=JVM_FEATURES_$variant
66571    JVM_FEATURES_TO_TEST=${!features_var_name}
66572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66573$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66574    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66575    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66576    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66577    if test "x$INVALID_FEATURES" != x; then
66578      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66579    fi
66580  done
66581
66582
66583# We're messing a bit with internal autoconf variables to put the config.status
66584# in the output directory instead of the current directory.
66585CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66586
66587# Create the actual output files. Now the main work of configure is done.
66588cat >confcache <<\_ACEOF
66589# This file is a shell script that caches the results of configure
66590# tests run on this system so they can be shared between configure
66591# scripts and configure runs, see configure's option --config-cache.
66592# It is not useful on other systems.  If it contains results you don't
66593# want to keep, you may remove or edit it.
66594#
66595# config.status only pays attention to the cache file if you give it
66596# the --recheck option to rerun configure.
66597#
66598# `ac_cv_env_foo' variables (set or unset) will be overridden when
66599# loading this file, other *unset* `ac_cv_foo' will be assigned the
66600# following values.
66601
66602_ACEOF
66603
66604# The following way of writing the cache mishandles newlines in values,
66605# but we know of no workaround that is simple, portable, and efficient.
66606# So, we kill variables containing newlines.
66607# Ultrix sh set writes to stderr and can't be redirected directly,
66608# and sets the high bit in the cache file unless we assign to the vars.
66609(
66610  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66611    eval ac_val=\$$ac_var
66612    case $ac_val in #(
66613    *${as_nl}*)
66614      case $ac_var in #(
66615      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66616$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66617      esac
66618      case $ac_var in #(
66619      _ | IFS | as_nl) ;; #(
66620      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66621      *) { eval $ac_var=; unset $ac_var;} ;;
66622      esac ;;
66623    esac
66624  done
66625
66626  (set) 2>&1 |
66627    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66628    *${as_nl}ac_space=\ *)
66629      # `set' does not quote correctly, so add quotes: double-quote
66630      # substitution turns \\\\ into \\, and sed turns \\ into \.
66631      sed -n \
66632	"s/'/'\\\\''/g;
66633	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66634      ;; #(
66635    *)
66636      # `set' quotes correctly as required by POSIX, so do not add quotes.
66637      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66638      ;;
66639    esac |
66640    sort
66641) |
66642  sed '
66643     /^ac_cv_env_/b end
66644     t clear
66645     :clear
66646     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66647     t end
66648     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66649     :end' >>confcache
66650if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66651  if test -w "$cache_file"; then
66652    if test "x$cache_file" != "x/dev/null"; then
66653      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66654$as_echo "$as_me: updating cache $cache_file" >&6;}
66655      if test ! -f "$cache_file" || test -h "$cache_file"; then
66656	cat confcache >"$cache_file"
66657      else
66658        case $cache_file in #(
66659        */* | ?:*)
66660	  mv -f confcache "$cache_file"$$ &&
66661	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66662        *)
66663	  mv -f confcache "$cache_file" ;;
66664	esac
66665      fi
66666    fi
66667  else
66668    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66669$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66670  fi
66671fi
66672rm -f confcache
66673
66674test "x$prefix" = xNONE && prefix=$ac_default_prefix
66675# Let make expand exec_prefix.
66676test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66677
66678# Transform confdefs.h into DEFS.
66679# Protect against shell expansion while executing Makefile rules.
66680# Protect against Makefile macro expansion.
66681#
66682# If the first sed substitution is executed (which looks for macros that
66683# take arguments), then branch to the quote section.  Otherwise,
66684# look for a macro that doesn't take arguments.
66685ac_script='
66686:mline
66687/\\$/{
66688 N
66689 s,\\\n,,
66690 b mline
66691}
66692t clear
66693:clear
66694s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66695t quote
66696s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66697t quote
66698b any
66699:quote
66700s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66701s/\[/\\&/g
66702s/\]/\\&/g
66703s/\$/$$/g
66704H
66705:any
66706${
66707	g
66708	s/^\n//
66709	s/\n/ /g
66710	p
66711}
66712'
66713DEFS=`sed -n "$ac_script" confdefs.h`
66714
66715
66716ac_libobjs=
66717ac_ltlibobjs=
66718U=
66719for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66720  # 1. Remove the extension, and $U if already installed.
66721  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66722  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66723  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66724  #    will be set to the directory where LIBOBJS objects are built.
66725  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66726  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66727done
66728LIBOBJS=$ac_libobjs
66729
66730LTLIBOBJS=$ac_ltlibobjs
66731
66732
66733
66734: "${CONFIG_STATUS=./config.status}"
66735ac_write_fail=0
66736ac_clean_files_save=$ac_clean_files
66737ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66738{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66739$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66740as_write_fail=0
66741cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66742#! $SHELL
66743# Generated by $as_me.
66744# Run this file to recreate the current configuration.
66745# Compiler output produced by configure, useful for debugging
66746# configure, is in config.log if it exists.
66747
66748debug=false
66749ac_cs_recheck=false
66750ac_cs_silent=false
66751
66752SHELL=\${CONFIG_SHELL-$SHELL}
66753export SHELL
66754_ASEOF
66755cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66756## -------------------- ##
66757## M4sh Initialization. ##
66758## -------------------- ##
66759
66760# Be more Bourne compatible
66761DUALCASE=1; export DUALCASE # for MKS sh
66762if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66763  emulate sh
66764  NULLCMD=:
66765  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66766  # is contrary to our usage.  Disable this feature.
66767  alias -g '${1+"$@"}'='"$@"'
66768  setopt NO_GLOB_SUBST
66769else
66770  case `(set -o) 2>/dev/null` in #(
66771  *posix*) :
66772    set -o posix ;; #(
66773  *) :
66774     ;;
66775esac
66776fi
66777
66778
66779as_nl='
66780'
66781export as_nl
66782# Printing a long string crashes Solaris 7 /usr/bin/printf.
66783as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66784as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66785as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66786# Prefer a ksh shell builtin over an external printf program on Solaris,
66787# but without wasting forks for bash or zsh.
66788if test -z "$BASH_VERSION$ZSH_VERSION" \
66789    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66790  as_echo='print -r --'
66791  as_echo_n='print -rn --'
66792elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66793  as_echo='printf %s\n'
66794  as_echo_n='printf %s'
66795else
66796  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66797    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66798    as_echo_n='/usr/ucb/echo -n'
66799  else
66800    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66801    as_echo_n_body='eval
66802      arg=$1;
66803      case $arg in #(
66804      *"$as_nl"*)
66805	expr "X$arg" : "X\\(.*\\)$as_nl";
66806	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66807      esac;
66808      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66809    '
66810    export as_echo_n_body
66811    as_echo_n='sh -c $as_echo_n_body as_echo'
66812  fi
66813  export as_echo_body
66814  as_echo='sh -c $as_echo_body as_echo'
66815fi
66816
66817# The user is always right.
66818if test "${PATH_SEPARATOR+set}" != set; then
66819  PATH_SEPARATOR=:
66820  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66821    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66822      PATH_SEPARATOR=';'
66823  }
66824fi
66825
66826
66827# IFS
66828# We need space, tab and new line, in precisely that order.  Quoting is
66829# there to prevent editors from complaining about space-tab.
66830# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66831# splitting by setting IFS to empty value.)
66832IFS=" ""	$as_nl"
66833
66834# Find who we are.  Look in the path if we contain no directory separator.
66835as_myself=
66836case $0 in #((
66837  *[\\/]* ) as_myself=$0 ;;
66838  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66839for as_dir in $PATH
66840do
66841  IFS=$as_save_IFS
66842  test -z "$as_dir" && as_dir=.
66843    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66844  done
66845IFS=$as_save_IFS
66846
66847     ;;
66848esac
66849# We did not find ourselves, most probably we were run as `sh COMMAND'
66850# in which case we are not to be found in the path.
66851if test "x$as_myself" = x; then
66852  as_myself=$0
66853fi
66854if test ! -f "$as_myself"; then
66855  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66856  exit 1
66857fi
66858
66859# Unset variables that we do not need and which cause bugs (e.g. in
66860# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66861# suppresses any "Segmentation fault" message there.  '((' could
66862# trigger a bug in pdksh 5.2.14.
66863for as_var in BASH_ENV ENV MAIL MAILPATH
66864do eval test x\${$as_var+set} = xset \
66865  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66866done
66867PS1='$ '
66868PS2='> '
66869PS4='+ '
66870
66871# NLS nuisances.
66872LC_ALL=C
66873export LC_ALL
66874LANGUAGE=C
66875export LANGUAGE
66876
66877# CDPATH.
66878(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66879
66880
66881# as_fn_error STATUS ERROR [LINENO LOG_FD]
66882# ----------------------------------------
66883# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66884# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66885# script with STATUS, using 1 if that was 0.
66886as_fn_error ()
66887{
66888  as_status=$1; test $as_status -eq 0 && as_status=1
66889  if test "$4"; then
66890    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66891    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66892  fi
66893  $as_echo "$as_me: error: $2" >&2
66894  as_fn_exit $as_status
66895} # as_fn_error
66896
66897
66898# as_fn_set_status STATUS
66899# -----------------------
66900# Set $? to STATUS, without forking.
66901as_fn_set_status ()
66902{
66903  return $1
66904} # as_fn_set_status
66905
66906# as_fn_exit STATUS
66907# -----------------
66908# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66909as_fn_exit ()
66910{
66911  set +e
66912  as_fn_set_status $1
66913  exit $1
66914} # as_fn_exit
66915
66916# as_fn_unset VAR
66917# ---------------
66918# Portably unset VAR.
66919as_fn_unset ()
66920{
66921  { eval $1=; unset $1;}
66922}
66923as_unset=as_fn_unset
66924# as_fn_append VAR VALUE
66925# ----------------------
66926# Append the text in VALUE to the end of the definition contained in VAR. Take
66927# advantage of any shell optimizations that allow amortized linear growth over
66928# repeated appends, instead of the typical quadratic growth present in naive
66929# implementations.
66930if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66931  eval 'as_fn_append ()
66932  {
66933    eval $1+=\$2
66934  }'
66935else
66936  as_fn_append ()
66937  {
66938    eval $1=\$$1\$2
66939  }
66940fi # as_fn_append
66941
66942# as_fn_arith ARG...
66943# ------------------
66944# Perform arithmetic evaluation on the ARGs, and store the result in the
66945# global $as_val. Take advantage of shells that can avoid forks. The arguments
66946# must be portable across $(()) and expr.
66947if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66948  eval 'as_fn_arith ()
66949  {
66950    as_val=$(( $* ))
66951  }'
66952else
66953  as_fn_arith ()
66954  {
66955    as_val=`expr "$@" || test $? -eq 1`
66956  }
66957fi # as_fn_arith
66958
66959
66960if expr a : '\(a\)' >/dev/null 2>&1 &&
66961   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66962  as_expr=expr
66963else
66964  as_expr=false
66965fi
66966
66967if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66968  as_basename=basename
66969else
66970  as_basename=false
66971fi
66972
66973if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66974  as_dirname=dirname
66975else
66976  as_dirname=false
66977fi
66978
66979as_me=`$as_basename -- "$0" ||
66980$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66981	 X"$0" : 'X\(//\)$' \| \
66982	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66983$as_echo X/"$0" |
66984    sed '/^.*\/\([^/][^/]*\)\/*$/{
66985	    s//\1/
66986	    q
66987	  }
66988	  /^X\/\(\/\/\)$/{
66989	    s//\1/
66990	    q
66991	  }
66992	  /^X\/\(\/\).*/{
66993	    s//\1/
66994	    q
66995	  }
66996	  s/.*/./; q'`
66997
66998# Avoid depending upon Character Ranges.
66999as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67000as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67001as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67002as_cr_digits='0123456789'
67003as_cr_alnum=$as_cr_Letters$as_cr_digits
67004
67005ECHO_C= ECHO_N= ECHO_T=
67006case `echo -n x` in #(((((
67007-n*)
67008  case `echo 'xy\c'` in
67009  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67010  xy)  ECHO_C='\c';;
67011  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67012       ECHO_T='	';;
67013  esac;;
67014*)
67015  ECHO_N='-n';;
67016esac
67017
67018rm -f conf$$ conf$$.exe conf$$.file
67019if test -d conf$$.dir; then
67020  rm -f conf$$.dir/conf$$.file
67021else
67022  rm -f conf$$.dir
67023  mkdir conf$$.dir 2>/dev/null
67024fi
67025if (echo >conf$$.file) 2>/dev/null; then
67026  if ln -s conf$$.file conf$$ 2>/dev/null; then
67027    as_ln_s='ln -s'
67028    # ... but there are two gotchas:
67029    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67030    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67031    # In both cases, we have to default to `cp -pR'.
67032    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67033      as_ln_s='cp -pR'
67034  elif ln conf$$.file conf$$ 2>/dev/null; then
67035    as_ln_s=ln
67036  else
67037    as_ln_s='cp -pR'
67038  fi
67039else
67040  as_ln_s='cp -pR'
67041fi
67042rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67043rmdir conf$$.dir 2>/dev/null
67044
67045
67046# as_fn_mkdir_p
67047# -------------
67048# Create "$as_dir" as a directory, including parents if necessary.
67049as_fn_mkdir_p ()
67050{
67051
67052  case $as_dir in #(
67053  -*) as_dir=./$as_dir;;
67054  esac
67055  test -d "$as_dir" || eval $as_mkdir_p || {
67056    as_dirs=
67057    while :; do
67058      case $as_dir in #(
67059      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67060      *) as_qdir=$as_dir;;
67061      esac
67062      as_dirs="'$as_qdir' $as_dirs"
67063      as_dir=`$as_dirname -- "$as_dir" ||
67064$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67065	 X"$as_dir" : 'X\(//\)[^/]' \| \
67066	 X"$as_dir" : 'X\(//\)$' \| \
67067	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67068$as_echo X"$as_dir" |
67069    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67070	    s//\1/
67071	    q
67072	  }
67073	  /^X\(\/\/\)[^/].*/{
67074	    s//\1/
67075	    q
67076	  }
67077	  /^X\(\/\/\)$/{
67078	    s//\1/
67079	    q
67080	  }
67081	  /^X\(\/\).*/{
67082	    s//\1/
67083	    q
67084	  }
67085	  s/.*/./; q'`
67086      test -d "$as_dir" && break
67087    done
67088    test -z "$as_dirs" || eval "mkdir $as_dirs"
67089  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67090
67091
67092} # as_fn_mkdir_p
67093if mkdir -p . 2>/dev/null; then
67094  as_mkdir_p='mkdir -p "$as_dir"'
67095else
67096  test -d ./-p && rmdir ./-p
67097  as_mkdir_p=false
67098fi
67099
67100
67101# as_fn_executable_p FILE
67102# -----------------------
67103# Test if FILE is an executable regular file.
67104as_fn_executable_p ()
67105{
67106  test -f "$1" && test -x "$1"
67107} # as_fn_executable_p
67108as_test_x='test -x'
67109as_executable_p=as_fn_executable_p
67110
67111# Sed expression to map a string onto a valid CPP name.
67112as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67113
67114# Sed expression to map a string onto a valid variable name.
67115as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67116
67117
67118exec 6>&1
67119## ----------------------------------- ##
67120## Main body of $CONFIG_STATUS script. ##
67121## ----------------------------------- ##
67122_ASEOF
67123test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67124
67125cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67126# Save the log message, to keep $0 and so on meaningful, and to
67127# report actual input values of CONFIG_FILES etc. instead of their
67128# values after options handling.
67129ac_log="
67130This file was extended by OpenJDK $as_me jdk9, which was
67131generated by GNU Autoconf 2.69.  Invocation command line was
67132
67133  CONFIG_FILES    = $CONFIG_FILES
67134  CONFIG_HEADERS  = $CONFIG_HEADERS
67135  CONFIG_LINKS    = $CONFIG_LINKS
67136  CONFIG_COMMANDS = $CONFIG_COMMANDS
67137  $ $0 $@
67138
67139on `(hostname || uname -n) 2>/dev/null | sed 1q`
67140"
67141
67142_ACEOF
67143
67144case $ac_config_files in *"
67145"*) set x $ac_config_files; shift; ac_config_files=$*;;
67146esac
67147
67148
67149
67150cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67151# Files that config.status was made for.
67152config_files="$ac_config_files"
67153
67154_ACEOF
67155
67156cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67157ac_cs_usage="\
67158\`$as_me' instantiates files and other configuration actions
67159from templates according to the current configuration.  Unless the files
67160and actions are specified as TAGs, all are instantiated by default.
67161
67162Usage: $0 [OPTION]... [TAG]...
67163
67164  -h, --help       print this help, then exit
67165  -V, --version    print version number and configuration settings, then exit
67166      --config     print configuration, then exit
67167  -q, --quiet, --silent
67168                   do not print progress messages
67169  -d, --debug      don't remove temporary files
67170      --recheck    update $as_me by reconfiguring in the same conditions
67171      --file=FILE[:TEMPLATE]
67172                   instantiate the configuration file FILE
67173
67174Configuration files:
67175$config_files
67176
67177Report bugs to <build-dev@openjdk.java.net>.
67178OpenJDK home page: <http://openjdk.java.net>."
67179
67180_ACEOF
67181cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67182ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67183ac_cs_version="\\
67184OpenJDK config.status jdk9
67185configured by $0, generated by GNU Autoconf 2.69,
67186  with options \\"\$ac_cs_config\\"
67187
67188Copyright (C) 2012 Free Software Foundation, Inc.
67189This config.status script is free software; the Free Software Foundation
67190gives unlimited permission to copy, distribute and modify it."
67191
67192ac_pwd='$ac_pwd'
67193srcdir='$srcdir'
67194AWK='$AWK'
67195test -n "\$AWK" || AWK=awk
67196_ACEOF
67197
67198cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67199# The default lists apply if the user does not specify any file.
67200ac_need_defaults=:
67201while test $# != 0
67202do
67203  case $1 in
67204  --*=?*)
67205    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67206    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67207    ac_shift=:
67208    ;;
67209  --*=)
67210    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67211    ac_optarg=
67212    ac_shift=:
67213    ;;
67214  *)
67215    ac_option=$1
67216    ac_optarg=$2
67217    ac_shift=shift
67218    ;;
67219  esac
67220
67221  case $ac_option in
67222  # Handling of the options.
67223  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67224    ac_cs_recheck=: ;;
67225  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67226    $as_echo "$ac_cs_version"; exit ;;
67227  --config | --confi | --conf | --con | --co | --c )
67228    $as_echo "$ac_cs_config"; exit ;;
67229  --debug | --debu | --deb | --de | --d | -d )
67230    debug=: ;;
67231  --file | --fil | --fi | --f )
67232    $ac_shift
67233    case $ac_optarg in
67234    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67235    '') as_fn_error $? "missing file argument" ;;
67236    esac
67237    as_fn_append CONFIG_FILES " '$ac_optarg'"
67238    ac_need_defaults=false;;
67239  --he | --h |  --help | --hel | -h )
67240    $as_echo "$ac_cs_usage"; exit ;;
67241  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67242  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67243    ac_cs_silent=: ;;
67244
67245  # This is an error.
67246  -*) as_fn_error $? "unrecognized option: \`$1'
67247Try \`$0 --help' for more information." ;;
67248
67249  *) as_fn_append ac_config_targets " $1"
67250     ac_need_defaults=false ;;
67251
67252  esac
67253  shift
67254done
67255
67256ac_configure_extra_args=
67257
67258if $ac_cs_silent; then
67259  exec 6>/dev/null
67260  ac_configure_extra_args="$ac_configure_extra_args --silent"
67261fi
67262
67263_ACEOF
67264cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67265if \$ac_cs_recheck; then
67266  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67267  shift
67268  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67269  CONFIG_SHELL='$SHELL'
67270  export CONFIG_SHELL
67271  exec "\$@"
67272fi
67273
67274_ACEOF
67275cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67276exec 5>>config.log
67277{
67278  echo
67279  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67280## Running $as_me. ##
67281_ASBOX
67282  $as_echo "$ac_log"
67283} >&5
67284
67285_ACEOF
67286cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67287_ACEOF
67288
67289cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67290
67291# Handling of arguments.
67292for ac_config_target in $ac_config_targets
67293do
67294  case $ac_config_target in
67295    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67296    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67297    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67298    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67299    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67300
67301  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67302  esac
67303done
67304
67305
67306# If the user did not use the arguments to specify the items to instantiate,
67307# then the envvar interface is used.  Set only those that are not.
67308# We use the long form for the default assignment because of an extremely
67309# bizarre bug on SunOS 4.1.3.
67310if $ac_need_defaults; then
67311  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67312fi
67313
67314# Have a temporary directory for convenience.  Make it in the build tree
67315# simply because there is no reason against having it here, and in addition,
67316# creating and moving files from /tmp can sometimes cause problems.
67317# Hook for its removal unless debugging.
67318# Note that there is a small window in which the directory will not be cleaned:
67319# after its creation but before its name has been assigned to `$tmp'.
67320$debug ||
67321{
67322  tmp= ac_tmp=
67323  trap 'exit_status=$?
67324  : "${ac_tmp:=$tmp}"
67325  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67326' 0
67327  trap 'as_fn_exit 1' 1 2 13 15
67328}
67329# Create a (secure) tmp directory for tmp files.
67330
67331{
67332  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67333  test -d "$tmp"
67334}  ||
67335{
67336  tmp=./conf$$-$RANDOM
67337  (umask 077 && mkdir "$tmp")
67338} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67339ac_tmp=$tmp
67340
67341# Set up the scripts for CONFIG_FILES section.
67342# No need to generate them if there are no CONFIG_FILES.
67343# This happens for instance with `./config.status config.h'.
67344if test -n "$CONFIG_FILES"; then
67345
67346
67347ac_cr=`echo X | tr X '\015'`
67348# On cygwin, bash can eat \r inside `` if the user requested igncr.
67349# But we know of no other shell where ac_cr would be empty at this
67350# point, so we can use a bashism as a fallback.
67351if test "x$ac_cr" = x; then
67352  eval ac_cr=\$\'\\r\'
67353fi
67354ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67355if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67356  ac_cs_awk_cr='\\r'
67357else
67358  ac_cs_awk_cr=$ac_cr
67359fi
67360
67361echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67362_ACEOF
67363
67364
67365{
67366  echo "cat >conf$$subs.awk <<_ACEOF" &&
67367  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67368  echo "_ACEOF"
67369} >conf$$subs.sh ||
67370  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67371ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67372ac_delim='%!_!# '
67373for ac_last_try in false false false false false :; do
67374  . ./conf$$subs.sh ||
67375    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67376
67377  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67378  if test $ac_delim_n = $ac_delim_num; then
67379    break
67380  elif $ac_last_try; then
67381    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67382  else
67383    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67384  fi
67385done
67386rm -f conf$$subs.sh
67387
67388cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67389cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67390_ACEOF
67391sed -n '
67392h
67393s/^/S["/; s/!.*/"]=/
67394p
67395g
67396s/^[^!]*!//
67397:repl
67398t repl
67399s/'"$ac_delim"'$//
67400t delim
67401:nl
67402h
67403s/\(.\{148\}\)..*/\1/
67404t more1
67405s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67406p
67407n
67408b repl
67409:more1
67410s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67411p
67412g
67413s/.\{148\}//
67414t nl
67415:delim
67416h
67417s/\(.\{148\}\)..*/\1/
67418t more2
67419s/["\\]/\\&/g; s/^/"/; s/$/"/
67420p
67421b
67422:more2
67423s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67424p
67425g
67426s/.\{148\}//
67427t delim
67428' <conf$$subs.awk | sed '
67429/^[^""]/{
67430  N
67431  s/\n//
67432}
67433' >>$CONFIG_STATUS || ac_write_fail=1
67434rm -f conf$$subs.awk
67435cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67436_ACAWK
67437cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67438  for (key in S) S_is_set[key] = 1
67439  FS = ""
67440
67441}
67442{
67443  line = $ 0
67444  nfields = split(line, field, "@")
67445  substed = 0
67446  len = length(field[1])
67447  for (i = 2; i < nfields; i++) {
67448    key = field[i]
67449    keylen = length(key)
67450    if (S_is_set[key]) {
67451      value = S[key]
67452      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67453      len += length(value) + length(field[++i])
67454      substed = 1
67455    } else
67456      len += 1 + keylen
67457  }
67458
67459  print line
67460}
67461
67462_ACAWK
67463_ACEOF
67464cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67465if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67466  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67467else
67468  cat
67469fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67470  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67471_ACEOF
67472
67473# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67474# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67475# trailing colons and then remove the whole line if VPATH becomes empty
67476# (actually we leave an empty line to preserve line numbers).
67477if test "x$srcdir" = x.; then
67478  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67479h
67480s///
67481s/^/:/
67482s/[	 ]*$/:/
67483s/:\$(srcdir):/:/g
67484s/:\${srcdir}:/:/g
67485s/:@srcdir@:/:/g
67486s/^:*//
67487s/:*$//
67488x
67489s/\(=[	 ]*\).*/\1/
67490G
67491s/\n//
67492s/^[^=]*=[	 ]*$//
67493}'
67494fi
67495
67496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67497fi # test -n "$CONFIG_FILES"
67498
67499
67500eval set X "  :F $CONFIG_FILES      "
67501shift
67502for ac_tag
67503do
67504  case $ac_tag in
67505  :[FHLC]) ac_mode=$ac_tag; continue;;
67506  esac
67507  case $ac_mode$ac_tag in
67508  :[FHL]*:*);;
67509  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67510  :[FH]-) ac_tag=-:-;;
67511  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67512  esac
67513  ac_save_IFS=$IFS
67514  IFS=:
67515  set x $ac_tag
67516  IFS=$ac_save_IFS
67517  shift
67518  ac_file=$1
67519  shift
67520
67521  case $ac_mode in
67522  :L) ac_source=$1;;
67523  :[FH])
67524    ac_file_inputs=
67525    for ac_f
67526    do
67527      case $ac_f in
67528      -) ac_f="$ac_tmp/stdin";;
67529      *) # Look for the file first in the build tree, then in the source tree
67530	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67531	 # because $ac_f cannot contain `:'.
67532	 test -f "$ac_f" ||
67533	   case $ac_f in
67534	   [\\/$]*) false;;
67535	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67536	   esac ||
67537	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67538      esac
67539      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67540      as_fn_append ac_file_inputs " '$ac_f'"
67541    done
67542
67543    # Let's still pretend it is `configure' which instantiates (i.e., don't
67544    # use $as_me), people would be surprised to read:
67545    #    /* config.h.  Generated by config.status.  */
67546    configure_input='Generated from '`
67547	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67548	`' by configure.'
67549    if test x"$ac_file" != x-; then
67550      configure_input="$ac_file.  $configure_input"
67551      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67552$as_echo "$as_me: creating $ac_file" >&6;}
67553    fi
67554    # Neutralize special characters interpreted by sed in replacement strings.
67555    case $configure_input in #(
67556    *\&* | *\|* | *\\* )
67557       ac_sed_conf_input=`$as_echo "$configure_input" |
67558       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67559    *) ac_sed_conf_input=$configure_input;;
67560    esac
67561
67562    case $ac_tag in
67563    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67564      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67565    esac
67566    ;;
67567  esac
67568
67569  ac_dir=`$as_dirname -- "$ac_file" ||
67570$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67571	 X"$ac_file" : 'X\(//\)[^/]' \| \
67572	 X"$ac_file" : 'X\(//\)$' \| \
67573	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67574$as_echo X"$ac_file" |
67575    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67576	    s//\1/
67577	    q
67578	  }
67579	  /^X\(\/\/\)[^/].*/{
67580	    s//\1/
67581	    q
67582	  }
67583	  /^X\(\/\/\)$/{
67584	    s//\1/
67585	    q
67586	  }
67587	  /^X\(\/\).*/{
67588	    s//\1/
67589	    q
67590	  }
67591	  s/.*/./; q'`
67592  as_dir="$ac_dir"; as_fn_mkdir_p
67593  ac_builddir=.
67594
67595case "$ac_dir" in
67596.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67597*)
67598  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67599  # A ".." for each directory in $ac_dir_suffix.
67600  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67601  case $ac_top_builddir_sub in
67602  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67603  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67604  esac ;;
67605esac
67606ac_abs_top_builddir=$ac_pwd
67607ac_abs_builddir=$ac_pwd$ac_dir_suffix
67608# for backward compatibility:
67609ac_top_builddir=$ac_top_build_prefix
67610
67611case $srcdir in
67612  .)  # We are building in place.
67613    ac_srcdir=.
67614    ac_top_srcdir=$ac_top_builddir_sub
67615    ac_abs_top_srcdir=$ac_pwd ;;
67616  [\\/]* | ?:[\\/]* )  # Absolute name.
67617    ac_srcdir=$srcdir$ac_dir_suffix;
67618    ac_top_srcdir=$srcdir
67619    ac_abs_top_srcdir=$srcdir ;;
67620  *) # Relative name.
67621    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67622    ac_top_srcdir=$ac_top_build_prefix$srcdir
67623    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67624esac
67625ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67626
67627
67628  case $ac_mode in
67629  :F)
67630  #
67631  # CONFIG_FILE
67632  #
67633
67634_ACEOF
67635
67636cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67637# If the template does not know about datarootdir, expand it.
67638# FIXME: This hack should be removed a few years after 2.60.
67639ac_datarootdir_hack=; ac_datarootdir_seen=
67640ac_sed_dataroot='
67641/datarootdir/ {
67642  p
67643  q
67644}
67645/@datadir@/p
67646/@docdir@/p
67647/@infodir@/p
67648/@localedir@/p
67649/@mandir@/p'
67650case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67651*datarootdir*) ac_datarootdir_seen=yes;;
67652*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67653  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67654$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67655_ACEOF
67656cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67657  ac_datarootdir_hack='
67658  s&@datadir@&$datadir&g
67659  s&@docdir@&$docdir&g
67660  s&@infodir@&$infodir&g
67661  s&@localedir@&$localedir&g
67662  s&@mandir@&$mandir&g
67663  s&\\\${datarootdir}&$datarootdir&g' ;;
67664esac
67665_ACEOF
67666
67667# Neutralize VPATH when `$srcdir' = `.'.
67668# Shell code in configure.ac might set extrasub.
67669# FIXME: do we really want to maintain this feature?
67670cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67671ac_sed_extra="$ac_vpsub
67672$extrasub
67673_ACEOF
67674cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67675:t
67676/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67677s|@configure_input@|$ac_sed_conf_input|;t t
67678s&@top_builddir@&$ac_top_builddir_sub&;t t
67679s&@top_build_prefix@&$ac_top_build_prefix&;t t
67680s&@srcdir@&$ac_srcdir&;t t
67681s&@abs_srcdir@&$ac_abs_srcdir&;t t
67682s&@top_srcdir@&$ac_top_srcdir&;t t
67683s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67684s&@builddir@&$ac_builddir&;t t
67685s&@abs_builddir@&$ac_abs_builddir&;t t
67686s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67687$ac_datarootdir_hack
67688"
67689eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67690  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67691
67692test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67693  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67694  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67695      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67696  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67697which seems to be undefined.  Please make sure it is defined" >&5
67698$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67699which seems to be undefined.  Please make sure it is defined" >&2;}
67700
67701  rm -f "$ac_tmp/stdin"
67702  case $ac_file in
67703  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67704  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67705  esac \
67706  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67707 ;;
67708
67709
67710
67711  esac
67712
67713done # for ac_tag
67714
67715
67716as_fn_exit 0
67717_ACEOF
67718ac_clean_files=$ac_clean_files_save
67719
67720test $ac_write_fail = 0 ||
67721  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67722
67723
67724# configure is writing to config.log, and then calls config.status.
67725# config.status does its own redirection, appending to config.log.
67726# Unfortunately, on DOS this fails, as config.log is still kept open
67727# by configure, so config.status won't be able to write to it; its
67728# output is simply discarded.  So we exec the FD to /dev/null,
67729# effectively closing config.log, so it can be properly (re)opened and
67730# appended to by config.status.  When coming back to configure, we
67731# need to make the FD available again.
67732if test "$no_create" != yes; then
67733  ac_cs_success=:
67734  ac_config_status_args=
67735  test "$silent" = yes &&
67736    ac_config_status_args="$ac_config_status_args --quiet"
67737  exec 5>/dev/null
67738  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67739  exec 5>>config.log
67740  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67741  # would make configure fail if this is the last instruction.
67742  $ac_cs_success || as_fn_exit 1
67743fi
67744if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67745  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67746$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67747fi
67748
67749
67750# After AC_OUTPUT, we need to do final work
67751
67752
67753  # Try to move config.log (generated by autoconf) to the configure-support directory.
67754  if test -e ./config.log; then
67755    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67756  fi
67757
67758  # Rotate our log file (configure.log)
67759  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67760    $RM -f "$OUTPUT_ROOT/configure.log.old"
67761  fi
67762  if test -e "$OUTPUT_ROOT/configure.log"; then
67763    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67764  fi
67765
67766  # Move configure.log from current directory to the build output root
67767  if test -e ./configure.log; then
67768    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67769  fi
67770
67771  # Make the compare script executable
67772  $CHMOD +x $OUTPUT_ROOT/compare.sh
67773
67774
67775# Finally output some useful information to the user
67776
67777  # Finally output some useful information to the user
67778
67779  printf "\n"
67780  printf "====================================================\n"
67781  if test "x$no_create" != "xyes"; then
67782    if test "x$IS_RECONFIGURE" != "xyes"; then
67783      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67784    else
67785      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67786    fi
67787  else
67788    if test "x$IS_RECONFIGURE" != "xyes"; then
67789      printf "A configuration has been successfully checked but not created\n"
67790    else
67791      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67792    fi
67793  fi
67794  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67795    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67796  else
67797    printf "using default settings.\n"
67798  fi
67799
67800  printf "\n"
67801  printf "Configuration summary:\n"
67802  printf "* Debug level:    $DEBUG_LEVEL\n"
67803  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67804  printf "* JDK variant:    $JDK_VARIANT\n"
67805  printf "* JVM variants:   $JVM_VARIANTS\n"
67806  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67807  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67808
67809  printf "\n"
67810  printf "Tools summary:\n"
67811  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67812    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67813  fi
67814  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67815  if test "x$TOOLCHAIN_VERSION" != "x"; then
67816    print_version=" $TOOLCHAIN_VERSION"
67817  fi
67818  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67819  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67820  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67821
67822  printf "\n"
67823  printf "Build performance summary:\n"
67824  printf "* Cores to use:   $JOBS\n"
67825  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67826  if test "x$CCACHE_STATUS" != "x"; then
67827    printf "* ccache status:  $CCACHE_STATUS\n"
67828  fi
67829  printf "\n"
67830
67831  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67832    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67833    printf "will result in longer build times.\n"
67834    printf "\n"
67835  fi
67836
67837  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67838    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67839    printf "These are not respected, and will be ignored. It is recommended\n"
67840    printf "that you clean your environment. The following variables are set:\n"
67841    printf "$FOUND_ALT_VARIABLES\n"
67842    printf "\n"
67843  fi
67844
67845  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67846    printf "WARNING: Your build output directory is not on a local disk.\n"
67847    printf "This will severely degrade build performance!\n"
67848    printf "It is recommended that you create an output directory on a local disk,\n"
67849    printf "and run the configure script again from that directory.\n"
67850    printf "\n"
67851  fi
67852
67853  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67854    printf "WARNING: The result of this configuration has overridden an older\n"
67855    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67856    printf "proper build. Failure to do so might result in strange build problems.\n"
67857    printf "\n"
67858  fi
67859
67860  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67861    printf "WARNING: The result of this configuration was not saved.\n"
67862    printf "You should run without '--no-create | -n' to create the configuration.\n"
67863    printf "\n"
67864  fi
67865
67866
67867
67868  # Locate config.log.
67869  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67870    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67871  elif test -e "./config.log"; then
67872    CONFIG_LOG_PATH="."
67873  fi
67874
67875  if test -e "$CONFIG_LOG_PATH/config.log"; then
67876    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67877    if test $? -eq 0; then
67878      printf "The following warnings were produced. Repeated here for convenience:\n"
67879      # We must quote sed expression (using []) to stop m4 from eating the [].
67880      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67881      printf "\n"
67882    fi
67883  fi
67884
67885